diff --git a/.editorconfig b/.editorconfig index 82837f7f132a..4cd051ce9522 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,7 +8,6 @@ indent_style = space indent_size = 2 # We recommend you to keep these unchanged -end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true @@ -16,3 +15,22 @@ insert_final_newline = true [*.md] trim_trailing_whitespace = false indent_size = 4 + +# Make these match what we have in .gitattributes +[*.mk] +end_of_line = lf + +[Makefile] +end_of_line = lf + +[*.sh] +end_of_line = lf + +# The gitattributes file will handle the line endings conversion properly according to the operating system settings for other files + + +# We don't have gitattributes properly for these +# So if the user have for example core.autocrlf set to true +# the line endings would be wrong. +[lib/**] +end_of_line = unset diff --git a/.gitignore b/.gitignore index 90f29a2970db..799fb54def9b 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 @@ -42,6 +43,7 @@ cmake-build-debug .project .settings/ .idea +*.iml .browse.VC.db* *.stackdump util/Win_Check_Output.txt @@ -52,6 +54,7 @@ util/Win_Check_Output.txt .vscode/last.sql .vscode/temp.sql .stfolder +.tags # ignore image files *.png diff --git a/.travis.yml b/.travis.yml index 125e8f3334cd..7ff4060ab7c6 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/.vscode/settings.json b/.vscode/settings.json index afe8341d0e2e..ba5b56aa4022 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -11,6 +11,7 @@ "*.h": "c", "*.c": "c", "*.cpp": "cpp", - "*.hpp": "cpp" + "*.hpp": "cpp", + "xstddef": "c" } -} \ No newline at end of file +} diff --git a/Doxyfile b/Doxyfile new file mode 100644 index 000000000000..218d77b4dda8 --- /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 8350d5ce3443..9ef82bbd3c2e 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/bootloader.mk b/bootloader.mk index 55352f3d4265..4bcf183fb779 100644 --- a/bootloader.mk +++ b/bootloader.mk @@ -32,21 +32,41 @@ ifeq ($(strip $(BOOTLOADER)), atmel-dfu) OPT_DEFS += -DBOOTLOADER_ATMEL_DFU OPT_DEFS += -DBOOTLOADER_DFU - BOOTLOADER_SIZE = 4096 + ifeq ($(strip $(MCU)), atmega32u4) + BOOTLOADER_SIZE = 4096 + endif + ifeq ($(strip $(MCU)), at90usb1286) + BOOTLOADER_SIZE = 8192 + endif endif ifeq ($(strip $(BOOTLOADER)), lufa-dfu) OPT_DEFS += -DBOOTLOADER_LUFA_DFU OPT_DEFS += -DBOOTLOADER_DFU - BOOTLOADER_SIZE = 4096 + ifeq ($(strip $(MCU)), atmega32u4) + BOOTLOADER_SIZE = 4096 + endif + ifeq ($(strip $(MCU)), at90usb1286) + BOOTLOADER_SIZE = 8192 + endif endif ifeq ($(strip $(BOOTLOADER)), qmk-dfu) OPT_DEFS += -DBOOTLOADER_QMK_DFU OPT_DEFS += -DBOOTLOADER_DFU - BOOTLOADER_SIZE = 4096 + ifeq ($(strip $(MCU)), atmega32u4) + BOOTLOADER_SIZE = 4096 + endif + ifeq ($(strip $(MCU)), at90usb1286) + BOOTLOADER_SIZE = 8192 + endif endif ifeq ($(strip $(BOOTLOADER)), halfkay) OPT_DEFS += -DBOOTLOADER_HALFKAY - BOOTLOADER_SIZE = 512 + ifeq ($(strip $(MCU)), atmega32u4) + BOOTLOADER_SIZE = 512 + endif + ifeq ($(strip $(MCU)), at90usb1286) + BOOTLOADER_SIZE = 1024 + endif endif ifeq ($(strip $(BOOTLOADER)), caterina) OPT_DEFS += -DBOOTLOADER_CATERINA @@ -59,4 +79,4 @@ endif ifdef BOOTLOADER_SIZE OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE)) -endif \ No newline at end of file +endif diff --git a/build_keyboard.mk b/build_keyboard.mk index cbdaaa01043e..b25712385c6d 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -113,13 +113,14 @@ endif # We can assume a ChibiOS target When MCU_FAMILY is defined , since it's not used for LUFA ifdef MCU_FAMILY + FIRMWARE_FORMAT=bin PLATFORM=CHIBIOS else PLATFORM=AVR + FIRMWARE_FORMAT=hex endif ifeq ($(PLATFORM),CHIBIOS) - include $(TMK_PATH)/protocol/chibios.mk include $(TMK_PATH)/chibios.mk OPT_OS = chibios ifneq ("$(wildcard $(KEYBOARD_PATH_5)/bootloader_defs.h)","") @@ -142,6 +143,8 @@ ifeq ($(PLATFORM),CHIBIOS) OPT_DEFS += -include $(KEYBOARD_PATH_1)/bootloader_defs.h else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/boards/$(BOARD)/bootloader_defs.h)","") OPT_DEFS += -include $(KEYBOARD_PATH_1)/boards/$(BOARD)/bootloader_defs.h + else ifneq ("$(wildcard $(TOP_DIR)/drivers/boards/$(BOARD)/bootloader_defs.h)","") + OPT_DEFS += -include $(TOP_DIR)/drivers/boards/$(BOARD)/bootloader_defs.h endif endif @@ -195,14 +198,22 @@ else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.c)","") KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1) else ifneq ($(LAYOUTS),) include build_layout.mk -else +else $(error Could not find keymap) # this state should never be reached endif # User space stuff -USER_PATH := users/$(KEYMAP) +ifeq ("$(USER_NAME)","") + USER_NAME := $(KEYMAP) +endif +USER_PATH := users/$(USER_NAME) + -include $(USER_PATH)/rules.mk +ifneq ("$(wildcard $(USER_PATH)/config.h)","") + CONFIG_H += $(USER_PATH)/config.h +endif + # Object files directory # To put object files in current directory, use a dot (.), do NOT make @@ -245,6 +256,10 @@ endif include $(TMK_PATH)/avr.mk endif +ifeq ($(PLATFORM),CHIBIOS) + include $(TMK_PATH)/protocol/chibios.mk +endif + ifeq ($(strip $(VISUALIZER_ENABLE)), yes) VISUALIZER_DIR = $(QUANTUM_DIR)/visualizer VISUALIZER_PATH = $(QUANTUM_PATH)/visualizer @@ -270,7 +285,7 @@ $(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG) all: build check-size # Change the build target to build a HEX file or a library. -build: elf cphex +build: elf cpfirmware #build: elf hex eep lss sym #build: lib diff --git a/common_features.mk b/common_features.mk index 319834b5e524..0778f8e0f515 100644 --- a/common_features.mk +++ b/common_features.mk @@ -34,7 +34,12 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes) OPT_DEFS += -DAUDIO_ENABLE MUSIC_ENABLE := 1 SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c - SRC += $(QUANTUM_DIR)/audio/audio.c + SRC += $(QUANTUM_DIR)/process_keycode/process_clicky.c + ifeq ($(PLATFORM),AVR) + SRC += $(QUANTUM_DIR)/audio/audio.c + else + SRC += $(QUANTUM_DIR)/audio/audio_arm.c + endif SRC += $(QUANTUM_DIR)/audio/voices.c SRC += $(QUANTUM_DIR)/audio/luts.c endif @@ -109,6 +114,15 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) endif endif +ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) + OPT_DEFS += -DRGB_MATRIX_ENABLE + SRC += is31fl3731.c + SRC += i2c_master.c + SRC += $(QUANTUM_DIR)/color.c + SRC += $(QUANTUM_DIR)/rgb_matrix.c + CIE1931_CURVE = yes +endif + ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) OPT_DEFS += -DTAP_DANCE_ENABLE SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c @@ -128,6 +142,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) @@ -151,6 +168,9 @@ endif ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) ifeq ($(strip $(VISUALIZER_ENABLE)), yes) CIE1931_CURVE = yes + endif + ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes) + OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER endif endif diff --git a/keyboards/jc65/keymaps/coth/rules.mk b/docs/.nojekyll similarity index 100% rename from keyboards/jc65/keymaps/coth/rules.mk rename to docs/.nojekyll diff --git a/docs/CNAME b/docs/CNAME new file mode 100644 index 000000000000..e089843e0bcc --- /dev/null +++ b/docs/CNAME @@ -0,0 +1 @@ +docs.qmk.fm \ No newline at end of file diff --git a/docs/README.md b/docs/README.md index 93347a42e1cd..22ab243cd257 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,16 +1,23 @@ # Quantum Mechanical Keyboard Firmware -## What is QMK Firmware? {#what-is-qmk-firmware} +[![Current Version](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags) +[![Build Status](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware) +[![Discord](https://img.shields.io/discord/440868230475677696.svg)](https://discord.gg/Uq7gcHh) +[![Docs Status](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm) +[![GitHub contributors](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly) +[![GitHub forks](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/) -QMK (*Quantum Mechanical Keyboard*) is an open source community that maintains QMK Firmware, QMK Flasher, qmk.fm, and these docs. QMK Firmware is a keyboard firmware based on the [tmk\_keyboard](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/). It has also been ported to ARM chips using ChibiOS. You can use it to power your own hand-wired or custom keyboard PCB. +## What is QMK Firmware? -## How to Get It {#how-to-get-it} +QMK (*Quantum Mechanical Keyboard*) is an open source community that maintains QMK Firmware, QMK Toolbox, qmk.fm, and these docs. QMK Firmware is a keyboard firmware based on the [tmk\_keyboard](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/). It has also been ported to ARM chips using ChibiOS. You can use it to power your own hand-wired or custom keyboard PCB. + +## How to Get It If you plan on contributing a keymap, keyboard, or features to QMK, the easiest thing to do is [fork the repo through Github](https://github.com/qmk/qmk_firmware#fork-destination-box), and clone your repo locally to make your changes, push them, then open a [Pull Request](https://github.com/qmk/qmk_firmware/pulls) from your fork. Otherwise, you can either download it directly ([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), or clone it via git (`git@github.com:qmk/qmk_firmware.git`), or https (`https://github.com/qmk/qmk_firmware.git`). -## How to Compile {#how-to-compile} +## How to Compile Before you are able to compile, you'll need to [install an environment](getting_started_build_tools.md) for AVR or/and ARM development. Once that is complete, you'll use the `make` command to build a keyboard and keymap with the following notation: @@ -20,6 +27,6 @@ This would build the `rev4` revision of the `planck` with the `default` keymap. make preonic:default -## How to Customize {#how-to-customize} +## How to Customize QMK has lots of [features](features.md) to explore, and a good deal of [reference documentation](http://docs.qmk.fm) to dig through. Most features are taken advantage of by modifying your [keymap](keymap.md), and changing the [keycodes](keycodes.md). diff --git a/docs/_sidebar.md b/docs/_sidebar.md new file mode 100644 index 000000000000..31a22315dd2d --- /dev/null +++ b/docs/_sidebar.md @@ -0,0 +1,100 @@ +* [Getting Started](README.md) + * [QMK Introduction](getting_started_introduction.md) + * [Install Build Tools](getting_started_build_tools.md) + * Alternative: [Vagrant Guide](getting_started_vagrant.md) + * [Build/Compile Instructions](getting_started_make_guide.md) + * [Flashing Firmware](flashing.md) + * [Contributing to QMK](contributing.md) + * [How to Use Github](getting_started_github.md) + * [Getting Help](getting_started_getting_help.md) + +* [Complete Newbs Guide](newbs.md) + * [Getting Started](newbs_getting_started.md) + * [Building Your First Firmware](newbs_building_firmware.md) + * [Flashing Firmware](newbs_flashing.md) + * [Testing and Debugging](newbs_testing_debugging.md) + +* [FAQ](faq.md) + * [General FAQ](faq_general.md) + * [Build/Compile QMK](faq_build.md) + * [Debugging/Troubleshooting QMK](faq_debug.md) + * [Keymap](faq_keymap.md) + +* [Hardware](hardware.md) + * [Keyboard Guidelines](hardware_keyboard_guidelines.md) + * [AVR Processors](hardware_avr.md) + * ARM Processors (TBD) + * [Drivers](hardware_drivers.md) + +* [Features](features.md) + * [Advanced Keycodes](feature_advanced_keycodes.md) + * [Audio](feature_audio.md) + * [Auto Shift](feature_auto_shift.md) + * [Backlight](feature_backlight.md) + * [Bootmagic](feature_bootmagic.md) + * [Command](feature_command.md) + * [Dynamic Macros](feature_dynamic_macros.md) + * [Grave Escape](feature_grave_esc.md) + * [Key Lock](feature_key_lock.md) + * [Layouts](feature_layouts.md) + * [Leader Key](feature_leader_key.md) + * [Macros](feature_macros.md) + * [Mouse Keys](feature_mouse_keys.md) + * [Pointing Device](feature_pointing_device.md) + * [PS/2 Mouse](feature_ps2_mouse.md) + * [RGB Lighting](feature_rgblight.md) + * [RGB Matrix](feature_rgb_matrix.md) + * [Space Cadet Shift](feature_space_cadet.md) + * [Space Cadet Shift Enter](feature_space_shift_cadet.md) + * [Stenography](feature_stenography.md) + * [Swap Hands](feature_swap_hands.md) + * [Tap Dance](feature_tap_dance.md) + * [Terminal](feature_terminal.md) + * [Thermal Printer](feature_thermal_printer.md) + * [Unicode](feature_unicode.md) + * [Userspace](feature_userspace.md) + +* [Keycodes](keycodes.md) + * [Backlight](feature_backlight.md#backlight-keycodes) + * [Basic](keycodes_basic.md) + * [Bluetooth](feature_bluetooth.md#bluetooth-keycodes) + * [Bootmagic](feature_bootmagic.md#bootmagic-keycodes) + * [Layer Switching](feature_advanced_keycodes.md#switching-and-toggling-layers) + * [Mod+Key](feature_advanced_keycodes.md#modifier-keys) + * [Mod Tap](feature_advanced_keycodes.md#mod-tap) + * [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) + * [Quantum](quantum_keycodes.md) + * [RGB Light](feature_rgblight.md#rgblight-keycodes) + * [Shifted Keys](feature_advanced_keycodes.md#shifted-keycodes) + * [Stenography](feature_stenography.md#keycode-reference) + * [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes) + * [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md) + +* Reference + * [Config Options](config_options.md) + * [Customizing Functionality](custom_quantum_functions.md) + * [Documentation Best Practices](documentation_best_practices.md) + * [Documentation Templates](documentation_templates.md) + * [Glossary](reference_glossary.md) + * [Keymap Overview](keymap.md) + * [Unit Testing](unit_testing.md) + +* For Makers and Modders + * [Hand Wiring Guide](hand_wire.md) + * [ISP Flashing Guide](isp_flashing_guide.md) + +* For a Deeper Understanding + * [How Keyboards Work](how_keyboards_work.md) + * [Understanding QMK](understanding_qmk.md) + +* Other Topics + * [Using Eclipse with QMK](eclipse.md) + +* QMK Internals (In Progress) + * [Defines](internals_defines.md) + * [Input Callback Reg](internals_input_callback_reg.md) + * [Midi Device](internals_midi_device.md) + * [Midi Device Setup Process](internals_midi_device_setup_process.md) + * [Midi Util](internals_midi_util.md) + * [Send Functions](internals_send_functions.md) + * [Sysex Tools](internals_sysex_tools.md) diff --git a/docs/_summary.md b/docs/_summary.md index 0192db0d7e01..318c526a8540 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -3,9 +3,16 @@ * [Install Build Tools](getting_started_build_tools.md) * Alternative: [Vagrant Guide](getting_started_vagrant.md) * [Build/Compile Instructions](getting_started_make_guide.md) - * [Flashing Instructions](flashing.md) + * [Flashing Firmware](flashing.md) * [Contributing to QMK](contributing.md) * [How to Use Github](getting_started_github.md) + * [Getting Help](getting_started_getting_help.md) + +* [Complete Newbs Guide](newbs.md) + * [Getting Started](newbs_getting_started.md) + * [Building Your First Firmware](newbs_building_firmware.md) + * [Flashing Firmware](newbs_flashing.md) + * [Testing and Debugging](newbs_testing_debugging.md) * [FAQ](faq.md) * [General FAQ](faq_general.md) @@ -25,6 +32,7 @@ * [Auto Shift](feature_auto_shift.md) * [Backlight](feature_backlight.md) * [Bootmagic](feature_bootmagic.md) + * [Command](feature_command.md) * [Dynamic Macros](feature_dynamic_macros.md) * [Grave Escape](feature_grave_esc.md) * [Key Lock](feature_key_lock.md) @@ -37,6 +45,7 @@ * [RGB Lighting](feature_rgblight.md) * [Space Cadet](feature_space_cadet.md) * [Stenography](feature_stenography.md) + * [Swap Hands](feature_swap_hands.md) * [Tap Dance](feature_tap_dance.md) * [Terminal](feature_terminal.md) * [Thermal Printer](feature_thermal_printer.md) @@ -64,7 +73,7 @@ * [Customizing Functionality](custom_quantum_functions.md) * [Documentation Best Practices](documentation_best_practices.md) * [Documentation Templates](documentation_templates.md) - * [Glossary](glossary.md) + * [Glossary](reference_glossary.md) * [Keymap Overview](keymap.md) * [Unit Testing](unit_testing.md) @@ -78,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 1dd4cdbaa059..8cdcc97e4959 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` @@ -62,14 +61,22 @@ This is a C header file that is one of the first things included, and will persi * COL2ROW or ROW2COL - how your matrix is configured. COL2ROW means the black mark on your diode is facing to the rows, and between the switch and the rows. * `#define AUDIO_VOICES` * turns on the alternate audio voices (to cycle through) +* `#define C4_AUDIO` + * enables audio on pin C4 +* `#define C5_AUDIO` + * enables audio on pin C5 * `#define C6_AUDIO` * enables audio on pin C6 * `#define B5_AUDIO` - * enables audio on pin B5 (duophony is enable if both are enabled) + * enables audio on pin B5 (duophony is enables if one of B[5-7]_AUDIO is enabled along with one of C[4-6]_AUDIO) +* `#define B6_AUDIO` + * enables audio on pin B6 (duophony is enables if one of B[5-7]_AUDIO is enabled along with one of C[4-6]_AUDIO) +* `#define B7_AUDIO` + * enables audio on pin B7 (duophony is enables if one of B[5-7]_AUDIO is enabled along with one of C[4-6]_AUDIO) * `#define BACKLIGHT_PIN B7` * pin of the backlight - B5, B6, B7 use PWM, others use softPWM * `#define BACKLIGHT_LEVELS 3` - * number of levels your backlight will have (not including off) + * number of levels your backlight will have (maximum 15 excluding off) * `#define BACKLIGHT_BREATHING` * enables backlight breathing (only works with backlight pins B5, B6 and B7) * `#define BREATHING_PERIOD 6` @@ -82,8 +89,10 @@ This is a C header file that is one of the first things included, and will persi * tries to keep switch state consistent with keyboard LED state * `#define IS_COMMAND() ( keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) )` * key combination that allows the use of magic commands (useful for debugging) +* `#define USB_MAX_POWER_CONSUMPTION` + * sets the maximum power (in mA) over USB for the device (default: 500) -### Features That Can Be Disabled +## Features That Can Be Disabled If you define these options you will disable the associated feature, which can save on code size. @@ -102,16 +111,16 @@ 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. * `#define FORCE_NKRO` * NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of EEPROM setting. NKRO can still be turned off but will be turned on again if the keyboard reboots. * `#define PREVENT_STUCK_MODIFIERS` - * when switching layers, this will release all mods + * stores the layer a key press came from so the same layer is used when the key is released, regardless of which layers are enabled -### Behaviors That Can Be Configured +## Behaviors That Can Be Configured * `#define TAPPING_TERM 200` * how long before a tap becomes a hold @@ -139,7 +148,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 +165,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 +177,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 +186,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 +200,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/contributing.md b/docs/contributing.md index 0e8066f00537..17a9aa985915 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -101,7 +101,7 @@ You'll find all our documentation in the `qmk_firmware/docs` directory, or if yo Most first-time QMK contributors start with their personal keymaps. We try to keep keymap standards pretty casual (keymaps, after all, reflect the personality of their creators) but we do ask that you follow these guidelines to make it easier for others to discover and learn from your keymap. -* Write a `readme.md` using [the template](https://docs.qmk.fm/documentation_templates.html#). +* Write a `readme.md` using [the template](documentation_templates.md). * All Keymap PR's are squashed, so if you care about how your commits are squashed you should do it yourself * Do not lump features in with keymap PR's. Submit the feature first and then a second PR for the keymap. * Do not include `Makefile`s in your keymap folder (they're no longer used) @@ -113,7 +113,7 @@ Keyboards are the raison d'ĂȘtre for QMK. Some keyboards are community maintaine We also ask that you follow these guidelines: -* Write a `readme.md` using [the template](https://docs.qmk.fm/documentation_templates.html#). +* Write a `readme.md` using [the template](documentation_templates.md). * Keep the number of commits reasonable or we will squash your PR * Do not lump core features in with new keyboards. Submit the feature first and then submit a separate PR for the keyboard. * Name `.c`/`.h` file after the immediate parent folder, eg `/keyboards///.[ch]` @@ -140,7 +140,7 @@ We also ask that you follow these guidelines: * Keep the number of commits reasonable or we will squash your PR * Do not lump keyboards or keymaps in with core changes. Submit your core changes first. -* Write [Unit Tests](http://docs.qmk.fm/unit_testing.html) for your feature +* Write [Unit Tests](unit_testing.md) for your feature * Follow the style of the file you are editing. If the style is unclear or there are mixed styles you should conform to the [coding conventions](#coding-conventions) above. ## Refactoring diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index e7a45e0bfd37..6d741b6cb251 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md @@ -98,10 +98,10 @@ This allows you to control the 5 LED's defined as part of the USB Keyboard spec. * `USB_LED_COMPOSE` * `USB_LED_KANA` -### Example `led_set_kb()` Implementation +### Example `led_set_user()` Implementation ``` -void led_set_kb(uint8_t usb_led) { +void led_set_user(uint8_t usb_led) { if (usb_led & (1< This is important ``` -### Examples: - -{% hint style='info' %} -This uses `hint style='info'` -{% endhint %} - -{% hint style='tip' %} -This uses `hint style='tip'` -{% endhint %} - -{% hint style='danger' %} -This uses `hint style='danger'` -{% endhint %} +Renders as: -{% hint style='working' %} -This uses `hint style='working'` -{% endhint %} +!> This is important -# Styled Terminal Blocks - -You can present styled terminal blocks by including special tokens inside your text block. +### General Tips ``` -\`\`\` -**[terminal] -**[prompt foo@joe]**[path ~]**[delimiter $ ]**[command ./myscript] -Normal output line. Nothing special here... -But... -You can add some colors. What about a warning message? -**[warning [WARNING] The color depends on the theme. Could look normal too] -What about an error message? -**[error [ERROR] This is not the error you are looking for] -\`\`\` +?> This is a helpful tip. ``` -### Example +Renders as: + +?> This is a helpful tip. -``` -**[terminal] -**[prompt foo@joe]**[path ~]**[delimiter $ ]**[command ./myscript] -Normal output line. Nothing special here... -But... -You can add some colors. What about a warning message? -**[warning [WARNING] The color depends on the theme. Could look normal too] -What about an error message? -**[error [ERROR] This is not the error you are looking for] -``` # Documenting Features @@ -94,4 +61,4 @@ This page describes my cool feature. You can use my cool feature to make coffee |KC_SUGAR||Order Sugar| ``` -Place your documentation into `docs/feature_.md`, and add that file to the appropriate place in `docs/_summary.md`. If you have added any keycodes be sure to add them to `docs/keycodes.md` with a link back to your feature page. +Place your documentation into `docs/feature_.md`, and add that file to the appropriate place in `docs/_sidebar.md`. If you have added any keycodes be sure to add them to `docs/keycodes.md` with a link back to your feature page. diff --git a/docs/eclipse.md b/docs/eclipse.md index c51df522df82..2cb90647a680 100644 --- a/docs/eclipse.md +++ b/docs/eclipse.md @@ -1,6 +1,6 @@ # Setting up Eclipse for QMK Development -[Eclipse](https://en.wikipedia.org/wiki/Eclipse_(software)) is an open-source [Integrated Development Environment](https://en.wikipedia.org/wiki/Integrated_development_environment) (IDE) widely used for Java development, but with an extensible plugin system that allows to customize it for other languages and usages. +[Eclipse][1] is an open-source [Integrated Development Environment](https://en.wikipedia.org/wiki/Integrated_development_environment) (IDE) widely used for Java development, but with an extensible plugin system that allows to customize it for other languages and usages. Using an IDE such as Eclipse provides many advantages over a plain text editor, such as: * intelligent code completion @@ -17,7 +17,7 @@ Note that this set-up has been tested on Ubuntu 16.04 only for the moment. # Prerequisites ## Build Environment -Before starting, you must have followed the [Getting Started](home.md#getting-started) section corresponding to your system. In particular, you must have been able to build the firmware with [the `make` command](../#the-make-command). +Before starting, you must have followed the [Getting Started](README.md#getting-started) section corresponding to your system. In particular, you must have been able to build the firmware with [the `make` command](../#the-make-command). ## Java Eclipse is a Java application, so you will need to install Java 8 or more recent to be able to run it. You may choose between the JRE or the JDK, the latter being useful if you intend to do Java development. @@ -84,3 +84,5 @@ We will now configure a make target that cleans the project and builds the keyma 7. (Optional) Toggle the Hide Empty Folders icon button above the targets tree to only show your build target. 8. Double-click the build target you created to trigger a build. 9. Select the Console view at the bottom to view the running build. + + [1]: https://en.wikipedia.org/wiki/Eclipse_(software) \ No newline at end of file diff --git a/docs/faq_build.md b/docs/faq_build.md index d38ca69d0d85..2d1b91b60d82 100644 --- a/docs/faq_build.md +++ b/docs/faq_build.md @@ -1,40 +1,25 @@ # Frequently Asked Build Questions -This page covers questions about building QMK. If you have not yet you should read the [Build Environment Setup](getting_started_build_tools.md) and [Make Instructions](getting_started_make_guide.md) guides. +This page covers questions about building QMK. If you haven't yet done so, you should read the [Build Environment Setup](getting_started_build_tools.md) and [Make Instructions](getting_started_make_guide.md) guides. ## Can't Program on Linux -You will need proper permission to operate a device. For Linux users see udev rules below. Easy way is to use `sudo` command, if you are not familiar with this command check its manual with `man sudo` or this page on line. +You will need proper permissions to operate a device. For Linux users, see the instructions regarding `udev` rules, below. If you have issues with `udev`, a work-around is to use the `sudo` command. If you are not familiar with this command, check its manual with `man sudo` or [see this webpage](https://linux.die.net/man/8/sudo). -In short when your controller is ATMega32u4, +An example of using `sudo`, when your controller is ATMega32u4: $ sudo dfu-programmer atmega32u4 erase --force $ sudo dfu-programmer atmega32u4 flash your.hex $ sudo dfu-programmer atmega32u4 reset -or just +or just: $ sudo make ::dfu -But to run `make` with root privilege is not good idea. Use former method if possible. - -## WINAVR is Obsolete -It is no longer recommended and may cause some problem. -See [TMK Issue #99](https://github.com/tmk/tmk_keyboard/issues/99). - -## USB VID and PID -You can use any ID you want with editing `config.h`. Using any presumably unused ID will be no problem in fact except for very low chance of collision with other product. - -Most boards in QMK use `0xFEED` as the vendor ID. You should look through other keyboards to make sure you pick a unique Product ID. - -Also see this. -https://github.com/tmk/tmk_keyboard/issues/150 - -You can buy a really unique VID:PID here. I don't think you need this for personal use. -- http://www.obdev.at/products/vusb/license.html -- http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1 +Note that running `make` with `sudo` is generally *not* a good idea, and you should use one of the former methods, if possible. ## Linux `udev` Rules -On Linux you need proper privilege to access device file of MCU, you'll have to use `sudo` when flashing firmware. You can circumvent this with placing these files in `/etc/udev/rules.d/`. +On Linux, you'll need proper privileges to access the MCU. You can either use +`sudo` when flashing firmware, or place these files in `/etc/udev/rules.d/`. **/etc/udev/rules.d/50-atmel-dfu.rules:** ``` @@ -52,6 +37,21 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", MODE:="066 SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666" ``` +## WINAVR is Obsolete +It is no longer recommended and may cause some problem. +See [TMK Issue #99](https://github.com/tmk/tmk_keyboard/issues/99). + +## USB VID and PID +You can use any ID you want with editing `config.h`. Using any presumably unused ID will be no problem in fact except for very low chance of collision with other product. + +Most boards in QMK use `0xFEED` as the vendor ID. You should look through other keyboards to make sure you pick a unique Product ID. + +Also see this. +https://github.com/tmk/tmk_keyboard/issues/150 + +You can buy a really unique VID:PID here. I don't think you need this for personal use. +- http://www.obdev.at/products/vusb/license.html +- http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1 ## Cortex: `cstddef: No such file or directory` GCC 4.8 of Ubuntu 14.04 had this problem and had to update to 4.9 with this PPA. @@ -61,7 +61,6 @@ https://github.com/tmk/tmk_keyboard/issues/212 https://github.com/tmk/tmk_keyboard/wiki/mbed-cortex-porting#compile-error-cstddef https://developer.mbed.org/forum/mbed/topic/5205/ - ## `clock_prescale_set` and `clock_div_1` Not Available Your toolchain is too old to support the MCU. For example WinAVR 20100110 doesn't support ATMega32u2. @@ -89,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/faq_keymap.md b/docs/faq_keymap.md index 0fed0445f2c8..674d207aa95c 100644 --- a/docs/faq_keymap.md +++ b/docs/faq_keymap.md @@ -14,6 +14,15 @@ There are 3 standard keyboard layouts in use around the world- ANSI, ISO, and JI ![Keyboard Layout Image](https://i.imgur.com/45m4mRf.png) +## Some Of My Keys Are Swapped Or Not Working + +QMK has two features, Bootmagic and Command, which allow you to change the behavior of your keyboard on the fly. This includes, but is not limited to, swapping Ctrl/Caps, disabling Gui, swapping Alt/Gui, swapping Backspace/Backslash, disabling all keys, and other behavioral modifications. + +As a quick fix try holding down `Space`+`Backspace` while you plug in your keyboard. This will reset the stored settings on your keyboard, returning those keys to normal operation. If that doesn't work look here: + +* [Bootmagic](feature_bootmagic.md) +* [Command](feature_command.md) + ## The Menu Key Isn't Working The key found on most modern keyboards that is located between `KC_RGUI` and `KC_RCTL` is actually called `KC_APP`. This is because when that key was invented there was already a key named `MENU` in the relevant standards, so MS chose to call that the `APP` key. @@ -22,13 +31,13 @@ The key found on most modern keyboards that is located between `KC_RGUI` and `KC Use keycode for Print Screen(`KC_PSCREEN` or `KC_PSCR`) instead of `KC_SYSREQ`. Key combination of 'Alt + Print Screen' is recognized as 'System request'. See [issue #168](https://github.com/tmk/tmk_keyboard/issues/168) and -- http://en.wikipedia.org/wiki/Magic_SysRq_key -- http://en.wikipedia.org/wiki/System_request +* http://en.wikipedia.org/wiki/Magic_SysRq_key +* http://en.wikipedia.org/wiki/System_request ## Power Key Doesn't Work Use `KC_PWR` instead of `KC_POWER` or vice versa. -- `KC_PWR` works with Windows and Linux, not with OSX. -- `KC_POWER` works with OSX and Linux, not with Windows. +* `KC_PWR` works with Windows and Linux, not with OSX. +* `KC_POWER` works with OSX and Linux, not with Windows. More info: http://geekhack.org/index.php?topic=14290.msg1327264#msg1327264 @@ -40,9 +49,9 @@ https://github.com/tmk/tmk_keyboard/issues/67 Modifier keys or layers can be stuck unless layer switching is configured properly. For Modifier keys and layer actions you have to place `KC_TRANS` on same position of destination layer to unregister the modifier key or return to previous layer on release event. -- https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#31-momentary-switching -- http://geekhack.org/index.php?topic=57008.msg1492604#msg1492604 -- https://github.com/tmk/tmk_keyboard/issues/248 +* https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#31-momentary-switching +* http://geekhack.org/index.php?topic=57008.msg1492604#msg1492604 +* https://github.com/tmk/tmk_keyboard/issues/248 ## Mechanical Lock Switch Support @@ -66,17 +75,17 @@ See this post for example **MACRO** code. http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p195620 On **Windows** you can use `AltGr` key or **Alt code**. -- http://en.wikipedia.org/wiki/AltGr_key -- http://en.wikipedia.org/wiki/Alt_code +* http://en.wikipedia.org/wiki/AltGr_key +* http://en.wikipedia.org/wiki/Alt_code On **Mac** OS defines `Option` key combinations. -- http://en.wikipedia.org/wiki/Option_key#Alternative_keyboard_input +* http://en.wikipedia.org/wiki/Option_key#Alternative_keyboard_input On **Xorg** you can use `compose` key, instead. -- http://en.wikipedia.org/wiki/Compose_key +* http://en.wikipedia.org/wiki/Compose_key And see this for **Unicode** input. -- http://en.wikipedia.org/wiki/Unicode_input +* http://en.wikipedia.org/wiki/Unicode_input ## Apple/Mac Keyboard `Fn` diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index 0e22154f624a..aeb7ce1bf48a 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -19,13 +19,15 @@ Currently, the keycodes able to used with these functions are limited to the [Ba # Switching and Toggling Layers -These functions allow you to activate layers in various ways. +These functions allow you to activate layers in various ways. Note that layers are not generally independent layouts -- multiple layers can be activated at once, and it's typical for layers to use `KC_TRNS` to allow keypresses to pass through to lower layers. For a detailed explanation of layers, see [Keymap Overview](keymap.md#keymap-and-layers) -* `MO(layer)` - momentary switch to *layer*. As soon as you let go of the key, the layer is deactivated and you pop back out to the previous layer. -* `LT(layer, kc)` - momentary switch to *layer* when held, and *kc* when tapped. -* `TG(layer)` - toggles a layer on or off. -* `TO(layer)` - Goes to a layer. This code is special, because it lets you go either up or down the stack -- just goes directly to the layer you want. So while other codes only let you go _up_ the stack (from layer 0 to layer 3, for example), `TO(2)` is going to get you to layer 2, no matter where you activate it from -- even if you're currently on layer 5. This gets activated on keydown (as soon as the key is pressed). -* `TT(layer)` - Layer Tap-Toggle. If you hold the key down, the layer becomes active, and then deactivates when you let go. And if you 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. +* `DF(layer)` - switches the default layer. The default layer is the always-active base layer that other layers stack on top of. See below for more about the default layer. This might be used to switch from QWERTY to Dvorak layout. (Note that this is a temporary switch that only persists until the keyboard loses power. To modify the default layer in a persistent way requires deeper customization, such as calling the `set_single_persistent_default_layer` function inside of [process_record_user](custom_quantum_functions.md#programming-the-behavior-of-any-keycode).) +* `MO(layer)` - momentarily activates *layer*. As soon as you let go of the key, the layer is deactivated. +* `LM(layer, mod)` - Momentarily activates *layer* (like `MO`), but with modifier(s) *mod* active. Only supports layers 0-15 and the left modifiers. +* `LT(layer, kc)` - momentarily activates *layer* when held, and sends *kc* when tapped. +* `TG(layer)` - toggles *layer*, activating it if it's inactive and vice versa +* `TO(layer)` - activates *layer* and de-activates all other layers (except your default layer). This function is special, because instead of just adding/removing one layer to your active layer stack, it will completely replace your current active layers, uniquely allowing you to replace higher layers with a lower one. This is activated on keydown (as soon as the key is pressed). +* `TT(layer)` - Layer Tap-Toggle. If you hold the key down, *layer* is activated, and then is de-activated when you let go (like `MO`). If you repeatedly tap it, the layer will be toggled on or off (like `TG`). It needs 5 taps by default, but you can change this by defining `TAPPING_TOGGLE` -- for example, `#define TAPPING_TOGGLE 2` to toggle on just two taps. # Working with Layers @@ -35,9 +37,9 @@ Care must be taken when switching layers, it's possible to lock yourself into a If you are just getting started with QMK you will want to keep everything simple. Follow these guidelines when setting up your layers: -* Setup layer 0 as your "base" layer. This is your normal typing layer, and could be whatever layout you want (qwerty, dvorak, colemak, etc.) +* Setup layer 0 as your default, "base" layer. This is your normal typing layer, and could be whatever layout you want (qwerty, dvorak, colemak, etc.). It's important to set this as the lowest layer since it will typically have most or all of the keyboard's keys defined, so would block other layers from having any effect if it were above them (i.e., had a higher layer number). * Arrange your layers in a "tree" layout, with layer 0 as the root. Do not try to enter the same layer from more than one other layer. -* Never try to stack a higher numbered layer on top of a lower numbered layer. Doing so is tricky and error prone. +* In a layer's keymap, only reference higher-numbered layers. Because layers are processed from the highest-numbered (topmost) active layer down, modifying the state of lower layers can be tricky and error-prone. ### Intermediate Users @@ -49,7 +51,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 @@ -116,7 +118,7 @@ These are the values you can use for the `mod` in `MT()` and `OSM()`: * MOD_HYPR * MOD_MEH -These can also be combined like `MOD_LCTL | MOD_LSFT` e.g. `MT(MOD_LCTL | MOD_LSFT, KC_ESC)` which would activate Control and Shift when held, and send Escape when tapped. Note however, that you cannot mix right and left side modifiers. +These can also be combined like `MOD_LCTL | MOD_LSFT` e.g. `MT(MOD_LCTL | MOD_LSFT, KC_ESC)` which would activate Control and Shift when held, and send Escape when tapped. We've added shortcuts to make common modifier/tap (mod-tap) mappings more compact: @@ -129,6 +131,10 @@ We've added shortcuts to make common modifier/tap (mod-tap) mappings more compac * `LCAG_T(kc)` - is CtrlAltGui when held and *kc* when tapped * `MEH_T(kc)` - is like Hyper, but not as cool -- does not include the Cmd/Win key, so just sends Alt+Ctrl+Shift. +?> Due to the way that keycodes are structured, any modifiers specified as part of `kc`, such as `LCTL()` or `KC_LPRN`, will only activate when held instead of tapped. + +?> Additionally, if there is at least one right modifier, any other modifiers will turn into their right equivalents, so it is not possible to "mix and match" the two. + # One Shot Keys One shot keys are keys that remain active until the next key is pressed, and then are released. This allows you to type keyboard combinations without pressing more than one key at a time. These keys are usually called "Sticky keys" or "Dead keys". @@ -147,9 +153,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). + +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 +# 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_audio.md b/docs/feature_audio.md index 6b991a9afd9f..50e389605c1b 100644 --- a/docs/feature_audio.md +++ b/docs/feature_audio.md @@ -1,6 +1,17 @@ # Audio -Your keyboard can make sounds! If you've got a Planck, Preonic, or basically any AVR keyboard that allows access to the C6 or B5 port (`#define C6_AUDIO` and/or `#define B5_AUDIO`), you can hook up a simple speaker and make it beep. You can use those beeps to indicate layer transitions, modifiers, special keys, or just to play some funky 8bit tunes. +Your keyboard can make sounds! If you've got a Planck, Preonic, or basically any AVR keyboard that allows access to certain PWM-capable pins, you can hook up a simple speaker and make it beep. You can use those beeps to indicate layer transitions, modifiers, special keys, or just to play some funky 8bit tunes. + +Up to two simultaneous audio voices are supported, one driven by timer 1 and another driven by timer 3. The following pins can be defined as audio outputs in config.h: +Timer 1: +`#define B5_AUDIO` +`#define B6_AUDIO` +`#define B7_AUDIO` + +Timer 3: +`#define C4_AUDIO` +`#define C5_AUDIO` +`#define C6_AUDIO` If you add `AUDIO_ENABLE = yes` to your `rules.mk`, there's a couple different sounds that will automatically be enabled without any other configuration: @@ -78,10 +89,58 @@ By default, `MUSIC_MASK` is set to `keycode < 0xFF` which means keycodes less th Which will capture all keycodes - be careful, this will get you stuck in music mode until you restart your keyboard! +For a more advanced way to control which keycodes should still be processed, you can use `music_mask_kb(keycode)` in `.c` and `music_mask_user(keycode)` in your `keymap.c`: + + bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } + } + +Things that return false are not part of the mask, and are always processed. + The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, add something like this to your `config.h`: #define PITCH_STANDARD_A 432.0f +You can completely disable Music Mode as well. This is useful, if you're pressed for space on your controller. To disable it, add this to your `config.h`: + + #define NO_MUSIC_MODE + +## Faux Click + +This adds a click sound each time you hit a button, to simulate click sounds from the keyboard. And the sounds are slightly different for each keypress, so it doesn't sound like a single long note, if you type rapidly. + +* `CK_TOGG` - Toggles the status (will play sound if enabled) +* `CK_RST` - Resets the frequency to the default state +* `CK_UP` - Increases the frequency of the clicks +* `CK_DOWN` - Decreases the frequency of the clicks + +The feature is disabled by default, to save space. To enable it, add this to your `config.h`: + + #define AUDIO_CLICKY + +Additionally, even when enabled, the feature is not enabled by default, so you would need to turn it on first. And since we don't use EEPROM to store the setting (yet), you can default this to on by adding this to your `config.h`: + + #define AUDIO_CLICKY_ON + +You can configure the default, min and max frequencies, the stepping and built in randomness by defining these values: + +| Option | Default Value | Description | +|--------|---------------|-------------| +| `AUDIO_CLICKY_FREQ_DEFAULT` | 440.0f | Sets the default/starting audio frequency for the clicky sounds. | +| `AUDIO_CLICKY_FREQ_MIN` | 65.0f | Sets the lowest frequency (under 60f are a bit buggy). | +| `AUDIO_CLICKY_FREQ_MAX` | 1500.0f | Sets the the highest frequency. Too high may result in coworkers attacking you. | +| `AUDIO_CLICKY_FREQ_FACTOR` | 1.18921f| Sets the stepping of UP/DOWN key codes. | +| `AUDIO_CLICKY_FREQ_RANDOMNESS` | 0.05f | Sets a factor of randomness for the clicks, Setting this to `0f` will make each click identical. | + + + + ## MIDI Functionality This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile. diff --git a/docs/feature_auto_shift.md b/docs/feature_auto_shift.md index f6c248744e94..9b4b29624901 100644 --- a/docs/feature_auto_shift.md +++ b/docs/feature_auto_shift.md @@ -1,7 +1,7 @@ # Auto Shift: Why Do We Need a Shift Key? Tap a key and you get its character. Tap a key, but hold it *slightly* longer -and you get its shifted state. Viola! No shift key needed! +and you get its shifted state. VoilĂ ! No shift key needed! ## Why Auto Shift? @@ -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 @@ -79,10 +88,7 @@ occasion. This is simply due to habit and holding some keys a little longer than others. Once you find this value, work on tapping your problem keys a little quicker than normal and you will be set. -{% hint style='info' %} -Auto Shift has three special keys that can help you get this value right very -quick. See "Auto Shift Setup" for more details! -{% endhint %} +?> Auto Shift has three special keys that can help you get this value right very quick. See "Auto Shift Setup" for more details! ### NO_AUTO_SHIFT_SPECIAL (simple define) @@ -112,7 +118,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_backlight.md b/docs/feature_backlight.md index 97421c043297..5336e85266e2 100644 --- a/docs/feature_backlight.md +++ b/docs/feature_backlight.md @@ -10,18 +10,18 @@ These keycodes control the backlight. Most keyboards use this for single color i |---------|------------------------------------------| |`BL_TOGG`|Turn the backlight on or off | |`BL_STEP`|Cycle through backlight levels | -|`BL_ON` |Set backlight to max brightness | -|`BL_OFF` |Turn backlight off | -|`BL_INC` |Increase backlight level | -|`BL_DEC` |Decrease backlight level | -|`BL_BRTG`|Toggle backlight breathing | +|`BL_ON` |Set the backlight to max brightness | +|`BL_OFF` |Turn the backlight off | +|`BL_INC` |Increase the backlight level | +|`BL_DEC` |Decrease the backlight level | +|`BL_BRTG`|Toggle backlight breathing | Note that for backlight breathing, you need to have `#define BACKLIGHT_BREATHING` in your config.h. ## Configuration Options in `config.h` * `BACKLIGHT_PIN B7` defines the pin that controlls the LEDs. Unless you design your own keyboard, you don't need to set this. -* `BACKLIGHT_LEVELS 3` defines the number of brightness levels (excluding OFF). +* `BACKLIGHT_LEVELS 3` defines the number of brightness levels (maximum 15 excluding off). * `BACKLIGHT_BREATHING` if defined, enables backlight breathing. Note that this is only available if `BACKLIGHT_PIN` is B5, B6 or B7. * `BREATHING_PERIOD 6` defines the length of one backlight "breath" in seconds. diff --git a/docs/feature_bootmagic.md b/docs/feature_bootmagic.md index 037830c4df35..beef6c467e96 100644 --- a/docs/feature_bootmagic.md +++ b/docs/feature_bootmagic.md @@ -1,29 +1,89 @@ -# Bootmagic - - - -## Bootmagic Keycodes - -Shortcuts for bootmagic options. You can use these even when bootmagic is off. - -|Key |Aliases |Description | -|----------------------------------|---------|------------------------------------| -|`MAGIC_SWAP_CONTROL_CAPSLOCK` | |Swap Left Control and Caps Lock | -|`MAGIC_CAPSLOCK_TO_CONTROL` | |Treat Caps Lock as Control | -|`MAGIC_SWAP_LALT_LGUI` | |Swap Left Alt and GUI | -|`MAGIC_SWAP_RALT_RGUI` | |Swap Right Alt and GUI | -|`MAGIC_NO_GUI` | |Disable the GUI key | -|`MAGIC_SWAP_GRAVE_ESC` | |Swap ` and Escape | -|`MAGIC_SWAP_BACKSLASH_BACKSPACE` | |Swap Backslash and Backspace | -|`MAGIC_HOST_NKRO` | |Force NKRO on | -|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides | -|`MAGIC_UNSWAP_CONTROL_CAPSLOCK` | |Unswap Left Control and Caps Lock | -|`MAGIC_UNCAPSLOCK_TO_CONTROL` | |Stop treating CapsLock as Control | -|`MAGIC_UNSWAP_LALT_LGUI` | |Unswap Left Alt and GUI | -|`MAGIC_UNSWAP_RALT_RGUI` | |Unswap Right Alt and GUI | -|`MAGIC_UNNO_GUI` | |Enable the GUI key | -|`MAGIC_UNSWAP_GRAVE_ESC` | |Unswap ` and Escape| -|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`| |Unswap Backslash and Backspace | -|`MAGIC_UNHOST_NKRO` | |Force NKRO off | -|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Left Alt and GUI | -|`MAGIC_TOGGLE_NKRO` | |Turn NKRO on or off | +# Bootmagic and Magic Keycodes + +There are 3 separate but related features that allow you to change the behavior of your keyboard without reflashing. While each of them have similar functionality you access that functionality in different ways depending on how your keyboard is configured. + +Bootmagic is a system for configuring your keyboard while it initializes. To trigger a Bootmagic command you hold down the bootmagic key (`KC_SPACE` on most keyboards) and one or more command keys. + +Bootmagic Keycodes allow you to access the Bootmagic functionality after your keyboard has initialized. To use Bootmagic Keycodes you assign keycodes starting with `MAGIC_`, much in the same way you define any other key. + +Command is a feature that allows you to control different aspects of your keyboard. Command used to be called Magic. Command is typically accessed by holding Left and Right Shift at the same time, although that can be customized. While it shares some functionality with Bootmagic it also allows you to access functionality that Bootmagic does not. For more information see the [Command](feature_command.md) documentation page. + +## Enabling Bootmagic + +Bootmagic is disabled by default. To use Bootmagic you need to enable it in your `rules.mk` file: + + BOOTMAGIC_ENABLE = yes + +## Bootmagic Hotkeys and Keycodes + +This table describes the default Hotkeys for Bootmagic and the Keycodes for Magic. These may be overriden at the Keyboard or Keymap level. Some functionality is not available in both methods. + +To use the Hotkey hold down `BOOTMAGIC_KEY_SALT` (`KC_SPACE` by default) and the Hotkey while plugging in your keyboard. To use the Keycode assign that keycode to a layer. For example, if you hold down Space+B while plugging in most keyboards, you will enter bootloader mode. + +|Hotkey |Keycode |Description | +|-----------|----------------------------------|--------------------------------------------------------| +|`ESC` | |Skip bootmagic and saved eeprom configuration | +|`B` |`RESET` |Enter bootloader instead of firmware | +|`D` |`DEBUG` |Enable debugging (writes messages to serial) | +|`X` | |Enable matrix debugging | +|`K` | |Enable keyboard debugging | +|`M` | |Enable mouse debugging | +|`BACKSPACE`| |Clear the saved settings from flash | +|`CAPSLOCK` |`MAGIC_CAPSLOCK_TO_CONTROL` |Treat `Capslock` as `Control` | +| |`MAGIC_UNCAPSLOCK_TO_CONTROL` |Stop treating CapsLock as Control | +|`LCTRL` |`MAGIC_SWAP_CONTROL_CAPSLOCK` |Swap `Control` and `Capslock` | +| |`MAGIC_UNSWAP_CONTROL_CAPSLOCK` |Unswap Left Control and Caps Lock | +| |`MAGIC_SWAP_ALT_GUI` |Swap Alt and GUI on both sides | +| |`MAGIC_UNSWAP_ALT_GUI` |Unswap Left Alt and GUI | +|`LALT` |`MAGIC_SWAP_LALT_LGUI` |Swap Left `Alt` and `GUI`, e.g. for OSX Opt and Cmd | +| |`MAGIC_UNSWAP_LALT_LGUI` |Unswap Left Alt and GUI | +|`RALT` |`MAGIC_SWAP_RALT_RGUI` |Swap Right `Alt` and `GUI` | +| |`MAGIC_UNSWAP_RALT_RGUI` |Unswap Right Alt and GUI | +|`LGUI` |`MAGIC_NO_GUI` |Disable GUI key - e.g. disable Windows key during gaming| +| |`MAGIC_UNNO_GUI` |Enable the GUI key | +|`GRAVE` |`MAGIC_SWAP_GRAVE_ESC` |Swap `\`~` and `ESC` | +| |`MAGIC_UNSWAP_GRAVE_ESC` |Unswap `\`~` and Escape | +|`BACKSLASH`|`MAGIC_SWAP_BACKSLASH_BACKSPACE` |Swap Blackslash and Backspace | +| |`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`|Unswap Backslash and Backspace | +|`N` |`MAGIC_HOST_NKRO` |Force N-Key Rollover (NKRO) on | +| |`MAGIC_UNHOST_NKRO` |Force NKRO off | +| |`MAGIC_TOGGLE_NKRO` |Toggle NKRO on or off | +|`0` |`DF(0)` |Make Layer 0 the default layer at bootup | +|`1` |`DF(1)` |Make Layer 1 the default layer at bootup | +|`2` |`DF(2)` |Make Layer 2 the default layer at bootup | +|`3` |`DF(3)` |Make Layer 3 the default layer at bootup | +|`4` |`DF(4)` |Make Layer 4 the default layer at bootup | +|`5` |`DF(5)` |Make Layer 5 the default layer at bootup | +|`6` |`DF(6)` |Make Layer 6 the default layer at bootup | +|`7` |`DF(7)` |Make Layer 7 the default layer at bootup | + +## Bootmagic Configuration + +When setting up your keyboard and/or keymap there are a number of `#define`s that control the behavior of Bootmagic. To use these put them in your `config.h`, either at the keyboard or keymap level. + +|Define |Default|Description | +|-------|-------|------------| +|`BOOTMAGIC_KEY_SALT`|`KC_SPACE`|The key to hold down to trigger Bootmagic during initialization.| +|`BOOTMAGIC_KEY_SKIP`|`KC_ESC`|The Hotkey to ignore saved eeprom configuration.| +|`BOOTMAGIC_KEY_EEPROM_CLEAR`|`KC_BSPACE`|The hotkey to clear the saved eeprom configuration.| +|`BOOTMAGIC_KEY_BOOTLOADER`|`KC_B`|The hotkey to enter the bootloader.| +|`BOOTMAGIC_KEY_DEBUG_ENABLE`|`KC_D`|The hotkey to enable debug mode.| +|`BOOTMAGIC_KEY_DEBUG_MATRIX`|`KC_X`|The hotkey to enable matrix debugging mode.| +|`BOOTMAGIC_KEY_DEBUG_KEYBOARD`|`KC_K`|The hotkey to enable keyboard debugging mode.| +|`BOOTMAGIC_KEY_DEBUG_MOUSE`|`KC_M`|The hotkey to enable mouse debugging mode.| +|`BOOTMAGIC_KEY_SWAP_CONTROL_CAPSLOCK`|`KC_LCTRL`|| +|`BOOTMAGIC_KEY_CAPSLOCK_TO_CONTROL`|`KC_CAPSLOCK`|| +|`BOOTMAGIC_KEY_SWAP_LALT_LGUI`|`KC_LALT`|| +|`BOOTMAGIC_KEY_SWAP_RALT_RGUI`|`KC_RALT`|| +|`BOOTMAGIC_KEY_NO_GUI`|`KC_LGUI`|| +|`BOOTMAGIC_KEY_SWAP_GRAVE_ESC`|`KC_GRAVE`|| +|`BOOTMAGIC_KEY_SWAP_BACKSLASH_BACKSPACE`|`KC_BSLASH`|| +|`BOOTMAGIC_HOST_NKRO`|`KC_N`|| +|`BOOTMAGIC_KEY_DEFAULT_LAYER_0`|`KC_0`|Hotkey to set Layer 0 as the default layer| +|`BOOTMAGIC_KEY_DEFAULT_LAYER_1`|`KC_1`|Hotkey to set Layer 1 as the default layer| +|`BOOTMAGIC_KEY_DEFAULT_LAYER_2`|`KC_2`|Hotkey to set Layer 2 as the default layer| +|`BOOTMAGIC_KEY_DEFAULT_LAYER_3`|`KC_3`|Hotkey to set Layer 3 as the default layer| +|`BOOTMAGIC_KEY_DEFAULT_LAYER_4`|`KC_4`|Hotkey to set Layer 4 as the default layer| +|`BOOTMAGIC_KEY_DEFAULT_LAYER_5`|`KC_5`|Hotkey to set Layer 5 as the default layer| +|`BOOTMAGIC_KEY_DEFAULT_LAYER_6`|`KC_6`|Hotkey to set Layer 6 as the default layer| +|`BOOTMAGIC_KEY_DEFAULT_LAYER_7`|`KC_7`|Hotkey to set Layer 7 as the default layer| diff --git a/docs/feature_command.md b/docs/feature_command.md new file mode 100644 index 000000000000..ad987aaf6034 --- /dev/null +++ b/docs/feature_command.md @@ -0,0 +1,52 @@ +# Command (Formerly known as Magic) + +Command is a way to change your keyboard's behavior without having to flash or unplug it to use [Bootmagic](feature_bootmagic.md). There is a lot of overlap between this functionality and the [Bootmagic Keycodes](feature_bootmagic.md). Whenever possible we encourage you to use that functionality instead of Command. + +## Enabling Command + +By default Command is disabled. You can enable it in your `rules.mk` file: + + COMMAND_ENABLE = yes + +## Usage + +To use Command you hold down the key combination defined by `IS_COMMAND`. By default that combination is both shift keys. While holding the key combination press the key corresponding to the command you want. + +For example, to write the current QMK version to the QMK Toolbox console, you can press `Left Shift`+`Right Shift`+`V`. + +## Configuration + +The following values can be defined in `config.h` to control the behavior of Command. + +|Define |Default | Description | +|-------|--------|-------------| +|`IS_COMMAND()` |`(keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))`|Key combination to activate Command| +|`MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS` |`true` |Do layer switching with Function row| +|`MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS` |`true` |Do layer switching with number keys.| +|`MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM`|`false` |Do layer switching with custom keys (`MAGIC_KEY_LAYER0..9` below.)| +|`MAGIC_KEY_HELP1` |`H` |Show help.| +|`MAGIC_KEY_HELP2` |`SLASH` |Show help.| +|`MAGIC_KEY_DEBUG` |`D` |Turn on debug mode.| +|`MAGIC_KEY_DEBUG_MATRIX` |`X` |Turn on matrix debugging.| +|`MAGIC_KEY_DEBUG_KBD` |`K` |Turn on keyboard debugging.| +|`MAGIC_KEY_DEBUG_MOUSE` |`M` |Turn on mouse debugging.| +|`MAGIC_KEY_VERSION` |`V` |Write the QMK version to the console| +|`MAGIC_KEY_STATUS` |`S` |Show the current keyboard status| +|`MAGIC_KEY_CONSOLE` |`C` |Enable the Command Console| +|`MAGIC_KEY_LAYER0_ALT1` |`ESC` |Alternate access to layer 0| +|`MAGIC_KEY_LAYER0_ALT2` |`GRAVE` |Alternate access to layer 0| +|`MAGIC_KEY_LAYER0` |`0` |Change default layer to 0| +|`MAGIC_KEY_LAYER1` |`1` |Change default layer to 1| +|`MAGIC_KEY_LAYER2` |`2` |Change default layer to 2| +|`MAGIC_KEY_LAYER3` |`3` |Change default layer to 3| +|`MAGIC_KEY_LAYER4` |`4` |Change default layer to 4| +|`MAGIC_KEY_LAYER5` |`5` |Change default layer to 5| +|`MAGIC_KEY_LAYER6` |`6` |Change default layer to 6| +|`MAGIC_KEY_LAYER7` |`7` |Change default layer to 7| +|`MAGIC_KEY_LAYER8` |`8` |Change default layer to 8| +|`MAGIC_KEY_LAYER9` |`9` |Change default layer to 9| +|`MAGIC_KEY_BOOTLOADER` |`PAUSE` |Exit keyboard and enter bootloader| +|`MAGIC_KEY_LOCK` |`CAPS` |Lock the keyboard so nothing can be typed| +|`MAGIC_KEY_EEPROM` |`E` |Erase EEPROM settings| +|`MAGIC_KEY_NKRO` |`N` |Toggle NKRO on/off| +|`MAGIC_KEY_SLEEP_LED` |`Z` |Toggle LED when computer is sleeping on/off| diff --git a/docs/feature_layouts.md b/docs/feature_layouts.md index 24c42c09feb1..bfae92044018 100644 --- a/docs/feature_layouts.md +++ b/docs/feature_layouts.md @@ -35,10 +35,12 @@ New names should try to stick to the standards set by existing layouts, and can ## Supporting a Layout -For a keyboard to support a layout, the variable (`[a-z0-9_]`) must be defined in it's `.h`, and match the number of arguments/keys (and preferably the physical layout): +For a keyboard to support a layout, the variable must be defined in it's `.h`, and match the number of arguments/keys (and preferably the physical layout): #define LAYOUT_60_ansi KEYMAP_ANSI +The name of the layout must match this regex: `[a-z0-9_]+` + The folder name must be added to the keyboard's `rules.mk`: LAYOUTS = 60_ansi diff --git a/docs/feature_leader_key.md b/docs/feature_leader_key.md index fb74bf7c8b04..46633b28703d 100644 --- a/docs/feature_leader_key.md +++ b/docs/feature_leader_key.md @@ -17,14 +17,16 @@ void matrix_scan_user(void) { leader_end(); SEQ_ONE_KEY(KC_F) { - register_code(KC_S); - unregister_code(KC_S); + // Anything you can do in a macro. + SEND_STRING("QMK is awesome."); } - SEQ_TWO_KEYS(KC_A, KC_S) { - register_code(KC_H); - unregister_code(KC_H); + SEQ_TWO_KEYS(KC_D, KC_D) { + SEND_STRING(SS_LCTRL("a")SS_LCTRL("c")); } - SEQ_THREE_KEYS(KC_A, KC_S, KC_D) { + SEQ_THREE_KEYS(KC_D, KC_D, KC_S) { + SEND_STRING("https://start.duckduckgo.com"SS_TAP(X_ENTER)); + } + SEQ_TWO_KEYS(KC_A, KC_S) { register_code(KC_LGUI); register_code(KC_S); unregister_code(KC_S); @@ -34,4 +36,6 @@ void matrix_scan_user(void) { } ``` -As you can see, you have three function. you can use - `SEQ_ONE_KEY` for single-key sequences (Leader followed by just one key), and `SEQ_TWO_KEYS` and `SEQ_THREE_KEYS` for longer sequences. Each of these accepts one or more keycodes as arguments. This is an important point: You can use keycodes from **any layer on your keyboard**. That layer would need to be active for the leader macro to fire, obviously. +As you can see, you have a few function. You can use `SEQ_ONE_KEY` for single-key sequences (Leader followed by just one key), and `SEQ_TWO_KEYS`, `SEQ_THREE_KEYS` up to `SEQ_FIVE_KEYS` for longer sequences. + +Each of these accepts one or more keycodes as arguments. This is an important point: You can use keycodes from **any layer on your keyboard**. That layer would need to be active for the leader macro to fire, obviously. diff --git a/docs/feature_macros.md b/docs/feature_macros.md index dff692bd8f0c..67315308127f 100644 --- a/docs/feature_macros.md +++ b/docs/feature_macros.md @@ -2,9 +2,7 @@ Macros allow you to send multiple keystrokes when pressing just one key. QMK has a number of ways to define and use macros. These can do anything you want: type common phrases for you, copypasta, repetitive game movements, or even help you code. -{% hint style='danger' %} -**Security Note**: While it is possible to use macros to send passwords, credit card numbers, and other sensitive information it is a supremely bad idea to do so. Anyone who gets a hold of your keyboard will be able to access that information by opening a text editor. -{% endhint %} +!> **Security Note**: While it is possible to use macros to send passwords, credit card numbers, and other sensitive information it is a supremely bad idea to do so. Anyone who gets a hold of your keyboard will be able to access that information by opening a text editor. ## The New Way: `SEND_STRING()` & `process_record_user` @@ -22,7 +20,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch(keycode) { case MY_CUSTOM_MACRO: SEND_STRING("QMK is the best thing ever!"); // this is our macro! - return false; break; + return false; } } return true; @@ -56,10 +54,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch(keycode) { case MY_CUSTOM_MACRO: SEND_STRING("QMK is the best thing ever!"); - return false; break; + return false; case MY_OTHER_MACRO: SEND_STRING(SS_LCTRL("ac")); // selects all and copies - return false; break; + return false; } } return true; @@ -97,6 +95,7 @@ There's also a couple of mod shortcuts you can use: * `SS_LGUI(string)` * `SS_LALT(string)` * `SS_LSFT(string)` +* `SS_RALT(string)` These press the respective modifier, send the supplied string and then release the modifier. They can be used like this: @@ -131,9 +130,7 @@ SEND_STRING(".."SS_TAP(X_END)); ## The Old Way: `MACRO()` & `action_get_macro` -{% hint style='info' %} -This is inherited from TMK, and hasn't been updated - it's recommend that you use `SEND_STRING` and `process_record_user` instead. -{% endhint %} +?> This is inherited from TMK, and hasn't been updated - it's recommend that you use `SEND_STRING` and `process_record_user` instead. By default QMK assumes you don't have any macros. To define your macros you create an `action_get_macro()` function. For example: diff --git a/docs/feature_mouse_keys.md b/docs/feature_mouse_keys.md index c4239b4da987..673eafaef5e0 100644 --- a/docs/feature_mouse_keys.md +++ b/docs/feature_mouse_keys.md @@ -5,17 +5,17 @@ Mousekeys is a feature that allows you to emulate a mouse using your keyboard. Y ## Adding Mousekeys to a Keymap -There are two steps to adding Mousekeys support to your keyboard. You must enable support in the Makefile and you must map mouse actions to keys on your keyboard. +There are two steps to adding Mousekeys support to your keyboard. You must enable support in the `rules.mk` file and you must map mouse actions to keys on your keyboard. -### Adding Mousekeys Support in the `Makefile` +### Adding Mousekeys Support in the `rules.mk` -To add support for Mousekeys you simply need to add a single line to your keymap's `Makefile`: +To add support for Mousekeys you simply need to add a single line to your keymap's `rules.mk`: ``` MOUSEKEY_ENABLE = yes ``` -You can see an example here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/keymaps/mouse_keys/Makefile +You can see an example here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/66/keymaps/mouse_keys/rules.mk ### Mapping Mouse Actions to Keyboard Keys @@ -40,7 +40,7 @@ You can use these keycodes within your keymap to map button presses to mouse act |`KC_MS_ACCEL1` |`KC_ACL1`|Set mouse acceleration to 1| |`KC_MS_ACCEL2` |`KC_ACL2`|Set mouse acceleration to 2| -You can see an example in the `_ML` here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/keymaps/mouse_keys/keymap.c#L46 +You can see an example in the `_ML` here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c#L46 ## Configuring the Behavior of Mousekeys diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md new file mode 100644 index 000000000000..5d2db3b9709c --- /dev/null +++ b/docs/feature_rgb_matrix.md @@ -0,0 +1,143 @@ +# RGB Matrix Lighting + +There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`: + + RGB_MATRIX_ENABLE = yes + +Configure the hardware via your `config.h`: + + // This is a 7-bit address, that gets left-shifted and bit 0 + // set to 0 for write, 1 for read (as per I2C protocol) + // The address will vary depending on your wiring: + // 0b1110100 AD <-> GND + // 0b1110111 AD <-> VCC + // 0b1110101 AD <-> SCL + // 0b1110110 AD <-> SDA + #define DRIVER_ADDR_1 0b1110100 + #define DRIVER_ADDR_2 0b1110110 + + #define DRIVER_COUNT 2 + #define DRIVER_1_LED_TOTAL 25 + #define DRIVER_2_LED_TOTAL 24 + #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL + +Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations. + +Define these arrays listing all the LEDs in your `.c`: + + const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + /* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, C1_3, C2_3, C3_3}, + .... + } + +Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3731.pdf). The `driver` is the index of the driver you defined in your `config.h` (`0` or `1` right now). + + const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { + /* {row | col << 4} + * | {x=0..224, y=0..64} + * | | modifier + * | | | */ + {{0|(0<<4)}, {20.36*0, 21.33*0}, 1}, + {{0|(1<<4)}, {20.36*1, 21.33*0}, 1}, + .... + } + +The format for the matrix position used in this array is `{row | (col << 4)}`. The `x` is between (inclusive) 0-224, and `y` is between (inclusive) 0-64. The easiest way to calculate these positions is: + + x = 224 / ( NUMBER_OF_ROWS - 1 ) * ROW_POSITION + y = 64 / (NUMBER_OF_COLS - 1 ) * COL_POSITION + +Where all variables are decimels/floats. + +`modifier` is a boolean, whether or not a certain key is considered a modifier (used in some effects). + +## Keycodes + +All RGB keycodes are currently shared with the RGBLIGHT system: + + * `RGB_TOG` - toggle + * `RGB_MOD` - cycle through modes + * `RGB_HUI` - increase hue + * `RGB_HUD` - decrease hue + * `RGB_SAI` - increase saturation + * `RGB_SAD` - decrease saturation + * `RGB_VAI` - increase value + * `RGB_VAD` - decrease value + * `RGB_SPI` - increase speed effect (no EEPROM support) + * `RGB_SPD` - decrease speed effect (no EEPROM support) + + + * `RGB_MODE_*` keycodes will generally work, but are not currently mapped to the correct effects for the RGB Matrix system + +## RGB Matrix Effects + +These are the effects that are currently available: + + enum rgb_matrix_effects { + RGB_MATRIX_SOLID_COLOR = 1, + RGB_MATRIX_ALPHAS_MODS, + RGB_MATRIX_DUAL_BEACON, + RGB_MATRIX_GRADIENT_UP_DOWN, + RGB_MATRIX_RAINDROPS, + RGB_MATRIX_CYCLE_ALL, + RGB_MATRIX_CYCLE_LEFT_RIGHT, + RGB_MATRIX_CYCLE_UP_DOWN, + RGB_MATRIX_RAINBOW_BEACON, + RGB_MATRIX_RAINBOW_PINWHEELS, + RGB_MATRIX_RAINBOW_MOVING_CHEVRON, + RGB_MATRIX_JELLYBEAN_RAINDROPS, + #ifdef RGB_MATRIX_KEYPRESSES + RGB_MATRIX_SOLID_REACTIVE, + RGB_MATRIX_SPLASH, + RGB_MATRIX_MULTISPLASH, + RGB_MATRIX_SOLID_SPLASH, + RGB_MATRIX_SOLID_MULTISPLASH, + #endif + RGB_MATRIX_EFFECT_MAX + }; + +## Custom layer effects + +Custom layer effects can be done by defining this in your `.c`: + + void rgb_matrix_indicators_kb(void) { + // rgb_matrix_set_color(index, red, green, blue); + } + +A similar function works in the keymap as `rgb_matrix_indicators_user`. + +## Additional `config.h` Options + + #define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) + #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) + #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects + #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended + #define RGB_MATRIX_SKIP_FRAMES 1 // number of frames to skip when displaying animations (0 is full effect) if not defined defaults to 1 + +## EEPROM storage + +The EEPROM for it is currently shared with the RGBLIGHT system (it's generally assumed only one RGB would be used at a time), but could be configured to use its own 32bit address with: + + #define EECONFIG_RGB_MATRIX (uint32_t *)16 + +Where `16` is an unused index from `eeconfig.h`. + +## Suspended state + +To use the suspend feature, add this to your `.c`: + + void suspend_power_down_kb(void) + { + rgb_matrix_set_suspend_state(true); + } + + void suspend_wakeup_init_kb(void) + { + rgb_matrix_set_suspend_state(false); + } diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index f96fa87736bd..5369d2fb7681 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 @@ -86,14 +88,40 @@ const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90}; Look in `rgblights.h` for all available functions, but if you want to control all or some LEDs your goto functions are: ```c -rgblight_disable(); // turn all lights off -rgblight_enable(); // turn lights on, based on their previous state (stored in EEPROM) +// turn all lights off (stored in EEPROM) +rgblight_disable(); +// turn lights on, based on their previous state (stored in EEPROM) +rgblight_enable(); + +// turn all lights off (not stored in EEPROM) +rgblight_disable_noeeprom(); +// turn lights on, based on their previous state (not stored in EEPROM) +rgblight_enable_noeeprom(); + +// where r/g/b is a number from 0..255. Turns all the LEDs to this color (ignores mode, not stored in EEPROM). +rgblight_setrgb(r, g, b); +// HSV color control - h is a value from 0..360 and s/v is a value from 0..255 (stored in EEPROM) +rgblight_sethsv(h, s, v); +// HSV color control - h is a value from 0..360 and s/v is a value from 0..255 (not stored in EEPROM) +rgblight_sethsv_noeeprom(h, s, v); + +// Sets the mode, if rgb animations are enabled (stored in eeprom) +rgblight_mode(x); +// Sets the mode, if rgb animations are enabled (not stored in eeprom) +rgblight_mode_noeeprom(x); +// MODE 1, solid color +// MODE 2-5, breathing +// MODE 6-8, rainbow mood +// MODE 9-14, rainbow swirl +// MODE 15-20, snake +// MODE 21-23, knight +// MODE 24, xmas +// MODE 25-34, static rainbow -rgblight_setrgb(r, g, b); // where r/g/b is a number from 0..255. Turns all the LEDs to this color -rgblight_sethsv(h, s, v); // HSV color control 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 @@ -123,7 +151,7 @@ note: for backwards compatibility, `RGB_SMOD` is an alias for `RGB_MOD`. ## Hardware Modification -![Planck with RGB Underglow](https://raw.githubusercontent.com/qmk/qmk_firmware/master/keyboards/planck/keymaps/yang/planck-with-rgb-underglow.jpg) +![Planck with RGB Underglow](https://raw.githubusercontent.com/qmk/qmk_firmware/3774a7fcdab5544fc787f4c200be05fcd417e31f/keyboards/planck/keymaps/yang/planck-with-rgb-underglow.jpg) Here is a quick demo on Youtube (with NPKC KC60) (https://www.youtube.com/watch?v=VKrpPAHlisY). diff --git a/docs/feature_stenography.md b/docs/feature_stenography.md index 9fb224b5da0e..0b2c82422b66 100644 --- a/docs/feature_stenography.md +++ b/docs/feature_stenography.md @@ -56,6 +56,29 @@ On the display tab click 'Open stroke display'. With Plover disabled you should * [Steno Jig](https://joshuagrams.github.io/steno-jig/) * More resources at the Plover [Learning Stenography](https://github.com/openstenoproject/plover/wiki/Learning-Stenography) wiki +## Interfacing with the code + +The steno code has three interceptible hooks. If you define these functions, they will be called at certain points in processing; if they return true, processing continues, otherwise it's assumed you handled things. + +```C +bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]); +``` + +This function is called when a chord is about to be sent. Mode will be one of `STENO_MODE_BOLT` or `STENO_MODE_GEMINI`. This represents the actual chord that would be sent via whichever protocol. You can modify the chord provided to alter what gets sent. Remember to return true if you want the regular sending process to happen. + +```C +bool process_steno_user(uint16_t keycode, keyrecord_t *record) { return true; } +``` + +This function is called when a keypress has come in, before it is processed. The keycode should be one of `QK_STENO_BOLT`, `QK_STENO_GEMINI`, or one of the `STN_*` key values. + +```C +bool postprocess_steno_user(uint16_t keycode, keyrecord_t *record, steno_mode_t mode, uint8_t chord[6], int8_t pressed); +``` + +This function is called after a key has been processed, but before any decision about whether or not to send a chord. If `IS_PRESSED(record->event)` is false, and `pressed` is 0 or 1, the chord will be sent shortly, but has not yet been sent. This is where to put hooks for things like, say, live displays of steno chords or keys. + + ## Keycode Reference As defined in `keymap_steno.h`. @@ -106,3 +129,4 @@ As defined in `keymap_steno.h`. |`STN_RES1`||(GeminiPR only)| |`STN_RES2`||(GeminiPR only)| |`STN_PWR`||(GeminiPR only)| + diff --git a/docs/feature_swap_hands.md b/docs/feature_swap_hands.md new file mode 100644 index 000000000000..92e8e3b10722 --- /dev/null +++ b/docs/feature_swap_hands.md @@ -0,0 +1,30 @@ +# Swap-Hands Action + +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 + +The configuration table is a simple 2-dimensional array to map from column/row to new column/row. Example `hand_swap_config` for Planck: + +```C +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + {{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, + {{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, + {{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, + {{11, 3}, {10, 3}, {9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, +}; +``` + +Note that the array indices are reversed same as the matrix and the values are of type `keypos_t` which is `{col, row}` and all values are zero-based. In the example above, `hand_swap_config[2][4]` (third row, fifth column) would return `{7, 2}` (third row, eighth column). Yes, this is confusing. + +## Swap Keycodes + +|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_tap_dance.md b/docs/feature_tap_dance.md index e31e331679d7..99298fbda83b 100644 --- a/docs/feature_tap_dance.md +++ b/docs/feature_tap_dance.md @@ -6,9 +6,9 @@ Hit the semicolon key once, send a semicolon. Hit it twice, rapidly -- send a co With this feature one can specify keys that behave differently, based on the amount of times they have been tapped, and when interrupted, they get handled before the interrupter. -To make it clear how this is different from `ACTION_FUNCTION_TAP`, lets explore a certain setup! We want one key to send `Space` on single tap, but `Enter` on double-tap. +To make it clear how this is different from `ACTION_FUNCTION_TAP`, let's explore a certain setup! We want one key to send `Space` on single tap, but `Enter` on double-tap. -With `ACTION_FUNCTION_TAP`, it is quite a rain-dance to set this up, and has the problem that when the sequence is interrupted, the interrupting key will be send first. Thus, `SPC a` will result in `a SPC` being sent, if they are typed within `TAPPING_TERM`. With the tap dance feature, that'll come out as `SPC a`, correctly. +With `ACTION_FUNCTION_TAP`, it is quite a rain-dance to set this up, and has the problem that when the sequence is interrupted, the interrupting key will be sent first. Thus, `SPC a` will result in `a SPC` being sent, if they are typed within `TAPPING_TERM`. With the tap dance feature, that'll come out as `SPC a`, correctly. The implementation hooks into two parts of the system, to achieve this: into `process_record_quantum()`, and the matrix scan. We need the latter to be able to time out a tap sequence even when a key is not being pressed, so `SPC` alone will time out and register after `TAPPING_TERM` time. @@ -16,13 +16,15 @@ But lets start with how to use it, first! First, you will need `TAP_DANCE_ENABLE=yes` in your `rules.mk`, because the feature is disabled by default. This adds a little less than 1k to the firmware size. Next, you will want to define some tap-dance keys, which is easiest to do with the `TD()` macro, that - similar to `F()`, takes a number, which will later be used as an index into the `tap_dance_actions` array. -This array specifies what actions shall be taken when a tap-dance key is in action. Currently, there are three possible options: +This array specifies what actions shall be taken when a tap-dance key is in action. Currently, there are five possible options: * `ACTION_TAP_DANCE_DOUBLE(kc1, kc2)`: Sends the `kc1` keycode when tapped once, `kc2` otherwise. When the key is held, the appropriate keycode is registered: `kc1` when pressed and held, `kc2` when tapped once, then pressed and held. +* `ACTION_TAP_DANCE_DUAL_ROLE(kc, layer)`: Sends the `kc` keycode when tapped once, or moves to `layer`. (this functions like the `TO` layer keycode). * `ACTION_TAP_DANCE_FN(fn)`: Calls the specified function - defined in the user keymap - with the final tap count of the tap dance action. -* `ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn)`: Calls the first specified function - defined in the user keymap - on every tap, the second function on when the dance action finishes (like the previous option), and the last function when the tap dance action resets. +* `ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn)`: Calls the first specified function - defined in the user keymap - on every tap, the second function when the dance action finishes (like the previous option), and the last function when the tap dance action resets. +* `ACTION_TAP_DANCE_FN_ADVANCED_TIME(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn, tap_specific_tapping_term)`: This functions identically to the `ACTION_TAP_DANCE_FN_ADVANCED` function, but uses a custom tapping term for it, instead of the predefined `TAPPING_TERM`. -The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise. +The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE_DOUBLE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise. And that's the bulk of it! @@ -179,42 +181,124 @@ Below is a specific example: * Double Tap = Send `Escape` * Double Tap and Hold = Send `Alt` -The following example can be easily expanded to more than 4 quite easily: +## Setup + +You will need a few things that can be used for 'Quad Function Tap-Dance'. The suggested setup is to create a user directory for yourself. This directory will contain rules.mk `.c` and `.h`. This directory should be called ``, and located in the top level `users` directory. There should already be a few examples to look at there. + +### In `/qmk_firmware/users//rules.mk` + +Put the following: ```c -//**************** Definitions needed for quad function to work *********************// -//Enums used to clearly convey the state of the tap dance +TAP_DANCE_ENABLE = yes +SRC += your_name.c +``` + +Pretty simple. It is a nice way to keep some rules common on all your keymaps. + + +### In `/qmk_firmware/users//.h` + +You will need a few things in this file: + +```c +#ifndef YOUR_NAME +#define YOUR_NAME + +#include "quantum.h" +#include "process_keycode/process_tap_dance.h" + + +typedef struct { + bool is_press_action; + int state; +} xtap; + enum { SINGLE_TAP = 1, SINGLE_HOLD = 2, DOUBLE_TAP = 3, DOUBLE_HOLD = 4, - DOUBLE_SINGLE_TAP = 5 //send SINGLE_TAP twice - NOT DOUBLE_TAP - // Add more enums here if you want for triple, quadruple, etc. + DOUBLE_SINGLE_TAP = 5, //send two single taps + TRIPLE_TAP = 6, + TRIPLE_HOLD = 7 }; -typedef struct { - bool is_press_action; - int state; -} tap; +//Tap dance enums +enum { + CTL_X = 0, + SOME_OTHER_DANCE +} + +int cur_dance (qk_tap_dance_state_t *state); + +//for the x tap dance. Put it here so it can be used in any keymap +void x_finished (qk_tap_dance_state_t *state, void *user_data); +void x_reset (qk_tap_dance_state_t *state, void *user_data); +``` + +### In `/qmk_firmware/users//.c` +And then in your user's `.c` file you implement the functions above: + +```c +#include "gordon.h" +#include "quantum.h" +#include "action.h" +#include "process_keycode/process_tap_dance.h" + +/* Return an integer that corresponds to what kind of tap dance should be executed. + * + * How to figure out tap dance state: interrupted and pressed. + * + * Interrupted: If the state of a dance dance is "interrupted", that means that another key has been hit + * under the tapping term. This is typically indicitive that you are trying to "tap" the key. + * + * Pressed: Whether or not the key is still being pressed. If this value is true, that means the tapping term + * has ended, but the key is still being pressed down. This generally means the key is being "held". + * + * One thing that is currenlty not possible with qmk software in regards to tap dance is to mimic the "permissive hold" + * feature. In general, advanced tap dances do not work well if they are used with commonly typed letters. + * For example "A". Tap dances are best used on non-letter keys that are not hit while typing letters. + * + * Good places to put an advanced tap dance: + * z,q,x,j,k,v,b, any function key, home/end, comma, semi-colon + * + * Criteria for "good placement" of a tap dance key: + * Not a key that is hit frequently in a sentence + * Not a key that is used frequently to double tap, for example 'tab' is often double tapped in a terminal, or + * in a web form. So 'tab' would be a poor choice for a tap dance. + * Letters used in common words as a double. For example 'p' in 'pepper'. If a tap dance function existed on the + * letter 'p', the word 'pepper' would be quite frustating to type. + * + * For the third point, there does exist the 'DOUBLE_SINGLE_TAP', however this is not fully tested + * + */ int cur_dance (qk_tap_dance_state_t *state) { if (state->count == 1) { - //If count = 1, and it has been interrupted - it doesn't matter if it is pressed or not: Send SINGLE_TAP - if (state->interrupted || state->pressed==0) return SINGLE_TAP; + if (state->interrupted || !state->pressed) return SINGLE_TAP; + //key has not been interrupted, but they key is still held. Means you want to send a 'HOLD'. else return SINGLE_HOLD; } - //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated - //with single tap. In example below, that means to send `xx` instead of `Escape`. else if (state->count == 2) { + /* + * DOUBLE_SINGLE_TAP is to distinguish between typing "pepper", and actually wanting a double tap + * action when hitting 'pp'. Suggested use case for this return value is when you want to send two + * keystrokes of the key, and not the 'double tap' action/macro. + */ if (state->interrupted) return DOUBLE_SINGLE_TAP; else if (state->pressed) return DOUBLE_HOLD; else return DOUBLE_TAP; } - else return 6; //magic number. At some point this method will expand to work for more presses + //Assumes no one is trying to type the same letter three times (at least not quickly). + //If your tap dance key is 'KC_W', and you want to type "www." quickly - then you will need to add + //an exception here to return a 'TRIPLE_SINGLE_TAP', and define that enum just like 'DOUBLE_SINGLE_TAP' + if (state->count == 3) { + if (state->interrupted || !state->pressed) return TRIPLE_TAP; + else return TRIPLE_HOLD; + } + else return 8; //magic number. At some point this method will expand to work for more presses } -//**************** Definitions needed for quad function to work *********************// - //instanalize an instance of 'tap' for the 'x' tap dance. static tap xtap_state = { .is_press_action = true, @@ -245,6 +329,10 @@ void x_reset (qk_tap_dance_state_t *state, void *user_data) { } xtap_state.state = 0; } + +qk_tap_dance_action_t tap_dance_actions[] = { + [X_CTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL,x_finished, x_reset) +}; ``` -And then simply add this to your list of tap dance functions: -`[X_TAP_DANCE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, x_finished, x_reset)` + +And then simply use TD(X_CTL) anywhere in your keymap. diff --git a/docs/feature_terminal.md b/docs/feature_terminal.md index 334a46c2d469..1863599f8440 100644 --- a/docs/feature_terminal.md +++ b/docs/feature_terminal.md @@ -14,12 +14,14 @@ When enabled, a `> ` prompt will appear, where you'll be able to type, backspace `#define TERMINAL_HELP` enables some other output helpers that aren't really needed with this page. +Pressing "up" and "down" will allow you to cycle through the past 5 commands entered. + ## Future Ideas * Keyboard/user-extensible commands * Smaller footprint * Arrow key support -* Command history +* Command history - Done * SD card support * LCD support for buffer display * Keycode -> name string LUT @@ -43,14 +45,39 @@ QMK Firmware Built: 2017-08-29-20:24:44 ``` + +### `print-buffer` + +Outputs the last 5 commands entered + +``` +> print-buffer +0. print-buffer +1. help +2. about +3. keymap 0 +4. help +5. flush-buffer +``` + +### `flush-buffer` + +Clears command buffer +``` +> flush-buffer +Buffer cleared! +``` + + ### `help` + Prints out the available commands: ``` > help commands available: - about help keycode keymap exit + about help keycode keymap exit print-buffer flush-buffer ``` ### `keycode ` diff --git a/docs/feature_userspace.md b/docs/feature_userspace.md index 950377423bdf..c8fa406cb006 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/` . @@ -93,3 +115,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { This will add a new `KC_MAKE` keycode that can be used in any of your keymaps. And this keycode will output `make :`, making frequent compiling easier. And this will work with any keyboard and any keymap as it will output the current boards info, so that you don't have to type this out every time. Additionally, this should flash the newly compiled firmware automatically, using the correct utility, based on the bootloader settings (or default to just generating the HEX file). However, it should be noted that this may not work on all systems. AVRDUDE doesn't work on WSL, namely (and will dump the HEX in the ".build" folder instead). + +## Override default userspace + +By default the userspace used will be the same as the keymap name. In some situations this isn't desirable. For instance, if you use the [layout](feature_layouts.md) feature you can't use the same name for different keymaps (e.g. ANSI and ISO). You can name your layouts `mylayout-ansi` and `mylayout-iso` and add the following line to your layout's `rules.mk`: + +``` +USER_NAME := mylayout +``` \ No newline at end of file diff --git a/docs/features.md b/docs/features.md index 5abede2c253a..4dee486ef17e 100644 --- a/docs/features.md +++ b/docs/features.md @@ -17,8 +17,10 @@ QMK has a staggering number of features for building your keyboard. It can take * [Pointing Device](feature_pointing_device.md) - Framework for connecting your custom pointing device to your keyboard. * [PS2 Mouse](feature_ps2_mouse.md) - Driver for connecting a PS/2 mouse directly to your keyboard. * [RGB Light](feature_rgblight.md) - RGB lighting for your keyboard. +* [RGB Matrix](feature_rgb_matrix.md) - RGB Matrix lights for per key lighting. * [Space Cadet](feature_space_cadet.md) - Use your left/right shift keys to type parenthesis and brackets. * [Stenography](feature_stenography.md) - Put your keyboard into Plover mode for stenography use. +* [Swap Hands](feature_swap_hands.md) - Mirror your keyboard for one handed usage. * [Tap Dance](feature_tap_dance.md) - Make a single key do as many things as you want. * [Terminal](feature_terminal.md) - CLI interface to the internals of your keyboard. * [Thermal Printer](feature_thermal_printer.md) - Connect a thermal printer to your keyboard to be able to toggle on a printed log of everything you type. diff --git a/docs/flashing.md b/docs/flashing.md index 8e1381f69818..e5fe59f8f039 100644 --- a/docs/flashing.md +++ b/docs/flashing.md @@ -20,7 +20,7 @@ Compatible flashers: * [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI) * [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` in QMK (recommended command line) -* [Atmel's Flip](http://www.atmel.com/tools/flip.aspx) (not recommended) +* [Atmel's Flip](http://www.microchip.com/developmenttools/productdetails.aspx?partno=flip) (not recommended) Flashing sequence: diff --git a/docs/getting_started_build_tools.md b/docs/getting_started_build_tools.md index cd748dbf8958..45b51b2ccbfc 100644 --- a/docs/getting_started_build_tools.md +++ b/docs/getting_started_build_tools.md @@ -4,6 +4,8 @@ This page describes setting up the build environment for QMK. These instructions +Note: If it is your first time here, Check out the "Complete Newbs guide" instead + ## Linux To ensure you are always up to date, you can just run `sudo util/install_dependencies.sh`. That should always install all the dependencies needed. **This will run `apt-get upgrade`.** @@ -31,11 +33,15 @@ git Install the dependencies with your favorite package manager. -Debian/Ubuntu example: +Debian / Ubuntu example: sudo apt-get update sudo apt-get install gcc unzip wget zip gcc-avr binutils-avr avr-libc dfu-programmer dfu-util gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi +Fedora / Red Hat example: + + sudo dnf install gcc unzip wget zip dfu-util dfu-programmer avr-gcc avr-libc binutils-avr32-linux-gnu arm-none-eabi-gcc-cs arm-none-eabi-binutils-cs arm-none-eabi-newlib + ## Nix If you're on [NixOS](https://nixos.org/), or have Nix installed on Linux or macOS, run `nix-shell` from the repository root to get a build environment. @@ -128,7 +134,7 @@ docker run -e keymap=gwen -e keyboard=ergodox_ez --rm -v $('pwd'):/qmk:rw edasqu On Windows Docker seems to have issues with the VOLUME tag in Dockerfile, and `$('pwd')` won't print a Windows compliant path; use full path instead, like this: ```bash -docker run -e keymap=default -e keyboard=ergobox_ez --rm -v D:/Users/Sacapuces/Documents/Repositories/qmk:/qmk:rw edasque/qmk_firmware +docker run -e keymap=default -e keyboard=ergodox_ez --rm -v D:/Users/Sacapuces/Documents/Repositories/qmk:/qmk:rw edasque/qmk_firmware ``` diff --git a/docs/getting_started_getting_help.md b/docs/getting_started_getting_help.md new file mode 100644 index 000000000000..7fb3b49e9bef --- /dev/null +++ b/docs/getting_started_getting_help.md @@ -0,0 +1,21 @@ +# Getting Help + +There are a lot of resources for getting help with QMK. + +## Realtime Chat + +You can find QMK developers and users on our main [gitter chat room](https://gitter.im/qmk/qmk_firmware). We also have other rooms for more specific discussion: + +* [Main Firmware Chat](https://gitter.im/qmk/qmk_firmware) +* [QMK Toolbox](https://gitter.im/qmk/qmk_toolbox) +* [Hardware Design Discussion](https://gitter.im/qmk/qmk_hardware) +* [Web Configurator](https://gitter.im/qmk/qmk_configurator) +* [Compiler API](https://gitter.im/qmk/qmk_compiler_api) + +## OLKB Subreddit + +The official QMK forum is [/r/olkb](https://reddit.com/r/olkb) on [reddit.com](https://reddit.com). + +## Github Issues + +You can open an [issue on GitHub](https://github.com/qmk/qmk_firmware/issues). This is especially handy when your issue will require long-term discussion or debugging. diff --git a/docs/getting_started_github.md b/docs/getting_started_github.md index f01ae6d011a3..7ce65e210eb7 100644 --- a/docs/getting_started_github.md +++ b/docs/getting_started_github.md @@ -2,9 +2,7 @@ Github can be a little tricky to those that aren't familiar with it - this guide will walk through each step of forking, cloning, and submitting a pull request with QMK. -{% hint style='info' %} -This guide assumes you're somewhat comfortable with running things at the command line, and have git installed on your system. -{% endhint %} +?> This guide assumes you're somewhat comfortable with running things at the command line, and have git installed on your system. Start on the [QMK Github page](https://github.com/qmk/qmk_firmware), and you'll see a button in the upper right that says "Fork": diff --git a/docs/getting_started_make_guide.md b/docs/getting_started_make_guide.md index 39ea34a60f6c..a57edcb98464 100644 --- a/docs/getting_started_make_guide.md +++ b/docs/getting_started_make_guide.md @@ -14,7 +14,7 @@ The full syntax of the `make` command is `::`, The `` means the following * If no target is given, then it's the same as `all` below * `all` compiles as many keyboard/revision/keymap combinations as specified. For example, `make planck/rev4:default` will generate a single .hex, while `make planck/rev4:all` will generate a hex for every keymap available to the planck. -* `dfu`, `teensy` or `dfu-util`, compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for ChibiOS keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme. +* `dfu`, `teensy`, `avrdude` or `dfu-util`, compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for ChibiOS keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme. * **Note**: some operating systems need root access for these commands to work, so in that case you need to run for example `sudo make planck/rev4:default:dfu`. * `clean`, cleans the build output folders to make sure that everything is built from scratch. Run this before normal compilation if you have some unexplainable problems. diff --git a/docs/hardware_avr.md b/docs/hardware_avr.md index 770817045048..be6932406204 100644 --- a/docs/hardware_avr.md +++ b/docs/hardware_avr.md @@ -66,9 +66,7 @@ Do change the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` lines to accurately r #define DESCRIPTION A custom keyboard ``` -{% hint style='info' %} -Note: On Windows and macOS the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` fields will be displayed in the list of USB devices. On Linux these values will not be visible in `lsusb`, since Linux takes that information from the list published by the USB-IF. -{% endhint %} +?> Note: On Windows and macOS the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` fields will be displayed in the list of USB devices. On Linux these values will not be visible in `lsusb`, since Linux takes that information from the list published by the USB-IF. ### Keyboard Matrix Configuration diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index 0a4e2d11b873..27d29f5c72dd 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -4,7 +4,7 @@ We welcome all keyboard projects into QMK, but ask that you try to stick to a co ## Naming Your Keyboard/Project -All names should be lowercase alphanumeric, and separated by an underscore (`_`), but not begin with one. Your directory and your `.h` and `.c` files should have exactly the same name. All folders should follow the same format. +All names should be lowercase alphanumeric, and separated by an underscore (`_`), but not begin with one. Your directory and your `.h` and `.c` files should have exactly the same name. All folders should follow the same format. `test`, `keyboard`, and `all` are reserved by make and are not a valid name for a keyboard. ## `readme.md` @@ -16,6 +16,22 @@ In an effort to keep the repo size down, we're no longer accepting images of any Any sort of hardware file (plate, case, pcb) can't be stored in qmk_firmware, but we have the [qmk.fm repo](https://github.com/qmk/qmk.fm) where such files (as well as in-depth info) can be stored and viewed on [qmk.fm](http://qmk.fm). Downloadable files are stored in `//` (name follows the same format as above) which are served at `http://qmk.fm//`, and pages are generated from `/_pages//` which are served at the same location (.md files are generated into .html files through Jekyll). Check out the `lets_split` directory for an example. +## Keyboard Defaults + +Given the amount of functionality that QMK exposes it's very easy to confuse new users. When putting together the default firmware for your keyboard we recommend limiting your enabled features and options to the minimal set needed to support your hardware. Recommendations for specific features follow. + +### Bootmagic and Command + +[Bootmagic](feature_bootmagic.md) and [Command](feature_command.md) are two related features that allow a user to control their keyboard in non-obvious ways. We recommend you think long and hard about if you're going to enable either feature, and how you will expose this functionality. Keep in mind that users who want this functionality can enable it in their personal keymaps without affecting all the novice users who may be using your keyboard as their first programmable board. + +By far the most common problem new users encounter is accidentally triggering Bootmagic while they're plugging in their keyboard. They're holding the keyboard by the bottom, unknowingly pressing in alt and spacebar, and then they find that these keys have been swapped on them. We recommend leaving this feature disabled by default, but if you do turn it on consider setting `BOOTMAGIC_KEY_SALT` to a key that is hard to press while plugging your keyboard in. + +If your keyboard does not have 2 shift keys you should provide a working default for `IS_COMMAND`, even when you have set `COMMAND_ENABLE = no`. This will give your users a default to conform to if they do enable Command. + +## Custom Keyboard Programming + +As documented on [Customizing Functionality](custom_quantum_functions.md) you can define custom functions for your keyboard. Please keep in mind that your users may want to customize that behavior as well, and make it possible for them to do that. If you are providing a custom function, for example `process_record_kb()`, make sure that your function calls the `_user()` version of the call too. You should also take into account the return value of the `_user()` version, and only run your custom code if the user returns `true`. + ## Keyboard Metadata As QMK grows so does the ecosystem surrounding QMK. To make it easier for projects in that ecosystem to tie into QMK as we make changes we are developing a metadata system to expose information about keyboards in QMK. @@ -29,17 +45,8 @@ The `info.json` file is a JSON formatted dictionary with the following keys avai * `keyboard_name` * A free-form text string describing the keyboard. * Example: `Clueboard 66%` -* `manufacturer` - * A free-form text string naming the manufacturer. - * Example: `Clueboard` -* `identifier` - * The Vendor, Product, and Revision ID's joined by a : - * Example: `c1ed:2370:0001` * `url` * A URL to the keyboard's product page, [QMK.fm/keyboards](https://qmk.fm/keyboards) page, or other page describing information about the keyboard. -* `processor` - * The MCU or CPU this keyboard uses. - * Example: `atmega32u4` or `stm32f303` * `bootloader` * What bootloader this keyboard uses. Available options: * `atmel-dfu` @@ -47,7 +54,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/index.html b/docs/index.html new file mode 100644 index 000000000000..f0b1fae07e78 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,46 @@ + + + + + QMK Firmware + + + + + + + + +
+ + + + + + + + + + + + diff --git a/docs/internals_defines.md b/docs/internals_defines.md new file mode 100644 index 000000000000..fdcb553589bd --- /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 000000000000..4ea132a83a84 --- /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 000000000000..5b57abd45469 --- /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 000000000000..ae82197c5c83 --- /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 000000000000..97821bd18063 --- /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 000000000000..b331508008a5 --- /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 000000000000..55dbe9e16443 --- /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 1dc0e62c273e..9a5f6e2b33f5 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) @@ -256,11 +256,11 @@ This is a reference only. Each group of keys links to the page documenting their |---------|------------------------------------------| |`BL_TOGG`|Turn the backlight on or off | |`BL_STEP`|Cycle through backlight levels | -|`BL_x` |Set a specific backlight level between 0-9| -|`BL_ON` |An alias for `BL_9` | -|`BL_OFF` |An alias for `BL_0` | -|`BL_INC` |Increase backlight level | -|`BL_DEC` |Decrease backlight level | +|`BL_ON` |Set the backlight to max brightness | +|`BL_OFF` |Turn the backlight off | +|`BL_INC` |Increase the backlight level | +|`BL_DEC` |Decrease the backlight level | +|`BL_BRTG`|Toggle backlight breathing | ## [RGB Lighting](feature_rgblight.md) @@ -284,6 +284,22 @@ This is a reference only. Each group of keys links to the page documenting their |`RGB_MODE_XMAS` |`RGB_M_X` |Christmas animation mode | |`RGB_MODE_GRADIENT`|`RGB_M_G` |Static gradient animation mode | +## [RGB Matrix Lighting](feature_rgb_matrix.md) + +|Key |Aliases |Description | +|-------------------|----------|--------------------------------------------------------------------| +|`RGB_TOG` | |Toggle RGB lighting on or off | +|`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held | +|`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held| +|`RGB_HUI` | |Increase hue | +|`RGB_HUD` | |Decrease hue | +|`RGB_SAI` | |Increase saturation | +|`RGB_SAD` | |Decrease saturation | +|`RGB_VAI` | |Increase value (brightness) | +|`RGB_VAD` | |Decrease value (brightness) | +|`RGB_SPI` | |Increase effect speed (does no support eeprom yet) | +|`RGB_SPD` | |Decrease effect speed (does no support eeprom yet) | + ## [Thermal Printer](feature_thermal_printer.md) |Key |Description | @@ -301,44 +317,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) @@ -366,16 +382,17 @@ This is a reference only. Each group of keys links to the page documenting their |`KC_RIGHT_ANGLE_BRACKET`|`KC_GT`/`KC_RABK` |`>` | |`KC_QUESTION` |`KC_QUES` |`?` | -## [Switching and Toggling Layers](feature_common_shortcuts.md#switching-and-toggling-layers) +## [Switching and Toggling Layers](feature_advanced_keycodes.md#switching-and-toggling-layers) -|Key |Description | -|---------------|----------------------------------------------------------------------------------| -|`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 +407,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 d4719ed4d4f5..57b0f92283f9 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 8401ee1484b8..b28d21a21df5 100644 --- a/docs/keymap.md +++ b/docs/keymap.md @@ -33,7 +33,7 @@ The state of the Keymap layer is determined by two 32 bit parameters: * **`default_layer_state`** indicates a base keymap layer (0-31) which is always valid and to be referred (the default layer). * **`layer_state`** has current on/off status of each layer in its bits. -Keymap layer '0' is usually `default_layer`, wither other layers initially off after booting up the firmware, although this can configured differently in `config.h`. It is useful to change `default_layer` when you completely switch a key layout, for example, if you want to switch to Colemak instead of Qwerty. +Keymap layer '0' is usually the `default_layer`, with other layers initially off after booting up the firmware, although this can configured differently in `config.h`. It is useful to change `default_layer` when you completely switch a key layout, for example, if you want to switch to Colemak instead of Qwerty. Initial state of Keymap Change base layout ----------------------- ------------------ @@ -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.md b/docs/newbs.md new file mode 100644 index 000000000000..eea8ea0fa24e --- /dev/null +++ b/docs/newbs.md @@ -0,0 +1,16 @@ +# The Compelete Newbs Guide To QMK + +QMK is a powerful Open Source firmware for your mechanical keyboard. You can use QMK to customize your keyboard in ways both simple and powerful. People of all skill levels, from complete newbie to master programmer, have successfully used QMK to customize their keyboard. This guide will help you do the same, no matter your skill level. + +Not sure if your keyboard can run QMK? If it's a mechanical keyboard you built yourself chances are good it can. We support a [large number of hobbyist boards](http://qmk.fm/keyboards/), so even if your current keyboard can't run QMK you shouldn't have trouble finding one to suit your needs. + +## Overview + +There are 4 main sections to this guide: + +* [Getting Started](newbs_getting_started.md) +* [Building Your First Firmware](newbs_building_firmware.md) +* [Flashing Firmware](newbs_flashing.md) +* [Testing and Debugging](newbs_testing_debugging.md) + +This guide is focused on helping someone who has never compiled software before. It makes choices and recommendations based on that viewpoint. There are alternative methods for many of these procedures, and we support most of those alternatives. If you have any doubt about how to accomplish a task you can [ask us for guidance](getting_started_getting_help.md). diff --git a/docs/newbs_building_firmware.md b/docs/newbs_building_firmware.md new file mode 100644 index 000000000000..f227d623f01a --- /dev/null +++ b/docs/newbs_building_firmware.md @@ -0,0 +1,67 @@ +# Building Your First Firmware + +Now that you have setup your build environment you are ready to start building custom firmware. For this section of the guide we will bounce between 3 programs- your file manager, your text editor, and your terminal window. Keep all 3 open until you are done and happy with your keyboard firmware. + +If you have closed and reopened your terminal window since following the first part of the guide, don't forget to `cd qmk_firmware` so that your terminal is in the correct directory. + +## Navigate To Your Keymaps Folder + +Start by navigating to the `keymaps` folder for your keyboard. + +?> If you are on macOS or Windows there are commands you can use to easily open the keymaps folder. + +?> macOS: + + open keyboards//keymaps + +?> Windows: + + start keyboards//keymaps + +## Create a Copy Of The `default` Keymap + +Once you have the `keymaps` folder open you will want to create a copy of the `default` folder. We highly recommend you name your folder the same as your GitHub username, but you can use any name you want as long as it contains only lower case letters, numbers, and the underscore character. + +## Open `keymap.c` In Your Favorite Text Editor + +Open up your `keymap.c`. Inside this file you'll find the structure that controls how your keyboard behaves. At the top of `keymap.c` there may be some defines and enums that make the keymap easier to read. Farther down you'll find a line that looks like this: + + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +This line indicates the start of the list of Layers. Below that you'll find lines containing either `LAYOUT` or `KEYMAP`, and these lines indicate the start of a layer. Below that line is the list of keys that comprise a that particular layer. + +!> When editing your keymap file be careful not to add or remove any commas. If you do you will prevent your firmware from compiling and it may not be easy to figure out where the extra, or missing, comma is. + +## Customize The Layout To Your Liking + +How to complete this step is entirely up to you. Make the one change that's been bugging you, or completely rework everything. You can remove layers if you don't need all of them, or add layers up to a total of 32. Check the following documentation to find out what you can define here: + +* [Keycodes](keycodes.md) +* [Features](features.md) +* [FAQ](faq.md) + +?> While you get a feel for how keymaps work, keep each change small. Bigger changes make it harder to debug any problems that arise. + +## Build Your Firmware + +When your changes to the keymap are complete you will need to build the firmware. To do so go back to your terminal window and run the build command: + + make : + +For example, if your keymap is named "xyverz" and you're building a keymap for a rev5 planck, you'll use this command: + + make planck/rev5:xyverz + +While this compiles you will have a lot of output going to the screen informing you of what files are being compiled. It should end with output that looks similar to this: + +``` +Linking: .build/planck_rev5_xyverz.elf [OK] +Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK] +Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK] +Checking file size of planck_rev5_xyverz.hex [OK] + * File size is fine - 18392/28672 +``` + +## Flash Your Firmware + +Move on to [Flashing Firmware](newbs_flashing.md) to learn how to write your new firmware to your keyboard. diff --git a/docs/newbs_flashing.md b/docs/newbs_flashing.md new file mode 100644 index 000000000000..0b0ede37c4e0 --- /dev/null +++ b/docs/newbs_flashing.md @@ -0,0 +1,240 @@ +# Flashing Your Keyboard + +Now that you've built a custom firmware file you'll want to flash your keyboard. + +## 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. + +?> If you are on Windows or macOS there are commands you can use to easily open the current firmware folder in Explorer or Finder. + +?> Windows: + + start . + +?> macOS: + + open . + +The firmware file always follows this naming format: + + _.{bin,hex} + +For example, the `plank/rev5` with a `default` keymap will have this filename: + + planck_rev5_default.hex + +Once you have located your firmware file drag it into the "Local file" box in QMK Toolbox, or click "Open" and navigate to where your firmware file is stored. + +### Put Your Keyboard Into DFU (Bootloader) Mode + +In order to flash your custom firmware you have to put your keyboard into a special flashing mode. While it is in this mode you will not be able to type or otherwise use your keyboard. It is very important that you do not unplug your keyboard or otherwise interrupt the flashing process while the firmware is being written. + +Different keyboards have different ways to enter this special mode. If your PCB currently runs QMK or TMK and you have not been given specific instructions try the following, in order: + +* Hold down both shift keys and press `Pause` +* Hold down both shift keys and press `B` +* Unplug your keyboard, hold down the Spacebar and `B` at the same time, plug in your keyboard and wait a second before releasing the keys +* Press the physical `RESET` button on the bottom of the PCB +* Locate header pins on the PCB labeled `BOOT0` or `RESET`, short those together while plugging your PCB in + +When you are successful you will see a message similar to this in QMK Toolbox: + +``` +*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390 +*** DFU device connected +``` + +### Flash Your Keyboard + +Click the `Flash` button in QMK Toolbox. You will see output similar to the following: + +``` +*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390 +*** DFU device connected +*** Attempting to flash, please don't remove device +>>> dfu-programmer atmega32u4 erase --force + Erasing flash... Success + Checking memory from 0x0 to 0x6FFF... Empty. +>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex + Checking memory from 0x0 to 0x55FF... Empty. + 0% 100% Programming 0x5600 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + 0% 100% Reading 0x7000 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + Validating... Success + 0x5600 bytes written into 0x7000 bytes memory (76.79%). +>>> dfu-programmer atmega32u4 reset + +*** DFU device disconnected +*** Clueboard - Clueboard 66% HotSwap connected -- 0xC1ED:0x2390 +``` + +## 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! + +Give it a try and make sure everything works the way you want it to. We've written [Testing and Debugging](newbs_testing_debugging.md) to round out this Newbie Guide, so head over there to learn about how to troubleshoot your custom functionality. diff --git a/docs/newbs_getting_started.md b/docs/newbs_getting_started.md new file mode 100644 index 000000000000..2181542856ba --- /dev/null +++ b/docs/newbs_getting_started.md @@ -0,0 +1,99 @@ +# Introduction + +Your computer keyboard has a processor inside of it, not unlike the one inside your computer. This processor runs software that is responsible for detecting button presses and sending reports about the state of the keyboard when they are pressed or released. QMK fills the role of that software, detecting button presses and passing that information on to the host computer. When you build your custom layout you are creating the equivalent of an .exe for your keyboard. + +QMK tries to put a lot of power into your hands by making easy things easy, and hard things possible. You don't have to know how to program to create powerful layouts, you only have to follow a few simple syntax rules. + +# Getting Started + +Before you can build keymaps you need to install some software and setup your build environment. This only has to be done one time no matter how many keyboards you want to compile firmware for. + +## Download Software + +### Text Editor + +You'll need a program that can edit and save **plain text** files. If you are on Windows you can make due with Notepad, and on Linux you can use Gedit, both of which are simple but functional text editors. On macOS be careful with TextEdit.app, it will not save plain text files unless you make sure to select "Make Plain text" from the "Format" menu, or you can use another program such as Sublime Text. + +?> Not sure which text editor to use? Laurence Bradford wrote [a great introduction](https://learntocodewith.me/programming/basics/text-editors/) to the subject. + +### QMK Toolbox + +QMK Toolbox is an optional graphical Windows and macOS program that allows you to both program and debug your custom keyboard. You will likely prefer it to easily flash your keyboard and receive the debugging messages that your keyboard will print. + +Download the files from the links below: + +For Windows: "qmk_toolbox.exe" or "qmk_toolbox_install.exe" (with installer) + +For Mac: "QMK.Toolbox.app.zip" or "QMK.Toolbox.pkg" (with installer) + +* [Newest Release](https://github.com/qmk/qmk_toolbox/releases/latest) +* [Source Code](https://github.com/qmk/qmk_toolbox/) + +## Environment Setup + +We've tried to make QMK as easy to setup as possible. You only have to prepare your Linux or Unix environment and let QMK install the rest. + +?> If you haven't worked with the Linux/Unix command line before there are a few basic concepts and commands you should learn. These resources will teach you enough to work with QMK:
+[Must Know Linux Commands](https://www.guru99.com/must-know-linux-commands.html)
+[Some Basic Unix Commands](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html) + +### Windows + +You will need to install msys2 and git. + +* Follow the installation instructions on the msys2 homepage: http://www.msys2.org +* Close any open msys2 terminals, and open a new terminal +* Install git by running this command: `pacman -S git` + +### macOS + +You will need to install homebrew. Follow the instructions on the homebrew homepage: https://brew.sh + +After homebrew is installed continue with "Download QMK", following step "Setup QMK" runs a script that will install other packages. + +### Linux + +You will need to install git. It's extremely likely you already have it, but if not one of the following commands should install it: + +* Debian/Ubuntu/Devuan: `apt-get install git` +* Fedora/Redhat/Centos: `yum install git` +* Arch: `pacman -S git` + +## Download QMK + +Once you have setup your Linux/Unix environment you are ready to download QMK. We will do this by using git to "clone" the QMK repository. Open a Terminal or MSYS2 Console window and leave it open for the remainder of this guide. Inside that window run these two commands: + + git clone https://github.com/qmk/qmk_firmware.git + cd qmk_firmware + +?> If you already know [how to use GitHub](getting_started_github.md) we recommend you create and clone your own fork instead. If you don't know what that means you can safely ignore this message. + +## Setup QMK + +QMK comes with a script to help you setup the rest of what you'll need. You should run it now by typing in this command: + + ./util/qmk_install.sh + +## Test Your Build Environment + +Now that your QMK build environment is setup you can build a firmware for your keyboard. Start by trying to build the default layout for your keyboard. You should be able to do that with a command in this format: + + make :default + +For example, to build a firmware for a Clueboard 66% use: + + make clueboard/66/rev3:default + +When it is done you should have a lot of output that ends similar to this: + +``` +Linking: .build/clueboard_66_rev2_default.elf [OK] +Creating load file for flashing: .build/clueboard_66_rev2_default.hex [OK] +Copying clueboard_66_rev2_default.hex to qmk_firmware folder [OK] +Checking file size of clueboard_66_rev2_default.hex [OK] + * File size is fine - 25174/28672 +``` + +## Creating Your Layout + +Now you are ready to create your own personal layout. Move on to [Building Your First Firmware](newbs_building_firmware.md) for that. diff --git a/docs/newbs_testing_debugging.md b/docs/newbs_testing_debugging.md new file mode 100644 index 000000000000..1d8021dec8f1 --- /dev/null +++ b/docs/newbs_testing_debugging.md @@ -0,0 +1,33 @@ +# Testing and Debugging + +Once you've flashed your keyboard with a custom firmware you're ready to test it out. With a little bit of luck everything will work perfectly, but if not this document will help you figure out what's wrong. + +## Testing + +Testing your keyboard is usually pretty straightforward. Press every single key and make sure it sends the keys you expect. There are even programs that will help you make sure that no key is missed. + +Note: These programs are not provided by or endorsed by QMK. + +* [Switch Hitter](https://elitekeyboards.com/switchhitter.php) (Windows Only) +* [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (Mac Only) +* [Keyboard Tester](http://www.keyboardtester.com) (Web Based) +* [Keyboard Checker](http://keyboardchecker.com) (Web Based) + +## Debugging With QMK Toolbox + +[QMK Toolbox](https://github.com/qmk/qmk_toolbox) will show messages from your keyboard if you have `CONSOLE_ENABLE = yes` in your `rules.mk`. By default the output is very limited, but you can turn on debug mode to increase the amount of debug output. Use the `DEBUG` keycode in your keymap, or use the [Command](feature_command.md) feature to enable debug mode. + + + +## Sending Your Own Debug Messages + +Sometimes it's useful to print debug messages from within your [custom code](custom_quantum_functions.md). Doing so is pretty simple. Start by including `print.h` at the top of your file: + + #include + +After that you can use a few different print functions: + +* `print("string")`: Print a simple string. +* `sprintf("%s string", var)`: Print a formatted string +* `dprint("string")` Print a simple string, but only when debug mode is enabled +* `dprintf("%s string", var)`: Print a formatted string, but only when debug mode is enabled diff --git a/docs/qmk.css b/docs/qmk.css new file mode 100644 index 000000000000..543cd7f28d4d --- /dev/null +++ b/docs/qmk.css @@ -0,0 +1,862 @@ +* { + -webkit-font-smoothing: antialiased; + -webkit-overflow-scrolling: touch; + -webkit-tap-highlight-color: rgba(0,0,0,0); + -webkit-text-size-adjust: none; + -webkit-touch-callout: none; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} +body:not(.ready) { + overflow: hidden; +} +body:not(.ready) [data-cloak], +body:not(.ready) .app-nav, +body:not(.ready) > nav { + display: none; +} +div#app { + font-size: 30px; + font-weight: lighter; + margin: 40vh auto; + text-align: center; +} +div#app:empty::before { + content: 'Loading...'; +} +.emoji { + height: 1.2rem; + vertical-align: middle; +} +.progress { + background-color: var(--theme-color, #ea6f5a); + height: 2px; + left: 0px; + position: fixed; + right: 0px; + top: 0px; + -webkit-transition: width 0.2s, opacity 0.4s; + transition: width 0.2s, opacity 0.4s; + width: 0%; + z-index: 999999; +} +.search a:hover { + color: var(--theme-color, #ea6f5a); +} +.search .search-keyword { + color: var(--theme-color, #ea6f5a); + font-style: normal; + font-weight: bold; +} +html, +body { + height: 100%; +} +body { + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + color: #efefef; + font-family: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif; + font-size: 15px; + letter-spacing: 0; + margin: 0; + overflow-x: hidden; +} +img { + max-width: 100%; +} +a[disabled] { + cursor: not-allowed; + opacity: 0.6; +} +kbd { + border: solid 1px #ccc; + border-radius: 3px; + display: inline-block; + font-size: 12px !important; + line-height: 12px; + margin-bottom: 3px; + padding: 3px 5px; + vertical-align: middle; +} +.task-list-item { + list-style-type: none; +} +li input[type='checkbox'] { + margin: 0 0.2em 0.25em -1.6em; + vertical-align: middle; +} +.app-nav { + margin: 25px 60px 0 0; + position: absolute; + right: 0; + text-align: right; + z-index: 10; +/* navbar dropdown */ +} +.app-nav.no-badge { + margin-right: 25px; +} +.app-nav p { + margin: 0; +} +.app-nav > a { + margin: 0 1rem; + padding: 5px 0; +} +.app-nav ul, +.app-nav li { + display: inline-block; + list-style: none; + margin: 0; +} +.app-nav a { + color: inherit; + font-size: 16px; + text-decoration: none; + -webkit-transition: color 0.3s; + transition: color 0.3s; +} +.app-nav a:hover { + color: var(--theme-color, #ea6f5a); +} +.app-nav a.active { + border-bottom: 2px solid var(--theme-color, #ea6f5a); + color: var(--theme-color, #ea6f5a); +} +.app-nav li { + display: inline-block; + margin: 0 1rem; + padding: 5px 0; + position: relative; +} +.app-nav li ul { + background-color: #fff; + border: 1px solid #ddd; + border-bottom-color: #ccc; + border-radius: 4px; + -webkit-box-sizing: border-box; + box-sizing: border-box; + display: none; + max-height: calc(100vh - 61px); + overflow-y: auto; + padding: 10px 0; + position: absolute; + right: -15px; + text-align: left; + top: 100%; + white-space: nowrap; +} +.app-nav li ul li { + display: block; + font-size: 14px; + line-height: 1rem; + margin: 0; + margin: 8px 14px; + white-space: nowrap; +} +.app-nav li ul a { + display: block; + font-size: inherit; + margin: 0; + padding: 0; +} +.app-nav li ul a.active { + border-bottom: 0; +} +.app-nav li:hover ul { + display: block; +} +.github-corner { + border-bottom: 0; + position: fixed; + right: 0; + text-decoration: none; + top: 0; + z-index: 1; +} +.github-corner:hover .octo-arm { + -webkit-animation: octocat-wave 560ms ease-in-out; + animation: octocat-wave 560ms ease-in-out; +} +.github-corner svg { + color: #3f3f3f; + fill: var(--theme-color, #ea6f5a); + height: 80px; + width: 80px; +} +main { + display: block; + position: relative; + width: 100vw; + height: 100%; + z-index: 0; +} +main.hidden { + display: none; +} +.anchor { + display: inline-block; + text-decoration: none; + -webkit-transition: all 0.3s; + transition: all 0.3s; +} +.anchor span { + color: #c8c8c8; +} +.anchor:hover { + text-decoration: underline; +} +.sidebar { + border-right: 1px solid rgba(0,0,0,0.07); + overflow-y: auto; + padding: 40px 0 0; + position: absolute; + top: 0; + bottom: 0; + left: 0; + -webkit-transition: -webkit-transform 250ms ease-out; + transition: -webkit-transform 250ms ease-out; + transition: transform 250ms ease-out; + transition: transform 250ms ease-out, -webkit-transform 250ms ease-out; + width: 300px; + z-index: 20; +} +.sidebar > h1 { + margin: 0 auto 1rem; + font-size: 1.5rem; + font-weight: 300; + text-align: center; +} +.sidebar > h1 a { + color: inherit; + text-decoration: none; +} +.sidebar > h1 .app-nav { + display: block; + position: static; +} +.sidebar .sidebar-nav { + line-height: 2em; + padding-bottom: 40px; +} +.sidebar li.collapse .app-sub-sidebar { + display: none; +} +.sidebar ul { + margin: 0; + padding: 0; +} +.sidebar li > p { + font-weight: 700; + margin: 0; +} +.sidebar ul, +.sidebar ul li { + list-style: none; +} +.sidebar ul li a { + border-bottom: none; + display: block; +} +.sidebar ul li ul { + padding-left: 20px; +} +.sidebar::-webkit-scrollbar { + width: 4px; +} +.sidebar::-webkit-scrollbar-thumb { + background: transparent; + border-radius: 4px; +} +.sidebar:hover::-webkit-scrollbar-thumb { + background: rgba(136,136,136,0.4); +} +.sidebar:hover::-webkit-scrollbar-track { + background: rgba(136,136,136,0.1); +} +.sidebar-toggle { + background-color: transparent; + background-color: rgba(63,63,63,0.8); + border: 0; + outline: none; + padding: 10px; + position: absolute; + bottom: 0; + left: 0; + text-align: center; + -webkit-transition: opacity 0.3s; + transition: opacity 0.3s; + width: 284px; + z-index: 30; +} +.sidebar-toggle .sidebar-toggle-button:hover { + opacity: 0.4; +} +.sidebar-toggle span { + background-color: var(--theme-color, #ea6f5a); + display: block; + margin-bottom: 4px; + width: 16px; + height: 2px; +} +body.sticky .sidebar, +body.sticky .sidebar-toggle { + position: fixed; +} +.content { + padding-top: 60px; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 300px; + -webkit-transition: left 250ms ease; + transition: left 250ms ease; +} +.markdown-section { + margin: 0 auto; + max-width: 800px; + padding: 30px 15px 40px 15px; + position: relative; +} +.markdown-section > * { + -webkit-box-sizing: border-box; + box-sizing: border-box; + font-size: inherit; +} +.markdown-section > :first-child { + margin-top: 0 !important; +} +.markdown-section hr { + border: none; + border-bottom: 1px solid #eee; + margin: 2em 0; +} +.markdown-section iframe { + border: 1px solid #eee; +} +.markdown-section table { + border-collapse: collapse; + border-spacing: 0; + display: block; + margin-bottom: 1rem; + overflow: auto; + width: 100%; +} +.markdown-section th { + border: 1px solid #ddd; + font-weight: bold; + padding: 6px 13px; +} +.markdown-section td { + border: 1px solid #ddd; + padding: 6px 13px; +} +.markdown-section tr { + border-top: 1px solid #ccc; +} +.markdown-section tr:nth-child(2n) { + background-color: #555555; +} +.markdown-section p.tip { + background-color: #555555; + border-bottom-right-radius: 2px; + border-left: 4px solid #f66; + border-top-right-radius: 2px; + margin: 2em 0; + padding: 12px 24px 12px 30px; + position: relative; +} +.markdown-section p.tip:before { + background-color: #f66; + border-radius: 100%; + color: #3f3f3f; + content: '!'; + font-family: 'Dosis', 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif; + font-size: 14px; + font-weight: bold; + left: -12px; + line-height: 20px; + position: absolute; + height: 20px; + width: 20px; + text-align: center; + top: 14px; +} +.markdown-section p.tip code { + background-color: #efefef; +} +.markdown-section p.tip em { + color: #c8c8c8; +} +.markdown-section p.warn { + background: rgba(234,111,90,0.1); + border-radius: 2px; + padding: 1rem; +} +body.close .sidebar { + -webkit-transform: translateX(-300px); + transform: translateX(-300px); +} +body.close .sidebar-toggle { + width: auto; +} +body.close .content { + left: 0; +} +@media print { + .github-corner, + .sidebar-toggle, + .sidebar, + .app-nav { + display: none; + } +} +@media screen and (max-width: 768px) { + .github-corner, + .sidebar-toggle, + .sidebar { + position: fixed; + } + .app-nav { + margin-top: 16px; + } + .app-nav li ul { + top: 30px; + } + main { + height: auto; + overflow-x: hidden; + } + .sidebar { + left: -300px; + -webkit-transition: -webkit-transform 250ms ease-out; + transition: -webkit-transform 250ms ease-out; + transition: transform 250ms ease-out; + transition: transform 250ms ease-out, -webkit-transform 250ms ease-out; + } + .content { + left: 0; + max-width: 100vw; + position: static; + padding-top: 20px; + -webkit-transition: -webkit-transform 250ms ease; + transition: -webkit-transform 250ms ease; + transition: transform 250ms ease; + transition: transform 250ms ease, -webkit-transform 250ms ease; + } + .app-nav, + .github-corner { + -webkit-transition: -webkit-transform 250ms ease-out; + transition: -webkit-transform 250ms ease-out; + transition: transform 250ms ease-out; + transition: transform 250ms ease-out, -webkit-transform 250ms ease-out; + } + .sidebar-toggle { + background-color: transparent; + width: auto; + padding: 30px 30px 10px 10px; + } + body.close .sidebar { + -webkit-transform: translateX(300px); + transform: translateX(300px); + } + body.close .sidebar-toggle { + background-color: rgba(63,63,63,0.8); + -webkit-transition: 1s background-color; + transition: 1s background-color; + width: 284px; + padding: 10px; + } + body.close .content { + -webkit-transform: translateX(300px); + transform: translateX(300px); + } + body.close .app-nav, + body.close .github-corner { + display: none; + } + .github-corner:hover .octo-arm { + -webkit-animation: none; + animation: none; + } + .github-corner .octo-arm { + -webkit-animation: octocat-wave 560ms ease-in-out; + animation: octocat-wave 560ms ease-in-out; + } +} +@-webkit-keyframes octocat-wave { + 0%, 100% { + -webkit-transform: rotate(0); + transform: rotate(0); + } + 20%, 60% { + -webkit-transform: rotate(-25deg); + transform: rotate(-25deg); + } + 40%, 80% { + -webkit-transform: rotate(10deg); + transform: rotate(10deg); + } +} +@keyframes octocat-wave { + 0%, 100% { + -webkit-transform: rotate(0); + transform: rotate(0); + } + 20%, 60% { + -webkit-transform: rotate(-25deg); + transform: rotate(-25deg); + } + 40%, 80% { + -webkit-transform: rotate(10deg); + transform: rotate(10deg); + } +} +section.cover { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + background-position: center center; + background-repeat: no-repeat; + background-size: cover; + height: 100vh; + display: none; +} +section.cover.show { + display: -webkit-box; + display: -ms-flexbox; + display: flex; +} +section.cover.has-mask .mask { + background-color: #3f3f3f; + opacity: 0.8; + position: absolute; + top: 0; + height: 100%; + width: 100%; +} +section.cover .cover-main { + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1; + margin: -20px 16px 0; + text-align: center; + z-index: 1; +} +section.cover a { + color: inherit; + text-decoration: none; +} +section.cover a:hover { + text-decoration: none; +} +section.cover p { + line-height: 1.5rem; + margin: 1em 0; +} +section.cover h1 { + color: inherit; + font-size: 2.5rem; + font-weight: 300; + margin: 0.625rem 0 2.5rem; + position: relative; + text-align: center; +} +section.cover h1 a { + display: block; +} +section.cover h1 small { + bottom: -0.4375rem; + font-size: 1rem; + position: absolute; +} +section.cover blockquote { + font-size: 1.5rem; + text-align: center; +} +section.cover ul { + line-height: 1.8; + list-style-type: none; + margin: 1em auto; + max-width: 500px; + padding: 0; +} +section.cover .cover-main > p:last-child a { + border-color: var(--theme-color, #ea6f5a); + border-radius: 2rem; + border-style: solid; + border-width: 1px; + -webkit-box-sizing: border-box; + box-sizing: border-box; + color: var(--theme-color, #ea6f5a); + display: inline-block; + font-size: 1.05rem; + letter-spacing: 0.1rem; + margin: 0.5rem 1rem; + padding: 0.75em 2rem; + text-decoration: none; + -webkit-transition: all 0.15s ease; + transition: all 0.15s ease; +} +section.cover .cover-main > p:last-child a:last-child { + background-color: var(--theme-color, #ea6f5a); + color: #fff; +} +section.cover .cover-main > p:last-child a:last-child:hover { + color: inherit; + opacity: 0.8; +} +section.cover .cover-main > p:last-child a:hover { + color: inherit; +} +section.cover blockquote > p > a { + border-bottom: 2px solid var(--theme-color, #ea6f5a); + -webkit-transition: color 0.3s; + transition: color 0.3s; +} +section.cover blockquote > p > a:hover { + color: var(--theme-color, #ea6f5a); +} +body { + background-color: #3f3f3f; +} +/* sidebar */ +.sidebar { + background-color: #3f3f3f; + color: #c8c8c8; +} +.sidebar li { + margin: 6px 15px; +} +.sidebar ul li a { + color: #c8c8c8; + font-size: 14px; + overflow: hidden; + text-decoration: none; + text-overflow: ellipsis; + white-space: nowrap; +} +.sidebar ul li a:hover { + text-decoration: underline; +} +.sidebar ul li ul { + padding: 0; +} +.sidebar ul li.active > a { + color: var(--theme-color, #ea6f5a); + font-weight: 600; +} +/* markdown content found on pages */ +.markdown-section h1, +.markdown-section h2, +.markdown-section h3, +.markdown-section h4, +.markdown-section strong { + color: #657b83; + font-weight: 600; +} +.markdown-section a { + color: var(--theme-color, #ea6f5a); + font-weight: 600; +} +.markdown-section h1 { + font-size: 2rem; + margin: 0 0 1rem; +} +.markdown-section h2 { + font-size: 1.75rem; + margin: 45px 0 0.8rem; +} +.markdown-section h3 { + font-size: 1.5rem; + margin: 40px 0 0.6rem; +} +.markdown-section h4 { + font-size: 1.25rem; +} +.markdown-section h5 { + font-size: 1rem; +} +.markdown-section h6 { + color: #777; + font-size: 1rem; +} +.markdown-section figure, +.markdown-section p, +.markdown-section ul, +.markdown-section ol { + margin: 1.2em 0; +} +.markdown-section p, +.markdown-section ul, +.markdown-section ol { + line-height: 1.6rem; + word-spacing: 0.05rem; +} +.markdown-section ul, +.markdown-section ol { + padding-left: 1.5rem; +} +.markdown-section blockquote { + border-left: 4px solid var(--theme-color, #ea6f5a); + color: #858585; + margin: 2em 0; + padding-left: 20px; +} +.markdown-section blockquote p { + font-weight: 600; + margin-left: 0; +} +.markdown-section iframe { + margin: 1em 0; +} +.markdown-section em { + color: #7f8c8d; +} +.markdown-section code { + background-color: #282828; + border-radius: 2px; + color: #aaaaaa; + font-family: 'Roboto Mono', Monaco, courier, monospace; + font-size: 0.8rem; + margin: 0 2px; + padding: 3px 5px; + white-space: pre-wrap; +} +.markdown-section pre { + -moz-osx-font-smoothing: initial; + -webkit-font-smoothing: initial; + background-color: #282828; + font-family: 'Roboto Mono', Monaco, courier, monospace; + line-height: 1.5rem; + margin: 1.2em 0; + overflow: auto; + padding: 0 1.4rem; + position: relative; + word-wrap: normal; +} +/* code highlight */ +.token.comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: #8e908c; +} +.token.namespace { + opacity: 0.7; +} +.token.boolean, +.token.number { + color: #c76b29; +} +.token.punctuation { + color: #525252; +} +.token.property { + color: #c08b30; +} +.token.tag { + color: #2973b7; +} +.token.string { + color: var(--theme-color, #ea6f5a); +} +.token.selector { + color: #6679cc; +} +.token.attr-name { + color: #2973b7; +} +.token.entity, +.token.url, +.language-css .token.string, +.style .token.string { + color: #22a2c9; +} +.token.attr-value, +.token.control, +.token.directive, +.token.unit { + color: var(--theme-color, #ea6f5a); +} +.token.keyword { + color: #e96900; +} +.token.statement, +.token.regex, +.token.atrule { + color: #22a2c9; +} +.token.placeholder, +.token.variable { + color: #3d8fd1; +} +.token.deleted { + text-decoration: line-through; +} +.token.inserted { + border-bottom: 1px dotted #202746; + text-decoration: none; +} +.token.italic { + font-style: italic; +} +.token.important, +.token.bold { + font-weight: bold; +} +.token.important { + color: #c94922; +} +.token.entity { + cursor: help; +} +.markdown-section pre > code { + -moz-osx-font-smoothing: initial; + -webkit-font-smoothing: initial; + background-color: #282828; + border-radius: 2px; + color: #657b83; + display: block; + font-family: 'Roboto Mono', Monaco, courier, monospace; + font-size: 0.8rem; + line-height: inherit; + margin: 0 2px; + max-width: inherit; + overflow: inherit; + padding: 2.2em 5px; + white-space: inherit; +} +.markdown-section code::after, +.markdown-section code::before { + letter-spacing: 0.05rem; +} +code .token { + -moz-osx-font-smoothing: initial; + -webkit-font-smoothing: initial; + min-height: 1.5rem; +} +pre::after { + color: #ccc; + content: attr(data-lang); + font-size: 0.6rem; + font-weight: 600; + height: 15px; + line-height: 15px; + padding: 5px 10px 0; + position: absolute; + right: 0; + text-align: right; + top: 0; +} +.markdown-section p.tip { + background-color: #282828; + color: #657b83; +} +input[type='search'] { + background: #4f4f4f; + border-color: #4f4f4f; + color: #c8c8c8; +} diff --git a/docs/redirects.json b/docs/redirects.json index b8480836410a..43e906408157 100644 --- a/docs/redirects.json +++ b/docs/redirects.json @@ -16,6 +16,10 @@ "from": "feature_common_shortcuts.html", "to": "feature_advanced_keycodes.html" }, + { + "from": "glossary.html", + "to": "reference_glossary.html" + }, { "from": "key_lock.html", "to": "feature_key_lock.html" diff --git a/docs/glossary.md b/docs/reference_glossary.md similarity index 98% rename from docs/glossary.md rename to docs/reference_glossary.md index c8c54d6dedab..754c1469e333 100644 --- a/docs/glossary.md +++ b/docs/reference_glossary.md @@ -4,7 +4,7 @@ A line of 32-bit MCU's produced by a number of companies, such as Atmel, Cypress, Kinetis, NXP, ST, and TI. ## AVR -A line of 8-bit MCU's produced by [Atmel](http://atmel.com). AVR was the original platform that TMK supported. +A line of 8-bit MCU's produced by [Atmel](http://www.microchip.com/). AVR was the original platform that TMK supported. ## AZERTY The standard Français (French) keyboard layout. Named for the first 6 keys on the keyboard. diff --git a/docs/sidebar.css b/docs/sidebar.css new file mode 100644 index 000000000000..b1049ea68f85 --- /dev/null +++ b/docs/sidebar.css @@ -0,0 +1,10 @@ +.sidebar-toggle { + position: absolute; + top: 0; + bottom: auto; + left: 0; +} + +.search { + margin-top: 40px; +} diff --git a/docs/sw.js b/docs/sw.js new file mode 100644 index 000000000000..1e4aaeb76213 --- /dev/null +++ b/docs/sw.js @@ -0,0 +1,83 @@ +/* =========================================================== + * docsify sw.js + * =========================================================== + * Copyright 2016 @huxpro + * Licensed under Apache 2.0 + * Register service worker. + * ========================================================== */ + +const RUNTIME = 'docsify' +const HOSTNAME_WHITELIST = [ + self.location.hostname, + 'fonts.gstatic.com', + 'fonts.googleapis.com', + 'unpkg.com' +] + +// The Util Function to hack URLs of intercepted requests +const getFixedUrl = (req) => { + var now = Date.now() + var url = new URL(req.url) + + // 1. fixed http URL + // Just keep syncing with location.protocol + // fetch(httpURL) belongs to active mixed content. + // And fetch(httpRequest) is not supported yet. + url.protocol = self.location.protocol + + // 2. add query for caching-busting. + // Github Pages served with Cache-Control: max-age=600 + // max-age on mutable content is error-prone, with SW life of bugs can even extend. + // Until cache mode of Fetch API landed, we have to workaround cache-busting with query string. + // Cache-Control-Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=453190 + if (url.hostname === self.location.hostname) { + url.search += (url.search ? '&' : '?') + 'cache-bust=' + now + } + return url.href +} + +/** + * @Lifecycle Activate + * New one activated when old isnt being used. + * + * waitUntil(): activating ====> activated + */ +self.addEventListener('activate', event => { + event.waitUntil(self.clients.claim()) +}) + +/** + * @Functional Fetch + * All network requests are being intercepted here. + * + * void respondWith(Promise r) + */ +self.addEventListener('fetch', event => { + // Skip some of cross-origin requests, like those for Google Analytics. + if (HOSTNAME_WHITELIST.indexOf(new URL(event.request.url).hostname) > -1) { + // Stale-while-revalidate + // similar to HTTP's stale-while-revalidate: https://www.mnot.net/blog/2007/12/12/stale + // Upgrade from Jake's to Surma's: https://gist.github.com/surma/eb441223daaedf880801ad80006389f1 + const cached = caches.match(event.request) + const fixedUrl = getFixedUrl(event.request) + const fetched = fetch(fixedUrl, { cache: 'no-store' }) + const fetchedCopy = fetched.then(resp => resp.clone()) + + // Call respondWith() with whatever we get first. + // If the fetch fails (e.g disconnected), wait for the cache. + // If there’s nothing in cache, wait for the fetch. + // If neither yields a response, return offline pages. + event.respondWith( + Promise.race([fetched.catch(_ => cached), cached]) + .then(resp => resp || fetched) + .catch(_ => { /* eat any errors */ }) + ) + + // Update the cache with the version we fetched (only for ok status) + event.waitUntil( + Promise.all([fetchedCopy, caches.open(RUNTIME)]) + .then(([response, cache]) => response.ok && cache.put(event.request, response)) + .catch(_ => { /* eat any errors */ }) + ) + } +}) diff --git a/docs/understanding_qmk.md b/docs/understanding_qmk.md index 13b6e2ef63f9..4544cb260299 100644 --- a/docs/understanding_qmk.md +++ b/docs/understanding_qmk.md @@ -77,7 +77,7 @@ At the keyboard level we define a C macro (typically named `KEYMAP()`) which map Notice how the second block of our `KEYMAP()` macro matches the Matrix Scanning array above? This macro is what will map the matrix scanning array to keycodes. However, if you look at a 17 key numpad you'll notice that it has 3 places where the matrix could have a switch but doesn't, due to larger keys. We have populated those spaces with `KC_NO` so that our keymap definition doesn't have to. -You can also use this macro to handle unusual matrix layouts, for example the [Clueboard rev 2](https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/rev2/rev2.h). Explaining that is outside the scope of this document. +You can also use this macro to handle unusual matrix layouts, for example the [Clueboard rev 2](https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/66/rev2/rev2.h). Explaining that is outside the scope of this document. ##### Keycode Assignment @@ -135,8 +135,8 @@ The `process_record()` function itself is deceptively simple, but hidden within * [`void process_record(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action.c#L128) * [`bool process_record_quantum(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/quantum.c#L140) * [Map this record to a keycode](https://github.com/qmk/qmk_firmware/blob/master/quantum/quantum.c#L143) - * [`bool process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/keyboards/cluecard/cluecard.c#L20) - * [`bool process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/keyboards/cluecard/keymaps/default/keymap.c#L58) + * [`bool process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/card/card.c#L20) + * [`bool process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/card/keymaps/default/keymap.c#L58) * [`bool process_midi(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_midi.c#L102) * [`bool process_audio(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_audio.c#L10) * [`bool process_music(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_music.c#L69) diff --git a/doxygen-todo b/doxygen-todo new file mode 100644 index 000000000000..d5ae84058a23 --- /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/drivers/avr/i2c_master.c b/drivers/avr/i2c_master.c new file mode 100755 index 000000000000..f4a4bb7b0be4 --- /dev/null +++ b/drivers/avr/i2c_master.c @@ -0,0 +1,149 @@ +/* Library made by: g4lvanix + * Github repository: https://github.com/g4lvanix/I2C-master-lib + */ + +#include +#include + +#include "i2c_master.h" + +#define F_SCL 400000UL // SCL frequency +#define Prescaler 1 +#define TWBR_val ((((F_CPU / F_SCL) / Prescaler) - 16 ) / 2) + +void i2c_init(void) +{ + TWBR = (uint8_t)TWBR_val; +} + +uint8_t i2c_start(uint8_t address) +{ + // reset TWI control register + TWCR = 0; + // transmit START condition + TWCR = (1<. + */ + +#include "is31fl3731.h" +#include +#include +#include +#include +#include "i2c_master.h" +#include "progmem.h" + +// This is a 7-bit address, that gets left-shifted and bit 0 +// set to 0 for write, 1 for read (as per I2C protocol) +// The address will vary depending on your wiring: +// 0b1110100 AD <-> GND +// 0b1110111 AD <-> VCC +// 0b1110101 AD <-> SCL +// 0b1110110 AD <-> SDA +#define ISSI_ADDR_DEFAULT 0x74 + +#define ISSI_REG_CONFIG 0x00 +#define ISSI_REG_CONFIG_PICTUREMODE 0x00 +#define ISSI_REG_CONFIG_AUTOPLAYMODE 0x08 +#define ISSI_REG_CONFIG_AUDIOPLAYMODE 0x18 + +#define ISSI_CONF_PICTUREMODE 0x00 +#define ISSI_CONF_AUTOFRAMEMODE 0x04 +#define ISSI_CONF_AUDIOMODE 0x08 + +#define ISSI_REG_PICTUREFRAME 0x01 + +#define ISSI_REG_SHUTDOWN 0x0A +#define ISSI_REG_AUDIOSYNC 0x06 + +#define ISSI_COMMANDREGISTER 0xFD +#define ISSI_BANK_FUNCTIONREG 0x0B // helpfully called 'page nine' + +// Transfer buffer for TWITransmitData() +uint8_t g_twi_transfer_buffer[20]; + +// These buffers match the IS31FL3731 PWM registers 0x24-0xB3. +// Storing them like this is optimal for I2C transfers to the registers. +// We could optimize this and take out the unused registers from these +// buffers and the transfers in IS31FL3731_write_pwm_buffer() but it's +// probably not worth the extra complexity. +uint8_t g_pwm_buffer[DRIVER_COUNT][144]; +bool g_pwm_buffer_update_required = false; + +uint8_t g_led_control_registers[DRIVER_COUNT][18] = { { 0 }, { 0 } }; +bool g_led_control_registers_update_required = false; + +// This is the bit pattern in the LED control registers +// (for matrix A, add one to register for matrix B) +// +// reg - b7 b6 b5 b4 b3 b2 b1 b0 +// 0x00 - R08,R07,R06,R05,R04,R03,R02,R01 +// 0x02 - G08,G07,G06,G05,G04,G03,G02,R00 +// 0x04 - B08,B07,B06,B05,B04,B03,G01,G00 +// 0x06 - - , - , - , - , - ,B02,B01,B00 +// 0x08 - - , - , - , - , - , - , - , - +// 0x0A - B17,B16,B15, - , - , - , - , - +// 0x0C - G17,G16,B14,B13,B12,B11,B10,B09 +// 0x0E - R17,G15,G14,G13,G12,G11,G10,G09 +// 0x10 - R16,R15,R14,R13,R12,R11,R10,R09 + + +void IS31FL3731_write_register( uint8_t addr, uint8_t reg, uint8_t data ) +{ + g_twi_transfer_buffer[0] = reg; + g_twi_transfer_buffer[1] = data; + + //Transmit data until succesful + while(i2c_transmit(addr << 1, g_twi_transfer_buffer,2) != 0); +} + +void IS31FL3731_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer ) +{ + // assumes bank is already selected + + // transmit PWM registers in 9 transfers of 16 bytes + // g_twi_transfer_buffer[] is 20 bytes + + // iterate over the pwm_buffer contents at 16 byte intervals + for ( int i = 0; i < 144; i += 16 ) + { + // set the first register, e.g. 0x24, 0x34, 0x44, etc. + g_twi_transfer_buffer[0] = 0x24 + i; + // copy the data from i to i+15 + // device will auto-increment register for data after the first byte + // thus this sets registers 0x24-0x33, 0x34-0x43, etc. in one transfer + for ( int j = 0; j < 16; j++ ) + { + g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j]; + } + + //Transmit buffer until succesful + while(i2c_transmit(addr << 1, g_twi_transfer_buffer,17) != 0); + } +} + +void IS31FL3731_init( uint8_t addr ) +{ + // In order to avoid the LEDs being driven with garbage data + // in the LED driver's PWM registers, first enable software shutdown, + // then set up the mode and other settings, clear the PWM registers, + // then disable software shutdown. + + // select "function register" bank + IS31FL3731_write_register( addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG ); + + // enable software shutdown + IS31FL3731_write_register( addr, ISSI_REG_SHUTDOWN, 0x00 ); + // this delay was copied from other drivers, might not be needed + _delay_ms( 10 ); + + // picture mode + IS31FL3731_write_register( addr, ISSI_REG_CONFIG, ISSI_REG_CONFIG_PICTUREMODE ); + // display frame 0 + IS31FL3731_write_register( addr, ISSI_REG_PICTUREFRAME, 0x00 ); + // audio sync off + IS31FL3731_write_register( addr, ISSI_REG_AUDIOSYNC, 0x00 ); + + // select bank 0 + IS31FL3731_write_register( addr, ISSI_COMMANDREGISTER, 0 ); + + // turn off all LEDs in the LED control register + for ( int i = 0x00; i <= 0x11; i++ ) + { + IS31FL3731_write_register( addr, i, 0x00 ); + } + + // turn off all LEDs in the blink control register (not really needed) + for ( int i = 0x12; i <= 0x23; i++ ) + { + IS31FL3731_write_register( addr, i, 0x00 ); + } + + // set PWM on all LEDs to 0 + for ( int i = 0x24; i <= 0xB3; i++ ) + { + IS31FL3731_write_register( addr, i, 0x00 ); + } + + // select "function register" bank + IS31FL3731_write_register( addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG ); + + // disable software shutdown + IS31FL3731_write_register( addr, ISSI_REG_SHUTDOWN, 0x01 ); + + // select bank 0 and leave it selected. + // most usage after initialization is just writing PWM buffers in bank 0 + // as there's not much point in double-buffering + IS31FL3731_write_register( addr, ISSI_COMMANDREGISTER, 0 ); +} + +void IS31FL3731_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) +{ + if ( index >= 0 && index < DRIVER_LED_TOTAL ) { + is31_led led = g_is31_leds[index]; + + // Subtract 0x24 to get the second index of g_pwm_buffer + g_pwm_buffer[led.driver][led.r - 0x24] = red; + g_pwm_buffer[led.driver][led.g - 0x24] = green; + g_pwm_buffer[led.driver][led.b - 0x24] = blue; + g_pwm_buffer_update_required = true; + } +} + +void IS31FL3731_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) +{ + for ( int i = 0; i < DRIVER_LED_TOTAL; i++ ) + { + IS31FL3731_set_color( i, red, green, blue ); + } +} + +void IS31FL3731_set_led_control_register( uint8_t index, bool red, bool green, bool blue ) +{ + is31_led led = g_is31_leds[index]; + + uint8_t control_register_r = (led.r - 0x24) / 8; + uint8_t control_register_g = (led.g - 0x24) / 8; + uint8_t control_register_b = (led.b - 0x24) / 8; + uint8_t bit_r = (led.r - 0x24) % 8; + uint8_t bit_g = (led.g - 0x24) % 8; + uint8_t bit_b = (led.b - 0x24) % 8; + + if ( red ) { + g_led_control_registers[led.driver][control_register_r] |= (1 << bit_r); + } else { + g_led_control_registers[led.driver][control_register_r] &= ~(1 << bit_r); + } + if ( green ) { + g_led_control_registers[led.driver][control_register_g] |= (1 << bit_g); + } else { + g_led_control_registers[led.driver][control_register_g] &= ~(1 << bit_g); + } + if ( blue ) { + g_led_control_registers[led.driver][control_register_b] |= (1 << bit_b); + } else { + g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b); + } + + g_led_control_registers_update_required = true; + + +} + +void IS31FL3731_update_pwm_buffers( uint8_t addr1, uint8_t addr2 ) +{ + if ( g_pwm_buffer_update_required ) + { + IS31FL3731_write_pwm_buffer( addr1, g_pwm_buffer[0] ); + IS31FL3731_write_pwm_buffer( addr2, g_pwm_buffer[1] ); + } + g_pwm_buffer_update_required = false; +} + +void IS31FL3731_update_led_control_registers( uint8_t addr1, uint8_t addr2 ) +{ + if ( g_led_control_registers_update_required ) + { + for ( int i=0; i<18; i++ ) + { + IS31FL3731_write_register(addr1, i, g_led_control_registers[0][i] ); + IS31FL3731_write_register(addr2, i, g_led_control_registers[1][i] ); + } + } +} + diff --git a/drivers/avr/is31fl3731.h b/drivers/avr/is31fl3731.h new file mode 100644 index 000000000000..3d30fc67b754 --- /dev/null +++ b/drivers/avr/is31fl3731.h @@ -0,0 +1,214 @@ +/* Copyright 2017 Jason Williams + * Copyright 2018 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + +#ifndef IS31FL3731_DRIVER_H +#define IS31FL3731_DRIVER_H + +#include +#include + +typedef struct is31_led { + uint8_t driver:2; + uint8_t r; + uint8_t g; + uint8_t b; +} __attribute__((packed)) is31_led; + +extern const is31_led g_is31_leds[DRIVER_LED_TOTAL]; + +void IS31FL3731_init( uint8_t addr ); +void IS31FL3731_write_register( uint8_t addr, uint8_t reg, uint8_t data ); +void IS31FL3731_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer ); + +void IS31FL3731_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ); +void IS31FL3731_set_color_all( uint8_t red, uint8_t green, uint8_t blue ); + +void IS31FL3731_set_led_control_register( uint8_t index, bool red, bool green, bool blue ); + +// This should not be called from an interrupt +// (eg. from a timer interrupt). +// Call this while idle (in between matrix scans). +// If the buffer is dirty, it will update the driver with the buffer. +void IS31FL3731_update_pwm_buffers( uint8_t addr1, uint8_t addr2 ); +void IS31FL3731_update_led_control_registers( uint8_t addr1, uint8_t addr2 ); + +#define C1_1 0x24 +#define C1_2 0x25 +#define C1_3 0x26 +#define C1_4 0x27 +#define C1_5 0x28 +#define C1_6 0x29 +#define C1_7 0x2A +#define C1_8 0x2B + +#define C1_9 0x2C +#define C1_10 0x2D +#define C1_11 0x2E +#define C1_12 0x2F +#define C1_13 0x30 +#define C1_14 0x31 +#define C1_15 0x32 +#define C1_16 0x33 + +#define C2_1 0x34 +#define C2_2 0x35 +#define C2_3 0x36 +#define C2_4 0x37 +#define C2_5 0x38 +#define C2_6 0x39 +#define C2_7 0x3A +#define C2_8 0x3B + +#define C2_9 0x3C +#define C2_10 0x3D +#define C2_11 0x3E +#define C2_12 0x3F +#define C2_13 0x40 +#define C2_14 0x41 +#define C2_15 0x42 +#define C2_16 0x43 + +#define C3_1 0x44 +#define C3_2 0x45 +#define C3_3 0x46 +#define C3_4 0x47 +#define C3_5 0x48 +#define C3_6 0x49 +#define C3_7 0x4A +#define C3_8 0x4B + +#define C3_9 0x4C +#define C3_10 0x4D +#define C3_11 0x4E +#define C3_12 0x4F +#define C3_13 0x50 +#define C3_14 0x51 +#define C3_15 0x52 +#define C3_16 0x53 + +#define C4_1 0x54 +#define C4_2 0x55 +#define C4_3 0x56 +#define C4_4 0x57 +#define C4_5 0x58 +#define C4_6 0x59 +#define C4_7 0x5A +#define C4_8 0x5B + +#define C4_9 0x5C +#define C4_10 0x5D +#define C4_11 0x5E +#define C4_12 0x5F +#define C4_13 0x60 +#define C4_14 0x61 +#define C4_15 0x62 +#define C4_16 0x63 + +#define C5_1 0x64 +#define C5_2 0x65 +#define C5_3 0x66 +#define C5_4 0x67 +#define C5_5 0x68 +#define C5_6 0x69 +#define C5_7 0x6A +#define C5_8 0x6B + +#define C5_9 0x6C +#define C5_10 0x6D +#define C5_11 0x6E +#define C5_12 0x6F +#define C5_13 0x70 +#define C5_14 0x71 +#define C5_15 0x72 +#define C5_16 0x73 + +#define C6_1 0x74 +#define C6_2 0x75 +#define C6_3 0x76 +#define C6_4 0x77 +#define C6_5 0x78 +#define C6_6 0x79 +#define C6_7 0x7A +#define C6_8 0x7B + +#define C6_9 0x7C +#define C6_10 0x7D +#define C6_11 0x7E +#define C6_12 0x7F +#define C6_13 0x80 +#define C6_14 0x81 +#define C6_15 0x82 +#define C6_16 0x83 + +#define C7_1 0x84 +#define C7_2 0x85 +#define C7_3 0x86 +#define C7_4 0x87 +#define C7_5 0x88 +#define C7_6 0x89 +#define C7_7 0x8A +#define C7_8 0x8B + +#define C7_9 0x8C +#define C7_10 0x8D +#define C7_11 0x8E +#define C7_12 0x8F +#define C7_13 0x90 +#define C7_14 0x91 +#define C7_15 0x92 +#define C7_16 0x93 + +#define C8_1 0x94 +#define C8_2 0x95 +#define C8_3 0x96 +#define C8_4 0x97 +#define C8_5 0x98 +#define C8_6 0x99 +#define C8_7 0x9A +#define C8_8 0x9B + +#define C8_9 0x9C +#define C8_10 0x9D +#define C8_11 0x9E +#define C8_12 0x9F +#define C8_13 0xA0 +#define C8_14 0xA1 +#define C8_15 0xA2 +#define C8_16 0xA3 + +#define C9_1 0xA4 +#define C9_2 0xA5 +#define C9_3 0xA6 +#define C9_4 0xA7 +#define C9_5 0xA8 +#define C9_6 0xA9 +#define C9_7 0xAA +#define C9_8 0xAB + +#define C9_9 0xAC +#define C9_10 0xAD +#define C9_11 0xAE +#define C9_12 0xAF +#define C9_13 0xB0 +#define C9_14 0xB1 +#define C9_15 0xB2 +#define C9_16 0xB3 + + + +#endif // IS31FL3731_DRIVER_H diff --git a/keyboards/k_type/boards/K_TYPE_TEENSY_3_1/board.c b/drivers/boards/IC_TEENSY_3_1/board.c similarity index 100% rename from keyboards/k_type/boards/K_TYPE_TEENSY_3_1/board.c rename to drivers/boards/IC_TEENSY_3_1/board.c diff --git a/keyboards/k_type/boards/K_TYPE_TEENSY_3_1/board.h b/drivers/boards/IC_TEENSY_3_1/board.h similarity index 100% rename from keyboards/k_type/boards/K_TYPE_TEENSY_3_1/board.h rename to drivers/boards/IC_TEENSY_3_1/board.h diff --git a/drivers/boards/IC_TEENSY_3_1/board.mk b/drivers/boards/IC_TEENSY_3_1/board.mk new file mode 100644 index 000000000000..62f5b751c7d1 --- /dev/null +++ b/drivers/boards/IC_TEENSY_3_1/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/IC_TEENSY_3_1/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/IC_TEENSY_3_1 diff --git a/keyboards/1up60rgb/1up60rgb.c b/keyboards/1up60rgb/1up60rgb.c new file mode 100644 index 000000000000..4ba631c79786 --- /dev/null +++ b/keyboards/1up60rgb/1up60rgb.c @@ -0,0 +1 @@ +#include "1up60rgb.h" diff --git a/keyboards/1up60rgb/1up60rgb.h b/keyboards/1up60rgb/1up60rgb.h new file mode 100644 index 000000000000..6905fd220508 --- /dev/null +++ b/keyboards/1up60rgb/1up60rgb.h @@ -0,0 +1,81 @@ +#ifndef KB_H +#define KB_H + +#include "quantum.h" + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K400, K401, K403, K406, K410, K411, K413, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { K400, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413, K414 } \ +} + + +/* ANSI variant. No extra keys for ISO */ +#define LAYOUT_60_ansi( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ + K400, K401, K403, K406, K410, K411, K413, K414 \ +) LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K013,\ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K214, \ + K300, KC_NO,K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, KC_NO,\ + K400, K401, K403, K406, K410, K411, K413, K414 \ +) + +/* ISO variant. Remove useless ANSI keys */ +#define LAYOUT_60_iso( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ + K400, K401, K403, K406, K410, K411, K413, K414 \ +) LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K013,\ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K214, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, KC_NO,\ + K400, K401, K403, K406, K410, K411, K413, K414 \ +) + +/* HHKB Variant */ +#define LAYOUT_60_ansi_split_bs_rshift( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K400, K401, K403, K406, K410, K411, K413, K414 \ +) LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014,\ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K214, \ + K300, KC_NO,K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314,\ + K400, K401, K403, K406, K410, K411, K413, K414 \ +) + +/* HHKB Variant */ +#define LAYOUT_60_hhkb( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K401, K403, K406, K411, K413 \ +) LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K214, \ + K300, KC_NO,K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + KC_NO,K401, K403, K406, KC_NO,K411, K413, KC_NO \ +) + +#endif diff --git a/keyboards/1up60rgb/config.h b/keyboards/1up60rgb/config.h new file mode 100644 index 000000000000..bfdf354af7da --- /dev/null +++ b/keyboards/1up60rgb/config.h @@ -0,0 +1,58 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER 1upkeyboards +#define PRODUCT 1UP RGB Underglow PCB +#define DESCRIPTION 60% keyboard with RGB underglow + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_PIN B6 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 5 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 16 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#endif diff --git a/keyboards/1up60rgb/info.json b/keyboards/1up60rgb/info.json new file mode 100644 index 000000000000..67f94b7fe15d --- /dev/null +++ b/keyboards/1up60rgb/info.json @@ -0,0 +1,27 @@ +{ + "keyboard_name": "1up60rgb", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_ansi": { + "layout": [{"x":0, "y":0, "label":"~"}, {"x":1, "y":0, "label":"!"}, {"x":2, "y":0, "label":"@"}, {"x":3, "y":0, "label":"#"}, {"x":4, "y":0, "label":"$"}, {"x":5, "y":0, "label":"%"}, {"x":6, "y":0, "label":"^"}, {"x":7, "y":0, "label":"&"}, {"x":8, "y":0, "label":"*"}, {"x":9, "y":0, "label":"("}, {"x":10, "y":0, "label":")"}, {"x":11, "y":0, "label":"_"}, {"x":12, "y":0, "label":"+"}, {"x":13, "y":0, "label":"Backspace", "w":2}, {"x":0, "y":1, "label":"Tab", "w":1.5}, {"x":1.5, "y":1, "label":"Q"}, {"x":2.5, "y":1, "label":"W"}, {"x":3.5, "y":1, "label":"E"}, {"x":4.5, "y":1, "label":"R"}, {"x":5.5, "y":1, "label":"T"}, {"x":6.5, "y":1, "label":"Y"}, {"x":7.5, "y":1, "label":"U"}, {"x":8.5, "y":1, "label":"I"}, {"x":9.5, "y":1, "label":"O"}, {"x":10.5, "y":1, "label":"P"}, {"x":11.5, "y":1, "label":"{"}, {"x":12.5, "y":1, "label":"}"}, {"x":13.5, "y":1, "label":"|", "w":1.5}, {"x":0, "y":2, "label":"Caps Lock", "w":1.75}, {"x":1.75, "y":2, "label":"A"}, {"x":2.75, "y":2, "label":"S"}, {"x":3.75, "y":2, "label":"D"}, {"x":4.75, "y":2, "label":"F"}, {"x":5.75, "y":2, "label":"G"}, {"x":6.75, "y":2, "label":"H"}, {"x":7.75, "y":2, "label":"J"}, {"x":8.75, "y":2, "label":"K"}, {"x":9.75, "y":2, "label":"L"}, {"x":10.75, "y":2, "label":":"}, {"x":11.75, "y":2, "label":"\""}, {"x":12.75, "y":2, "label":"Enter", "w":2.25}, {"x":0, "y":3, "label":"Shift", "w":2.25}, {"x":2.25, "y":3, "label":"Z"}, {"x":3.25, "y":3, "label":"X"}, {"x":4.25, "y":3, "label":"C"}, {"x":5.25, "y":3, "label":"V"}, {"x":6.25, "y":3, "label":"B"}, {"x":7.25, "y":3, "label":"N"}, {"x":8.25, "y":3, "label":"M"}, {"x":9.25, "y":3, "label":"<"}, {"x":10.25, "y":3, "label":">"}, {"x":11.25, "y":3, "label":"?"}, {"x":12.25, "y":3, "label":"Shift", "w":2.75}, {"x":0, "y":4, "label":"Ctrl", "w":1.25}, {"x":1.25, "y":4, "label":"Win", "w":1.25}, {"x":2.5, "y":4, "label":"Alt", "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "label":"Alt", "w":1.25}, {"x":11.25, "y":4, "label":"Win", "w":1.25}, {"x":12.5, "y":4, "label":"Menu", "w":1.25}, {"x":13.75, "y":4, "label":"Ctrl", "w":1.25}] + }, + + "LAYOUT_60_iso": { + "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_ansi_split_bs_rshift": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Win", "x":11.5, "y":4}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + }, + "LAYOUT_60_hhkb": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Delete", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Os", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Os", "x":12.5, "y":4}] + } + } +} diff --git a/keyboards/1up60rgb/keymaps/default/keymap.c b/keyboards/1up60rgb/keymaps/default/keymap.c new file mode 100644 index 000000000000..cb372e15d733 --- /dev/null +++ b/keyboards/1up60rgb/keymaps/default/keymap.c @@ -0,0 +1,72 @@ +#include "1up60rgb.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, + KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL), + + LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + ; + + switch (id) { + + } + return MACRO_NONE; +} + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRB |= (1 << 2); PORTB &= ~(1 << 2); + } else { + DDRB &= ~(1 << 2); PORTB &= ~(1 << 2); + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} diff --git a/keyboards/1up60rgb/keymaps/iso/keymap.c b/keyboards/1up60rgb/keymaps/iso/keymap.c new file mode 100644 index 000000000000..42fcb6cf9bba --- /dev/null +++ b/keyboards/1up60rgb/keymaps/iso/keymap.c @@ -0,0 +1,72 @@ +#include "1up60rgb.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_ENT, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL), + + LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + ; + + switch (id) { + + } + return MACRO_NONE; +} + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRB |= (1 << 2); PORTB &= ~(1 << 2); + } else { + DDRB &= ~(1 << 2); PORTB &= ~(1 << 2); + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} diff --git a/keyboards/1up60rgb/keymaps/tsangan/keymap.c b/keyboards/1up60rgb/keymaps/tsangan/keymap.c new file mode 100644 index 000000000000..485010eef103 --- /dev/null +++ b/keyboards/1up60rgb/keymaps/tsangan/keymap.c @@ -0,0 +1,72 @@ +#include "1up60rgb.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, + KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, KC_RALT, KC_RGUI, KC_RCTL), + + LAYOUT_all( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL, + KC_TRNS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_UP, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_RGHT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + ; + + switch (id) { + + } + return MACRO_NONE; +} + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRB |= (1 << 2); PORTB &= ~(1 << 2); + } else { + DDRB &= ~(1 << 2); PORTB &= ~(1 << 2); + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} diff --git a/keyboards/1up60rgb/readme.md b/keyboards/1up60rgb/readme.md new file mode 100644 index 000000000000..0e132e44df7d --- /dev/null +++ b/keyboards/1up60rgb/readme.md @@ -0,0 +1,13 @@ +# 1upkeyboards 60% RGB + +Firmware for custom keyboard PCB with 60% key layout. + +Keyboard Maintainer: [rempired](https://github.com/rempired) +Hardware Supported: 1upkeyboards 60% RGB +Hardware Availability: [1upkeyboards](https://1upkeyboards.com/rgb-underglow-1up-pcb.html) + +Make example for this keyboard (after setting up your build environment): + + make 1up60rgb:default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/1up60rgb/rules.mk b/keyboards/1up60rgb/rules.mk new file mode 100644 index 000000000000..540e4ea96c27 --- /dev/null +++ b/keyboards/1up60rgb/rules.mk @@ -0,0 +1,58 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= no # Console for debug(+400) +COMMAND_ENABLE ?= no # Commands for debug and configuration +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality +AUDIO_ENABLE ?= no +RGBLIGHT_ENABLE ?= yes + +LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift 60_hhkb diff --git a/keyboards/6ball/6ball.h b/keyboards/6ball/6ball.h index 34fcc4e6a71d..234235341dcb 100644 --- a/keyboards/6ball/6ball.h +++ b/keyboards/6ball/6ball.h @@ -3,7 +3,7 @@ #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT( \ k01, k02, k03, \ k04, k05, k06 \ ) \ @@ -11,6 +11,4 @@ { k02, k03, k06, k05, k04, k01 } \ } -#define KC_KEYMAP(k01, k02, k03, k04, k05, k06) KEYMAP(KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06) - #endif diff --git a/keyboards/6ball/keymaps/default/keymap.c b/keyboards/6ball/keymaps/default/keymap.c index f93587ffc320..5081161e38b2 100644 --- a/keyboards/6ball/keymaps/default/keymap.c +++ b/keyboards/6ball/keymaps/default/keymap.c @@ -1,28 +1,22 @@ -#include "6ball.h" +#include QMK_KEYBOARD_H #define _MAIN 0 #define _FN 1 -#define KC_ KC_TRNS - #define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen #define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen #define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen #define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen #define KC_X0 LT(_FN, KC_ESC) -#define KC_RTOG RGB_TOG -#define KC_RMOD RGB_MOD -#define KC_RHUI RGB_HUI -#define KC_RHUD RGB_HUD const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_MAIN] = KC_KEYMAP( - F , X0 ,LCTL, - R , D , M + [_MAIN] = LAYOUT( + KC_F, KC_X0, KC_LCTL, + KC_R, KC_D, KC_M ), - [_FN] = KC_KEYMAP( - F , ,RHUI, - RTOG,RMOD,RHUD + [_FN] = LAYOUT( + KC_F, KC_TRNS, RGB_HUI, + RGB_TOG, RGB_MOD, RGB_HUD ) }; diff --git a/keyboards/9key/9key.h b/keyboards/9key/9key.h index f1cb30628f00..b60dc53c008d 100644 --- a/keyboards/9key/9key.h +++ b/keyboards/9key/9key.h @@ -3,7 +3,7 @@ #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT( \ k00, k01, k02, \ k10, k11, k12, \ k20, k21, k22 \ diff --git a/keyboards/9key/info.json b/keyboards/9key/info.json new file mode 100644 index 000000000000..cadfdbc4c298 --- /dev/null +++ b/keyboards/9key/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "9key", + "url": "", + "maintainer": "qmk", + "width": 3, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [{"label":"k00", "x":0, "y":0}, {"label":"k01", "x":1, "y":0}, {"label":"k02", "x":2, "y":0}, {"label":"k10", "x":0, "y":1}, {"label":"k11", "x":1, "y":1}, {"label":"k12", "x":2, "y":1}, {"label":"k20", "x":0, "y":2}, {"label":"k21", "x":1, "y":2}, {"label":"k22", "x":2, "y":2}] + } + } +} diff --git a/keyboards/9key/keymaps/default/keymap.c b/keyboards/9key/keymaps/default/keymap.c index 65f0cdd20813..9f639716955d 100644 --- a/keyboards/9key/keymaps/default/keymap.c +++ b/keyboards/9key/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "9key.h" +#include QMK_KEYBOARD_H // Tap Dance Declarations enum { @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | 7/0 | 8 | 9/FN | 7/0 = Dbl Tap 7 for 0 - 9/FN = Hold 9 for FN * `-----------------------' */ -[0] = KEYMAP( \ +[0] = LAYOUT( \ KC_1, KC_2, KC_3, \ KC_4, TD(ENT_5), KC_6, \ TD(ZERO_7), KC_8, LT(1, KC_9) \ @@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | 00 | . | | * `-----------------------' */ -[1] = KEYMAP( \ +[1] = LAYOUT( \ KC_ESC, KC_PLUS, KC_MINS, \ KC_BSPC, KC_ASTR, KC_SLSH, \ M(DBL_0), KC_DOT, KC_TRNS \ diff --git a/keyboards/acr60/acr60.h b/keyboards/acr60/acr60.h index 49defe00f340..9a2d59f6344c 100644 --- a/keyboards/acr60/acr60.h +++ b/keyboards/acr60/acr60.h @@ -3,7 +3,7 @@ #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ @@ -17,7 +17,7 @@ { K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \ } -#define KEYMAP_HHKB( \ +#define LAYOUT_hhkb( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ @@ -31,7 +31,7 @@ { KC_NO, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, KC_NO, K411, KC_NO, K413, KC_NO } \ } -#define KEYMAP_TRUE_HHKB( \ +#define LAYOUT_true_hhkb( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ @@ -45,7 +45,7 @@ { KC_NO, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, KC_NO, KC_NO } \ } -#define KEYMAP_2_SHIFTS( \ +#define LAYOUT_2_shifts( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ @@ -59,7 +59,7 @@ { K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \ } -#define KEYMAP_DIRECTIONAL( \ +#define LAYOUT_directional( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ @@ -90,7 +90,7 @@ * | K400 | K401 | K403 | K404 | K406 | K408 | K410 | K411 | K413 | K414 | * `-----------------------------------------------------------------------------------------' */ -#define MITCHSPLIT( \ +#define LAYOUT_mitchsplit( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ diff --git a/keyboards/acr60/info.json b/keyboards/acr60/info.json new file mode 100644 index 000000000000..660c357990ab --- /dev/null +++ b/keyboards/acr60/info.json @@ -0,0 +1,33 @@ +{ + "keyboard_name": "ACR60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "key_count": 67, + "layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K013", "x":13, "y":0}, {"label":"K014", "x":14, "y":0}, {"label":"K100", "x":0, "y":1, "w":1.5}, {"label":"K102", "x":1.5, "y":1}, {"label":"K103", "x":2.5, "y":1}, {"label":"K104", "x":3.5, "y":1}, {"label":"K105", "x":4.5, "y":1}, {"label":"K106", "x":5.5, "y":1}, {"label":"K107", "x":6.5, "y":1}, {"label":"K108", "x":7.5, "y":1}, {"label":"K109", "x":8.5, "y":1}, {"label":"K110", "x":9.5, "y":1}, {"label":"K111", "x":10.5, "y":1}, {"label":"K112", "x":11.5, "y":1}, {"label":"K113", "x":12.5, "y":1}, {"label":"K114", "x":13.5, "y":1, "w":1.5}, {"label":"K200", "x":0, "y":2, "w":1.75}, {"label":"K202", "x":1.75, "y":2}, {"label":"K203", "x":2.75, "y":2}, {"label":"K204", "x":3.75, "y":2}, {"label":"K205", "x":4.75, "y":2}, {"label":"K206", "x":5.75, "y":2}, {"label":"K207", "x":6.75, "y":2}, {"label":"K208", "x":7.75, "y":2}, {"label":"K209", "x":8.75, "y":2}, {"label":"K210", "x":9.75, "y":2}, {"label":"K211", "x":10.75, "y":2}, {"label":"K212", "x":11.75, "y":2}, {"label":"K213", "x":12.75, "y":2, "w":2.25}, {"label":"K300", "x":0, "y":3, "w":1.25}, {"label":"K301", "x":1.25, "y":3}, {"label":"K302", "x":2.25, "y":3}, {"label":"K303", "x":3.25, "y":3}, {"label":"K304", "x":4.25, "y":3}, {"label":"K305", "x":5.25, "y":3}, {"label":"K306", "x":6.25, "y":3}, {"label":"K307", "x":7.25, "y":3}, {"label":"K308", "x":8.25, "y":3}, {"label":"K309", "x":9.25, "y":3}, {"label":"K310", "x":10.25, "y":3}, {"label":"K311", "x":11.25, "y":3}, {"label":"K313", "x":12.25, "y":3, "w":1.75}, {"label":"K314", "x":14, "y":3}, {"label":"K400", "x":0, "y":4, "w":1.25}, {"label":"K401", "x":1.25, "y":4, "w":1.25}, {"label":"K403", "x":2.5, "y":4, "w":1.25}, {"label":"K404", "x":3.75, "y":4, "w":2.25}, {"label":"K406", "x":6, "y":4, "w":1.25}, {"label":"K408", "x":7.25, "y":4, "w":2.75}, {"label":"K410", "x":10, "y":4}, {"label":"K411", "x":11, "y":4}, {"label":"K412", "x":12, "y":4}, {"label":"K413", "x":13, "y":4}, {"label":"K414", "x":14, "y":4}] + }, + "LAYOUT_hhkb": { + "key_count": 61, + "layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K013", "x":13, "y":0}, {"label":"K014", "x":14, "y":0}, {"label":"K100", "x":0, "y":1, "w":1.5}, {"label":"K102", "x":1.5, "y":1}, {"label":"K103", "x":2.5, "y":1}, {"label":"K104", "x":3.5, "y":1}, {"label":"K105", "x":4.5, "y":1}, {"label":"K106", "x":5.5, "y":1}, {"label":"K107", "x":6.5, "y":1}, {"label":"K108", "x":7.5, "y":1}, {"label":"K109", "x":8.5, "y":1}, {"label":"K110", "x":9.5, "y":1}, {"label":"K111", "x":10.5, "y":1}, {"label":"K112", "x":11.5, "y":1}, {"label":"K113", "x":12.5, "y":1}, {"label":"K114", "x":13.5, "y":1, "w":1.5}, {"label":"K200", "x":0, "y":2, "w":1.75}, {"label":"K202", "x":1.75, "y":2}, {"label":"K203", "x":2.75, "y":2}, {"label":"K204", "x":3.75, "y":2}, {"label":"K205", "x":4.75, "y":2}, {"label":"K206", "x":5.75, "y":2}, {"label":"K207", "x":6.75, "y":2}, {"label":"K208", "x":7.75, "y":2}, {"label":"K209", "x":8.75, "y":2}, {"label":"K210", "x":9.75, "y":2}, {"label":"K211", "x":10.75, "y":2}, {"label":"K212", "x":11.75, "y":2}, {"label":"K213", "x":12.75, "y":2, "w":2.25}, {"label":"K300", "x":0, "y":3, "w":1.25}, {"label":"K301", "x":1.25, "y":3}, {"label":"K302", "x":2.25, "y":3}, {"label":"K303", "x":3.25, "y":3}, {"label":"K304", "x":4.25, "y":3}, {"label":"K305", "x":5.25, "y":3}, {"label":"K306", "x":6.25, "y":3}, {"label":"K307", "x":7.25, "y":3}, {"label":"K308", "x":8.25, "y":3}, {"label":"K309", "x":9.25, "y":3}, {"label":"K310", "x":10.25, "y":3}, {"label":"K311", "x":11.25, "y":3}, {"label":"K313", "x":12.25, "y":3, "w":1.75}, {"label":"K314", "x":14, "y":3}, {"label":"K401", "x":1.5, "y":4}, {"label":"K403", "x":2.5, "y":4, "w":1.5}, {"label":"K406", "x":4, "y":4, "w":7}, {"label":"K411", "x":11, "y":4, "w":1.5}, {"label":"K413", "x":12.5, "y":4}] + }, + "LAYOUT_true_hhkb": { + "key_count": 61, + "layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K013", "x":13, "y":0}, {"label":"K014", "x":14, "y":0}, {"label":"K100", "x":0, "y":1, "w":1.5}, {"label":"K102", "x":1.5, "y":1}, {"label":"K103", "x":2.5, "y":1}, {"label":"K104", "x":3.5, "y":1}, {"label":"K105", "x":4.5, "y":1}, {"label":"K106", "x":5.5, "y":1}, {"label":"K107", "x":6.5, "y":1}, {"label":"K108", "x":7.5, "y":1}, {"label":"K109", "x":8.5, "y":1}, {"label":"K110", "x":9.5, "y":1}, {"label":"K111", "x":10.5, "y":1}, {"label":"K112", "x":11.5, "y":1}, {"label":"K113", "x":12.5, "y":1}, {"label":"K114", "x":13.5, "y":1, "w":1.5}, {"label":"K200", "x":0, "y":2, "w":1.75}, {"label":"K202", "x":1.75, "y":2}, {"label":"K203", "x":2.75, "y":2}, {"label":"K204", "x":3.75, "y":2}, {"label":"K205", "x":4.75, "y":2}, {"label":"K206", "x":5.75, "y":2}, {"label":"K207", "x":6.75, "y":2}, {"label":"K208", "x":7.75, "y":2}, {"label":"K209", "x":8.75, "y":2}, {"label":"K210", "x":9.75, "y":2}, {"label":"K211", "x":10.75, "y":2}, {"label":"K212", "x":11.75, "y":2}, {"label":"K213", "x":12.75, "y":2, "w":2.25}, {"label":"K300", "x":0, "y":3, "w":1.25}, {"label":"K301", "x":1.25, "y":3}, {"label":"K302", "x":2.25, "y":3}, {"label":"K303", "x":3.25, "y":3}, {"label":"K304", "x":4.25, "y":3}, {"label":"K305", "x":5.25, "y":3}, {"label":"K306", "x":6.25, "y":3}, {"label":"K307", "x":7.25, "y":3}, {"label":"K308", "x":8.25, "y":3}, {"label":"K309", "x":9.25, "y":3}, {"label":"K310", "x":10.25, "y":3}, {"label":"K311", "x":11.25, "y":3}, {"label":"K313", "x":12.25, "y":3, "w":1.75}, {"label":"K314", "x":14, "y":3}, {"label":"K401", "x":1.5, "y":4}, {"label":"K403", "x":2.5, "y":4, "w":1.5}, {"label":"K406", "x":4, "y":4, "w":6}, {"label":"K410", "x":10, "y":4, "w":1.5}, {"label":"K411", "x":11.5, "y":4}] + }, + "LAYOUT_2_shifts": { + "key_count": 68, + "layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K013", "x":13, "y":0}, {"label":"K014", "x":14, "y":0}, {"label":"K100", "x":0, "y":1, "w":1.5}, {"label":"K102", "x":1.5, "y":1}, {"label":"K103", "x":2.5, "y":1}, {"label":"K104", "x":3.5, "y":1}, {"label":"K105", "x":4.5, "y":1}, {"label":"K106", "x":5.5, "y":1}, {"label":"K107", "x":6.5, "y":1}, {"label":"K108", "x":7.5, "y":1}, {"label":"K109", "x":8.5, "y":1}, {"label":"K110", "x":9.5, "y":1}, {"label":"K111", "x":10.5, "y":1}, {"label":"K112", "x":11.5, "y":1}, {"label":"K113", "x":12.5, "y":1}, {"label":"K114", "x":13.5, "y":1, "w":1.5}, {"label":"K200", "x":0, "y":2, "w":1.75}, {"label":"K202", "x":1.75, "y":2}, {"label":"K203", "x":2.75, "y":2}, {"label":"K204", "x":3.75, "y":2}, {"label":"K205", "x":4.75, "y":2}, {"label":"K206", "x":5.75, "y":2}, {"label":"K207", "x":6.75, "y":2}, {"label":"K208", "x":7.75, "y":2}, {"label":"K209", "x":8.75, "y":2}, {"label":"K210", "x":9.75, "y":2}, {"label":"K211", "x":10.75, "y":2}, {"label":"K212", "x":11.75, "y":2}, {"label":"K213", "x":12.75, "y":2, "w":2.25}, {"label":"K300", "x":0, "y":3}, {"label":"K301", "x":1, "y":3}, {"label":"K302", "x":2, "y":3}, {"label":"K303", "x":3, "y":3}, {"label":"K304", "x":4, "y":3}, {"label":"K305", "x":5, "y":3}, {"label":"K306", "x":6, "y":3}, {"label":"K307", "x":7, "y":3}, {"label":"K308", "x":8, "y":3}, {"label":"K309", "x":9, "y":3}, {"label":"K310", "x":10, "y":3}, {"label":"K311", "x":11, "y":3}, {"label":"K312", "x":12, "y":3}, {"label":"K313", "x":13, "y":3}, {"label":"K314", "x":14, "y":3}, {"label":"K400", "x":0, "y":4, "w":1.25}, {"label":"K401", "x":1.25, "y":4, "w":1.25}, {"label":"K403", "x":2.5, "y":4, "w":1.25}, {"label":"K404", "x":3.75, "y":4, "w":2.25}, {"label":"K406", "x":6, "y":4, "w":1.25}, {"label":"K408", "x":7.25, "y":4, "w":2.75}, {"label":"K410", "x":10, "y":4}, {"label":"K411", "x":11, "y":4}, {"label":"K412", "x":12, "y":4}, {"label":"K413", "x":13, "y":4}, {"label":"K414", "x":14, "y":4}] + }, + "LAYOUT_directional": { + "key_count": 67, + "layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K013", "x":13, "y":0}, {"label":"K014", "x":14, "y":0}, {"label":"K100", "x":0, "y":1, "w":1.5}, {"label":"K102", "x":1.5, "y":1}, {"label":"K103", "x":2.5, "y":1}, {"label":"K104", "x":3.5, "y":1}, {"label":"K105", "x":4.5, "y":1}, {"label":"K106", "x":5.5, "y":1}, {"label":"K107", "x":6.5, "y":1}, {"label":"K108", "x":7.5, "y":1}, {"label":"K109", "x":8.5, "y":1}, {"label":"K110", "x":9.5, "y":1}, {"label":"K111", "x":10.5, "y":1}, {"label":"K112", "x":11.5, "y":1}, {"label":"K113", "x":12.5, "y":1}, {"label":"K114", "x":13.5, "y":1, "w":1.5}, {"label":"K200", "x":0, "y":2, "w":1.75}, {"label":"K202", "x":1.75, "y":2}, {"label":"K203", "x":2.75, "y":2}, {"label":"K204", "x":3.75, "y":2}, {"label":"K205", "x":4.75, "y":2}, {"label":"K206", "x":5.75, "y":2}, {"label":"K207", "x":6.75, "y":2}, {"label":"K208", "x":7.75, "y":2}, {"label":"K209", "x":8.75, "y":2}, {"label":"K210", "x":9.75, "y":2}, {"label":"K211", "x":10.75, "y":2}, {"label":"K212", "x":11.75, "y":2}, {"label":"K213", "x":12.75, "y":2, "w":2.25}, {"label":"K300", "x":0, "y":3, "w":1.25}, {"label":"K301", "x":1.25, "y":3}, {"label":"K302", "x":2.25, "y":3}, {"label":"K303", "x":3.25, "y":3}, {"label":"K304", "x":4.25, "y":3}, {"label":"K305", "x":5.25, "y":3}, {"label":"K306", "x":6.25, "y":3}, {"label":"K307", "x":7.25, "y":3}, {"label":"K308", "x":8.25, "y":3}, {"label":"K309", "x":9.25, "y":3}, {"label":"K310", "x":10.25, "y":3}, {"label":"K312", "x":11.25, "y":3, "w":1.75}, {"label":"K313", "x":13, "y":3}, {"label":"K314", "x":14, "y":3}, {"label":"K400", "x":0, "y":4, "w":1.25}, {"label":"K401", "x":1.25, "y":4, "w":1.25}, {"label":"K403", "x":2.5, "y":4, "w":1.25}, {"label":"K404", "x":3.75, "y":4, "w":2.25}, {"label":"K406", "x":6, "y":4, "w":1.25}, {"label":"K408", "x":7.25, "y":4, "w":2.75}, {"label":"K410", "x":10, "y":4}, {"label":"K411", "x":11, "y":4}, {"label":"K412", "x":12, "y":4}, {"label":"K413", "x":13, "y":4}, {"label":"K414", "x":14, "y":4}] + }, + "LAYOUT_mitchsplit": { + "key_count": 64, + "layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K014", "x":13, "y":0, "w":2}, {"label":"K100", "x":0, "y":1, "w":1.5}, {"label":"K102", "x":1.5, "y":1}, {"label":"K103", "x":2.5, "y":1}, {"label":"K104", "x":3.5, "y":1}, {"label":"K105", "x":4.5, "y":1}, {"label":"K106", "x":5.5, "y":1}, {"label":"K107", "x":6.5, "y":1}, {"label":"K108", "x":7.5, "y":1}, {"label":"K109", "x":8.5, "y":1}, {"label":"K110", "x":9.5, "y":1}, {"label":"K111", "x":10.5, "y":1}, {"label":"K112", "x":11.5, "y":1}, {"label":"K113", "x":12.5, "y":1}, {"label":"K114", "x":13.5, "y":1, "w":1.5}, {"label":"K200", "x":0, "y":2, "w":1.75}, {"label":"K202", "x":1.75, "y":2}, {"label":"K203", "x":2.75, "y":2}, {"label":"K204", "x":3.75, "y":2}, {"label":"K205", "x":4.75, "y":2}, {"label":"K206", "x":5.75, "y":2}, {"label":"K207", "x":6.75, "y":2}, {"label":"K208", "x":7.75, "y":2}, {"label":"K209", "x":8.75, "y":2}, {"label":"K210", "x":9.75, "y":2}, {"label":"K211", "x":10.75, "y":2}, {"label":"K212", "x":11.75, "y":2}, {"label":"K213", "x":12.75, "y":2, "w":2.25}, {"label":"K300", "x":0, "y":3, "w":2.25}, {"label":"K302", "x":2.25, "y":3}, {"label":"K303", "x":3.25, "y":3}, {"label":"K304", "x":4.25, "y":3}, {"label":"K305", "x":5.25, "y":3}, {"label":"K306", "x":6.25, "y":3}, {"label":"K307", "x":7.25, "y":3}, {"label":"K308", "x":8.25, "y":3}, {"label":"K309", "x":9.25, "y":3}, {"label":"K310", "x":10.25, "y":3}, {"label":"K311", "x":11.25, "y":3}, {"label":"K313", "x":12.25, "y":3, "w":1.75}, {"label":"K314", "x":14, "y":3}, {"label":"K400", "x":0, "y":4, "w":1.25}, {"label":"K401", "x":1.25, "y":4, "w":1.25}, {"label":"K403", "x":2.5, "y":4, "w":1.25}, {"label":"K404", "x":3.75, "y":4, "w":2.75}, {"label":"K406", "x":6.5, "y":4, "w":1.25}, {"label":"K408", "x":7.75, "y":4, "w":2.25}, {"label":"K410", "x":10, "y":4, "w":1.25}, {"label":"K411", "x":11.25, "y":4, "w":1.25}, {"label":"K413", "x":12.5, "y":4, "w":1.25}, {"label":"K414", "x":13.75, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/acr60/keymaps/default/keymap.c b/keyboards/acr60/keymaps/default/keymap.c index c9ea787dcf25..a07e0ddc5920 100644 --- a/keyboards/acr60/keymaps/default/keymap.c +++ b/keyboards/acr60/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "acr60.h" +#include QMK_KEYBOARD_H #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) @@ -12,21 +12,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * accent key set up on the 2nd layer, although on the first layer it includes grave key (tilde) when shift is held down, * via the function actions code at the bottom. */ - KEYMAP( + LAYOUT( F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(2), KC_NO, MO(1), KC_RCTL), - KEYMAP( + LAYOUT( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + LAYOUT( KC_TRNS, M(1), M(2), M(3), M(4), M(5), M(6), M(7), M(8), M(9), M(10), M(11), M(12), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/acr60/keymaps/mitch/keymap.c b/keyboards/acr60/keymaps/mitch/keymap.c index 566b27359e2b..b7fcb5a04a8d 100644 --- a/keyboards/acr60/keymaps/mitch/keymap.c +++ b/keyboards/acr60/keymaps/mitch/keymap.c @@ -1,4 +1,4 @@ -#include "acr60.h" +#include QMK_KEYBOARD_H #define _DFT 0 #define _NGUI 1 @@ -18,8 +18,9 @@ /* * This is Mitch's default ACR60 layout (also DZ60, on which the ACR60 is based). This is a * Mac-oriented layout, as noted by the GUI keys immediately next to the space bar area of the - * lower modifier row. This uses the MITCHSPLIT keymap as defined in arc60.h, which uses a - * 3-split space bar and a split right shift. Otherwise it's a standard 60% layout (for now). + * lower modifier row. This uses the LAYOUT_mitchsplit keymap as defined in arc60.h, which + * uses a 3-split space bar and a split right shift. Otherwise it's a standard 60% layout (for + * now). * * For me, this is a great place to start getting used to a split key setup and still mostly * sticking to a standard staggered 60% layout so my entire game isn't thrown off. @@ -62,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * * Hit MO(_FN) and Alt in that order to lock into the _FN layer. */ - [_DFT] = MITCHSPLIT( /* Basic QWERTY */ + [_DFT] = LAYOUT_mitchsplit( /* Basic QWERTY */ F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ MO(_FN), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ @@ -91,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * to the default layer. */ /* Layer 2: "special effects": RGB lighting, backlighting, bootloader */ - [_NGUI] = MITCHSPLIT( + [_NGUI] = LAYOUT_mitchsplit( ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ @@ -118,7 +119,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * To go to the _NGUI layer, Fn+comma, to go to _DFT from _NGUI, hit Fn+M. */ /* Layer 1: Functions, primary layer switching, media controls, directional */ - [_FN] = MITCHSPLIT( + [_FN] = LAYOUT_mitchsplit( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ KC_CAPS, bbbbbb, bbbbbb, bbbbbb, bbbbbb, bbbbbb, KC_HOME, KC_PGUP, KC_UP , KC_PGDOWN,KC_END, bbbbbb, bbbbbb, bbbbbb, \ ______, KC_VOLD, KC_VOLU, KC_MUTE, bbbbbb, bbbbbb, bbbbbb, KC_LEFT, KC_DOWN, KC_RIGHT, bbbbbb, bbbbbb, ______, \ @@ -159,7 +160,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * something specific more quickly. */ /* Layer 2: "special effects": RGB lighting, backlighting, bootloader */ - [_SFX] = MITCHSPLIT( + [_SFX] = LAYOUT_mitchsplit( ______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW,RGB_M_SN,RGB_M_K, RGB_M_X, RGB_M_G,______, ______, ______, ______, ______, \ ______, BL_TOGG, BL_STEP, BL_DEC, BL_INC, ______, ______, ______, ______, ______, ______, ______, ______, RESET, \ ______, RGB_TOG, RGB_MOD,______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ diff --git a/keyboards/alf_x2/alf_x2.c b/keyboards/alf_x2/alf_x2.c new file mode 100644 index 000000000000..cc22d872a5da --- /dev/null +++ b/keyboards/alf_x2/alf_x2.c @@ -0,0 +1 @@ +#include "alf_x2.h" diff --git a/keyboards/alf_x2/alf_x2.h b/keyboards/alf_x2/alf_x2.h new file mode 100644 index 000000000000..ca40451d8b9b --- /dev/null +++ b/keyboards/alf_x2/alf_x2.h @@ -0,0 +1,98 @@ +#ifndef ALF_X2_H +#define ALF_X2_H + +#include "quantum.h" + +// K404 and K408 are the microswitches at the top of the PCB + +#define LAYOUT( \ + K404, K408, \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K400, K401, K403, K406, K410, K411, K412, K413, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \ +} + +#define LAYOUT_std_ansi( \ + K404, K408, \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ + K400, K401, K403, K406, K410, K411, K413, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO }, \ + { K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, KC_NO, K413, K414 } \ +} + +#define LAYOUT_std_splits( \ + K404, K408, \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K400, K401, K403, K406, K410, K411, K413, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, KC_NO, K413, K414 } \ +} + +#define LAYOUT_hhkb( \ + K404, K408, \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K401, K403, K406, K410, K411 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { KC_NO, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, KC_NO, KC_NO, KC_NO } \ +} + +#define LAYOUT_2u_split_arrows( \ + K404, K408, \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K400, K401, K403, K406, K410, K411, K412, K413, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \ +} + +#define LAYOUT_split_arrows( \ + K404, K408, \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K400, K401, K403, K406, K410, K411, K412, K413, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_N), K313, K314 }, \ + { K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \ +} + +#endif \ No newline at end of file diff --git a/keyboards/alf_x2/config.h b/keyboards/alf_x2/config.h new file mode 100644 index 000000000000..31212ce3368c --- /dev/null +++ b/keyboards/alf_x2/config.h @@ -0,0 +1,58 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ALF +#define PRODUCT X2 +#define DESCRIPTION ALF X2 60 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_PIN B6 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 4 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#endif \ No newline at end of file diff --git a/keyboards/alf_x2/info.json b/keyboards/alf_x2/info.json new file mode 100644 index 000000000000..85db6d69aed4 --- /dev/null +++ b/keyboards/alf_x2/info.json @@ -0,0 +1,32 @@ +{ + "keyboard_name": "ALF X2", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 6, + "layouts": { + "LAYOUT": { + "layout": [{"x":1.5, "y":0}, {"x":2.5, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"x":0, "y":4}, {"x":1, "y":4}, {"label":"Z", "x":2, "y":4}, {"label":"X", "x":3, "y":4}, {"label":"C", "x":4, "y":4}, {"label":"V", "x":5, "y":4}, {"label":"B", "x":6, "y":4}, {"label":"N", "x":7, "y":4}, {"label":"M", "x":8, "y":4}, {"label":"<", "x":9, "y":4}, {"label":">", "x":10, "y":4}, {"label":"?", "x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5}, {"label":"Win", "x":11, "y":5}, {"label":"Menu", "x":12, "y":5}, {"label":"Ctrl", "x":13, "y":5}, {"x":14, "y":5}] + }, + + "LAYOUT_std_ansi": { + "layout": [{"x":1.5, "y":0}, {"x":2.5, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":2.75}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5, "w":1.25}, {"label":"Win", "x":11.25, "y":5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5, "w":1.25}] + }, + + "LAYOUT_std_splits": { + "layout": [{"x":1.5, "y":0}, {"x":2.5, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"x":14, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5, "w":1.25}, {"label":"Win", "x":11.25, "y":5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5, "w":1.25}] + }, + + "LAYOUT_hhkb": { + "layout": [{"x":1.5, "y":0}, {"x":2.5, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"x":14, "y":4}, {"label":"Win", "x":1.5, "y":5, "w":1.25}, {"label":"Alt", "x":2.75, "y":5, "w":1.5}, {"x":4.25, "y":5, "w":6.25}, {"label":"Alt", "x":10.5, "y":5, "w":1.5}, {"label":"Win", "x":12, "y":5, "w":1.25}] + }, + + "LAYOUT_split_arrows": { + "layout": [{"x":1.5, "y":0}, {"x":2.5, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4, "w":1.75}, {"x":13, "y":4}, {"x":14, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5}, {"label":"Win", "x":11, "y":5}, {"label":"Menu", "x":12, "y":5}, {"label":"Ctrl", "x":13, "y":5}, {"x":14, "y":5}] + }, + + "LAYOUT_2u_split_arrows": { + "layout": [{"x":1.5, "y":0}, {"x":2.5, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Shift", "x":0, "y":4}, {"x":1, "y":4}, {"label":"Z", "x":2, "y":4}, {"label":"X", "x":3, "y":4}, {"label":"C", "x":4, "y":4}, {"label":"V", "x":5, "y":4}, {"label":"B", "x":6, "y":4}, {"label":"N", "x":7, "y":4}, {"label":"M", "x":8, "y":4}, {"label":"<", "x":9, "y":4}, {"label":">", "x":10, "y":4}, {"label":"?", "x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5}, {"label":"Win", "x":11, "y":5}, {"label":"Menu", "x":12, "y":5}, {"label":"Ctrl", "x":13, "y":5}, {"x":14, "y":5}] + } + } +} \ No newline at end of file diff --git a/keyboards/alf_x2/keymaps/default/keymap.c b/keyboards/alf_x2/keymaps/default/keymap.c new file mode 100644 index 000000000000..9470e38b562d --- /dev/null +++ b/keyboards/alf_x2/keymaps/default/keymap.c @@ -0,0 +1,42 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_VOLU, KC_VOLD, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, KC_NO, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_NO, KC_APP, KC_RCTL), + + LAYOUT( + KC_MNXT, KC_MPRV, + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, RESET, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + return MACRO_NONE; +} + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRB |= (1 << 2); PORTB &= ~(1 << 2); + } else { + DDRB &= ~(1 << 2); PORTB &= ~(1 << 2); + } +} diff --git a/keyboards/alf_x2/keymaps/hhkb_60/keymap.c b/keyboards/alf_x2/keymaps/hhkb_60/keymap.c new file mode 100644 index 000000000000..8baba1ae9d67 --- /dev/null +++ b/keyboards/alf_x2/keymaps/hhkb_60/keymap.c @@ -0,0 +1,42 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_VOLU, KC_VOLD, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_NO, KC_APP, KC_RCTL), + + LAYOUT( + KC_MNXT, KC_MPRV, + KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, RESET, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + return MACRO_NONE; +} + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRB |= (1 << 2); PORTB &= ~(1 << 2); + } else { + DDRB &= ~(1 << 2); PORTB &= ~(1 << 2); + } +} \ No newline at end of file diff --git a/keyboards/alf_x2/readme.md b/keyboards/alf_x2/readme.md new file mode 100644 index 000000000000..ece339fa96f1 --- /dev/null +++ b/keyboards/alf_x2/readme.md @@ -0,0 +1,15 @@ +# ALF X2 + +![alf_x2](https://cdn.shopify.com/s/files/1/1674/0405/products/1_088c2862-1f68-4fdd-a346-965208c3a3de_1024x1024.png?v=1511296076) + +A customizable 60% keyboard. + +Keyboard Maintainer: QMK Community +Hardware Supported: ALF X2 60% +Hardware Availability: [zFrontier](https://en.zfrontier.com/products/group-buy-alf-x2-60) + +Make example for this keyboard (after setting up your build environment): + + make alf_x2:default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/alf_x2/rules.mk b/keyboards/alf_x2/rules.mk new file mode 100644 index 000000000000..9c4082da29f4 --- /dev/null +++ b/keyboards/alf_x2/rules.mk @@ -0,0 +1,56 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes \ No newline at end of file diff --git a/keyboards/alpha/alpha.c b/keyboards/alpha/alpha.c new file mode 100755 index 000000000000..3029ba50a836 --- /dev/null +++ b/keyboards/alpha/alpha.c @@ -0,0 +1 @@ +#include "alpha.h" diff --git a/keyboards/alpha/alpha.h b/keyboards/alpha/alpha.h new file mode 100755 index 000000000000..025a3ac5fbbc --- /dev/null +++ b/keyboards/alpha/alpha.h @@ -0,0 +1,16 @@ +#ifndef KB_H +#define KB_H + +#include "quantum.h" + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, \ + K200, K201, K202, K203, K205, K207, K208, K209 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109 }, \ + { K200, K201, K202, K203, KC_NO, K205, KC_NO, K207, K208, K209 } \ +} + +#endif diff --git a/keyboards/alpha/config.h b/keyboards/alpha/config.h new file mode 100755 index 000000000000..02952756358c --- /dev/null +++ b/keyboards/alpha/config.h @@ -0,0 +1,58 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER PyroL +#define PRODUCT alpha +#define DESCRIPTION 28-key keyboard by PyroL + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 10 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D4, B4, B5 } +#define MATRIX_COL_PINS { D7, E6, C6, B6, B2, B3, B1, F7, F6, F5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + +#define RGB_DI_PIN F4 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 5 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#endif diff --git a/keyboards/alpha/info.json b/keyboards/alpha/info.json new file mode 100644 index 000000000000..b08e6d9a4198 --- /dev/null +++ b/keyboards/alpha/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Alpha", + "url": "", + "maintainer": "qmk", + "bootloader": "", + "width": 10, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":0.5, "y":2}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2, "w":2}, {"x":6.5, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}] + } + } +} diff --git a/keyboards/alpha/keymaps/default/keymap.c b/keyboards/alpha/keymaps/default/keymap.c new file mode 100755 index 000000000000..03c47452d3f4 --- /dev/null +++ b/keyboards/alpha/keymaps/default/keymap.c @@ -0,0 +1,76 @@ +#include QMK_KEYBOARD_H +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, TO(1), + KC_Z, KC_X, KC_C, KC_V, MT(MOD_LSFT, KC_SPC), KC_B, KC_N, KC_M), + + LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_BSPC, KC_ESC, KC_TAB, KC_SCLN, KC_QUOT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TO(2), + KC_LCTL, KC_LGUI, KC_LALT, TO(0), MT(MOD_LSFT, KC_ENT), KC_COMM, KC_DOT, KC_SLSH), + + LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_LSFT, KC_F11, KC_F12, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, TO(3), + RGB_VAI, RGB_VAD, RGB_HUI, TO(0), RGB_MOD, KC_MPLY, KC_VOLD, KC_VOLU), + + LAYOUT( + RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, M(0), KC_NO, KC_NO, KC_NO), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case 0: + SEND_STRING("I'm so sorry... -PyroL"); + return false; + } + } + return true; +}; + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} diff --git a/keyboards/alpha/readme.md b/keyboards/alpha/readme.md new file mode 100644 index 000000000000..3a733d36581f --- /dev/null +++ b/keyboards/alpha/readme.md @@ -0,0 +1,17 @@ +# Alpha + +![Alpha](https://i.imgur.com/J6EJ30N.jpg) + +A 28-key, semi-ortho keyboard designed by PyroL! + +Keyboard Maintainer: [PyroL](https://www.github.com/PyrooL) + +Hardware Supported: Alpha PCB, Pro Micro + +Hardware Availability: on a group-buy basis for now. Pro Micros can be found on Ali or from the official Sparkfun website. + +Make example for Alpha (after setting up your build environment): + + make alpha:default + +See [build environment setup](https://docs.qmk.fm/install-build-tools) then the [make instructions](https://docs.qmk.fm/faq/build-compile-qmk) for more information. \ No newline at end of file diff --git a/keyboards/alpha/rules.mk b/keyboards/alpha/rules.mk new file mode 100755 index 000000000000..61ea958d7e4b --- /dev/null +++ b/keyboards/alpha/rules.mk @@ -0,0 +1,56 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +BOOTLOADER = caterina + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes diff --git a/keyboards/alps64/alps64.h b/keyboards/alps64/alps64.h index 83af132dfc62..4e8587435cf4 100644 --- a/keyboards/alps64/alps64.h +++ b/keyboards/alps64/alps64.h @@ -21,7 +21,7 @@ along with this program. If not, see . /* Alps64 keymap definition macro */ -#define KEYMAP( \ +#define LAYOUT_all( \ K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, K27, \ K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ @@ -38,7 +38,75 @@ along with this program. If not, see . { K70, K71, K72, K73, K74, K75, K76, K77 } \ } -#define KC_KEYMAP( \ +#define LAYOUT_iso( \ + K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K27, \ + K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ + K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ + K31, K41, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \ + K30, K40, K50, K60, K70, K00, K20 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { KC_NO, K11, K12, K13, K14, K15, K16, K17 }, \ + { K20, K21, KC_NO, K23, K24, K25, KC_NO, K27 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K70, K71, K72, K73, K74, K75, K76, K77 } \ +} + +#define LAYOUT_60_ansi( \ + K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K27, \ + K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ + K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ + K31, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \ + K30, K40, K50, K60, K70, K00, K10, K20 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K20, K21, KC_NO, K23, K24, K25, KC_NO, K27 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37 }, \ + { K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K70, K71, K72, K73, K74, K75, K76, K77 } \ +} + +#define LAYOUT_infinity( \ + K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, K27, \ + K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ + K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ + K31, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, K22, \ + K30, K40, K50, K60, K70, K00, K10, K20 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37 }, \ + { K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K70, K71, K72, K73, K74, K75, K76, K77 } \ +} + +#define LAYOUT_aek_103( \ + K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K27, \ + K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ + K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ + K31, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \ + K30, K40, K50, K60, K70, K00, K20 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { KC_NO, K11, K12, K13, K14, K15, K16, K17 }, \ + { K20, K21, KC_NO, K23, K24, K25, KC_NO, K27 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37 }, \ + { K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K70, K71, K72, K73, K74, K75, K76, K77 } \ +} + +#define LAYOUT_kc( \ K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, K27, \ K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ diff --git a/keyboards/alps64/info.json b/keyboards/alps64/info.json new file mode 100644 index 000000000000..1f1af4f1f333 --- /dev/null +++ b/keyboards/alps64/info.json @@ -0,0 +1,28 @@ +{ + "keyboard_name": "alps64", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_ansi": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_infinity": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Win", "x":11.5, "y":4}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + }, + + "LAYOUT_aek_103": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.5}, {"x":4.25, "y":4, "w":6.5}, {"label":"Alt", "x":10.75, "y":4, "w":1.5}, {"label":"Menu", "x":12.25, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + }, + + "LAYOUT_iso": { + "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"AltGr", "x":11, "y":4, "w":1.5}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + } + } +} diff --git a/keyboards/alps64/keymaps/default/keymap.c b/keyboards/alps64/keymaps/default/keymap.c index 49ef9b2bf3ab..dd598379e8d9 100644 --- a/keyboards/alps64/keymaps/default/keymap.c +++ b/keyboards/alps64/keymaps/default/keymap.c @@ -1,12 +1,13 @@ -#include "alps64.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* 0: qwerty */ - KC_KEYMAP( \ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS, BSPC, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \ - CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \ - LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT,ESC, \ - LCTL,LGUI,LALT, SPC, APP, RALT,RGUI,RCTL), + /* 0: qwerty */ + LAYOUT_all( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NUHS, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_ESC, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_APP, KC_RALT, KC_RGUI, KC_RCTL + ), }; const uint16_t PROGMEM fn_actions[] = {}; diff --git a/keyboards/alps64/rules.mk b/keyboards/alps64/rules.mk index 621dc5a95b5e..4f35faac29cd 100644 --- a/keyboards/alps64/rules.mk +++ b/keyboards/alps64/rules.mk @@ -64,3 +64,5 @@ CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover - not yet supported in LUFA + +LAYOUTS = 60_ansi diff --git a/keyboards/alu84/alu84.h b/keyboards/alu84/alu84.h index 299b6a22b2ee..c171e4c1d8a6 100755 --- a/keyboards/alu84/alu84.h +++ b/keyboards/alu84/alu84.h @@ -22,7 +22,7 @@ -#define KEYMAP( \ +#define LAYOUT( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ diff --git a/keyboards/alu84/info.json b/keyboards/alu84/info.json new file mode 100644 index 000000000000..97f2b5facca2 --- /dev/null +++ b/keyboards/alu84/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "ALU84", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT": { + "layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K013", "x":13, "y":0}, {"label":"K014", "x":14, "y":0}, {"label":"K015", "x":15, "y":0}, {"label":"K100", "x":0, "y":1}, {"label":"K101", "x":1, "y":1}, {"label":"K102", "x":2, "y":1}, {"label":"K103", "x":3, "y":1}, {"label":"K104", "x":4, "y":1}, {"label":"K105", "x":5, "y":1}, {"label":"K106", "x":6, "y":1}, {"label":"K107", "x":7, "y":1}, {"label":"K108", "x":8, "y":1}, {"label":"K109", "x":9, "y":1}, {"label":"K110", "x":10, "y":1}, {"label":"K111", "x":11, "y":1}, {"label":"K112", "x":12, "y":1}, {"label":"K114", "x":13, "y":1, "w":2}, {"label":"K115", "x":15, "y":1}, {"label":"K200", "x":0, "y":2, "w":1.5}, {"label":"K202", "x":1.5, "y":2}, {"label":"K203", "x":2.5, "y":2}, {"label":"K204", "x":3.5, "y":2}, {"label":"K205", "x":4.5, "y":2}, {"label":"K206", "x":5.5, "y":2}, {"label":"K207", "x":6.5, "y":2}, {"label":"K208", "x":7.5, "y":2}, {"label":"K209", "x":8.5, "y":2}, {"label":"K210", "x":9.5, "y":2}, {"label":"K211", "x":10.5, "y":2}, {"label":"K212", "x":11.5, "y":2}, {"label":"K213", "x":12.5, "y":2}, {"label":"K214", "x":13.5, "y":2, "w":1.5}, {"label":"K215", "x":15, "y":2}, {"label":"K300", "x":0, "y":3, "w":1.75}, {"label":"K302", "x":1.75, "y":3}, {"label":"K303", "x":2.75, "y":3}, {"label":"K304", "x":3.75, "y":3}, {"label":"K305", "x":4.75, "y":3}, {"label":"K306", "x":5.75, "y":3}, {"label":"K307", "x":6.75, "y":3}, {"label":"K308", "x":7.75, "y":3}, {"label":"K309", "x":8.75, "y":3}, {"label":"K310", "x":9.75, "y":3}, {"label":"K311", "x":10.75, "y":3}, {"label":"K312", "x":11.75, "y":3}, {"label":"K313", "x":12.75, "y":3, "w":2.25}, {"label":"K315", "x":15, "y":3}, {"label":"K400", "x":0, "y":4, "w":2.25}, {"label":"K402", "x":2.25, "y":4}, {"label":"K403", "x":3.25, "y":4}, {"label":"K404", "x":4.25, "y":4}, {"label":"K405", "x":5.25, "y":4}, {"label":"K406", "x":6.25, "y":4}, {"label":"K407", "x":7.25, "y":4}, {"label":"K408", "x":8.25, "y":4}, {"label":"K409", "x":9.25, "y":4}, {"label":"K410", "x":10.25, "y":4}, {"label":"K411", "x":11.25, "y":4}, {"label":"K413", "x":12.25, "y":4, "w":1.75}, {"label":"K414", "x":14, "y":4}, {"label":"K415", "x":15, "y":4}, {"label":"K500", "x":0, "y":5, "w":1.25}, {"label":"K501", "x":1.25, "y":5, "w":1.25}, {"label":"K503", "x":2.5, "y":5, "w":1.25}, {"label":"K506", "x":3.75, "y":5, "w":6.25}, {"label":"K510", "x":10, "y":5}, {"label":"K511", "x":11, "y":5}, {"label":"K512", "x":12, "y":5}, {"label":"K513", "x":13, "y":5}, {"label":"K514", "x":14, "y":5}, {"label":"K515", "x":15, "y":5}] + } + } +} diff --git a/keyboards/alu84/keymaps/default/keymap.c b/keyboards/alu84/keymaps/default/keymap.c index 31e640ec908c..10dbe273a798 100755 --- a/keyboards/alu84/keymaps/default/keymap.c +++ b/keyboards/alu84/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "alu84.h" +#include QMK_KEYBOARD_H #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) #define _BL 0 @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -' */ - [_BL] = KEYMAP( + [_BL] = LAYOUT( KC_ESC, KC_F14, KC_F15, LCTL(KC_UP), LCTL(KC_L), KC_F11, LALT(LGUI(KC_D)), LCTL(KC_S), LCTL(LSFT(KC_O)), LCTL(LGUI(KC_1)), LCTL(LGUI(KC_2)), LCTL(LGUI(KC_3)), KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_POWER, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, LCTL(LGUI(KC_N)), @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -' */ - [_FN1] = KEYMAP( + [_FN1] = LAYOUT( LALT(LGUI(KC_Q)), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, LCTL(LALT(LGUI(KC_S))), KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/alu84/keymaps/turbomech/keymap.c b/keyboards/alu84/keymaps/turbomech/keymap.c index 97b192a7bb6e..b204a68657c6 100644 --- a/keyboards/alu84/keymaps/turbomech/keymap.c +++ b/keyboards/alu84/keymaps/turbomech/keymap.c @@ -15,7 +15,7 @@ */ -#include "alu84.h" +#include QMK_KEYBOARD_H #include "turbomech.h" #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -' */ - [_QWERTY] = KEYMAP( + [_QWERTY] = LAYOUT( KC_ESC, KC_F14, KC_F15, LCTL(KC_UP), LCTL(KC_L), KC_F11, LALT(LGUI(KC_D)), LCTL(KC_S), LCTL(LSFT(KC_O)), LCTL(LGUI(KC_1)), LCTL(LGUI(KC_2)), LCTL(LGUI(KC_3)), KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_POWER, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, LCTL(LGUI(KC_N)), @@ -78,7 +78,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ - [_FUNCTION] = KEYMAP( + [_FUNCTION] = LAYOUT( LALT(LGUI(KC_Q)), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, LCTL(LALT(LGUI(KC_S))), KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/alu84/readme.md b/keyboards/alu84/readme.md index 9d23bff067cc..ab20c4138921 100644 --- a/keyboards/alu84/readme.md +++ b/keyboards/alu84/readme.md @@ -5,10 +5,8 @@ ALU84 A 75% keyboard made and sold by MECHKEYS [More info on MECHKEYS](https://mechkeys.ca). -Keyboard Maintainer: [TurboMech](https://github.com/TurboMech) - -Hardware Supported: ALU84 - +Keyboard Maintainer: [TurboMech](https://github.com/TurboMech) +Hardware Supported: ALU84 Hardware Availability: [MECHKEYS](https://mechkeys.ca) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/amj40/amj40.h b/keyboards/amj40/amj40.h index ab629cba7ff7..613f3740f952 100755 --- a/keyboards/amj40/amj40.h +++ b/keyboards/amj40/amj40.h @@ -17,7 +17,7 @@ * | 30 | 31 | 32 | 34 | 35 | 39 | 3A | 3B | * `-----------------------------------------------------------' */ -#define KEYMAP( \ +#define LAYOUT( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1b, \ k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ diff --git a/keyboards/amj40/info.json b/keyboards/amj40/info.json new file mode 100644 index 000000000000..ddbd34a7c4f9 --- /dev/null +++ b/keyboards/amj40/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "AMJ40", + "url": "", + "maintainer": "qmk", + "bootloader": "", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1, "w":1.25}, {"x":1.25, "y":1}, {"x":2.25, "y":1}, {"x":3.25, "y":1}, {"x":4.25, "y":1}, {"x":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1, "w":1.75}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2, "w":1.25}, {"x":11, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3, "w":1.25}, {"x":3.5, "y":3, "w":2.25}, {"x":5.75, "y":3, "w":2.75}, {"x":8.5, "y":3, "w":1.25}, {"x":9.75, "y":3}, {"x":10.75, "y":3, "w":1.25}] + } + } +} diff --git a/keyboards/amj40/keymaps/default/keymap.c b/keyboards/amj40/keymaps/default/keymap.c index e4607eae5c06..c81317b84425 100755 --- a/keyboards/amj40/keymaps/default/keymap.c +++ b/keyboards/amj40/keymaps/default/keymap.c @@ -1,7 +1,7 @@ -#include "amj40.h" +#include QMK_KEYBOARD_H // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | LCtl | LGui| LAlt| spc fn0 | spc fn1 |fn2|RAlt|RCtl | * `-----------------------------------------------------------' */ - [_QWERTY] = KEYMAP( \ + [_QWERTY] = LAYOUT( \ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,\ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,\ @@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | Stop| App| | * `-----------------------------------------------------------' */ - [_LOWER] = KEYMAP( \ + [_LOWER] = LAYOUT( \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),BL_TOGG, BL_INC, BL_DEC, \ @@ -77,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | Stop| App| | * `-----------------------------------------------------------' */ - [_RAISE] = KEYMAP( \ + [_RAISE] = LAYOUT( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, KC_DEL, \ @@ -95,7 +95,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | Stop| App| | * `-----------------------------------------------------------' */ - [_ADJUST] = KEYMAP( \ + [_ADJUST] = LAYOUT( \ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, \ _______, _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, \ diff --git a/keyboards/amj40/keymaps/fabian/keymap.c b/keyboards/amj40/keymaps/fabian/keymap.c index 41a128e2b278..5055771ff86e 100755 --- a/keyboards/amj40/keymaps/fabian/keymap.c +++ b/keyboards/amj40/keymaps/fabian/keymap.c @@ -13,11 +13,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "amj40.h" +#include QMK_KEYBOARD_H // Set the custom keymap -#undef KEYMAP -#define KEYMAP( \ +#undef LAYOUT +#define LAYOUT( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ @@ -73,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Meh | Alt | GUI | Lower and Space | Raise | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = KEYMAP( \ +[_QWERTY] = LAYOUT( \ HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \ @@ -91,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Meh | Alt | GUI | Lower and Space | Raise | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = KEYMAP( \ +[_COLEMAK] = LAYOUT( \ HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \ @@ -109,7 +109,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Meh | Alt | GUI | Lower and Space | Raise | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = KEYMAP( \ +[_DVORAK] = LAYOUT( \ HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ SFT_BSP, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, \ @@ -127,7 +127,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = KEYMAP( \ +[_LOWER] = LAYOUT( \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_BTN1, \ @@ -145,7 +145,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = KEYMAP( \ +[_RAISE] = LAYOUT( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BTN2, \ @@ -163,7 +163,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = KEYMAP( \ +[_ADJUST] = LAYOUT( \ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, RESET, KC_DEL, \ _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ diff --git a/keyboards/amj40/keymaps/jetpacktuxedo/keymap.c b/keyboards/amj40/keymaps/jetpacktuxedo/keymap.c new file mode 100755 index 000000000000..caf6700bc390 --- /dev/null +++ b/keyboards/amj40/keymaps/jetpacktuxedo/keymap.c @@ -0,0 +1,43 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Default Layer + [0] = LAYOUT( \ + KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\ + LT(2, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(2, KC_ENT),\ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MT(MOD_RSFT, KC_SLSH),\ + KC_LCTL, KC_LGUI, KC_LALT, LT(1, KC_SPC), LT(1, KC_SPC), KC_RALT, MO(3), KC_RCTL \ + ), + + // Number Layer + [1] = LAYOUT( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + KC_TRNS, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, MT(MOD_RSFT, KC_BSLS), \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS\ + ), + + // Shifted Layer + [2] = LAYOUT( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,\ + KC_TRNS, KC_UNDS, KC_PLUS, KC_COLN, KC_DQUO, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_RCBR, KC_PIPE, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS\ + ), + + // Fkey Layer + [3] = LAYOUT( \ + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RESET,\ + KC_TRNS, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, TG(4), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS\ + ), + + // Gaming Layer + [4] = LAYOUT( \ + KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_U, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS,\ + KC_TAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS\ + ), +}; diff --git a/keyboards/amj40/keymaps/jetpacktuxedo/readme.md b/keyboards/amj40/keymaps/jetpacktuxedo/readme.md new file mode 100755 index 000000000000..64ae16c7eb8b --- /dev/null +++ b/keyboards/amj40/keymaps/jetpacktuxedo/readme.md @@ -0,0 +1,55 @@ +Jetpacktuxedo's AMJ40 layout +===================== + +This is based heavily on my minivan layout, with most difference stemming from the different widths between the minivan and the AMJ40. ![Image of my specific layout](https://i.imgur.com/B9XraJY.jpg) + +## Base Layer (0) + +The base layer is pretty simple, straight qwerty layout where available. Both spacebars go to layer 1 when held. `tab` is `tab` when pressed and `fn2` when held, `enter` is the same. `GESC` is `esc` when used alone, but `~` when shifted. `/` is `/` when tapped but `rshift` when held. +``` +|GESC| Q | W | E | R | T | Y | U | I | O | P |BSPC| +| TAB | A | S | D | F | G | H | J | K | L | ENTER | +|LSHIFT | Z | X | C | V | B | N | M | , | . | / | +|LCTRL|LWIN|LALT | SPACE | SPACE |RALT |FN 3|RCTRL | +``` + +## Number Layer (1) + +Numbers are set up just like on my minivan layout, but symbols are a bit different because the AMJ40 is one key narrower than the minivan and also lacks dedicated arrows. Decided to go with `hjkl` arrows, which takes some getting used to. `;` is on a layer now because of the narrowness I mentioned before, and it (along with `-`, `=`, and `'`) moves to the right hand to leave room for the `hjkl` arrows. `delete` on `backspace`, `[` and `]` on `<` and `>`, and `\` on `/` are all stolen straight from my minivan layout. +``` +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |DEL | +| | - | = | ; | ' | | ← | ↓ | ↑ | → | | +| | | | | | | | | [ | ] | \ | +| | | | | | | | | +``` + +## Shifted Layer (2) + +I don't want to be using two key combos constantly, so I also added this symbol layer that is basically shift+numeric layer. Also has nav keys on top of where arrows sit on the previous layer +``` +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) |DEL | +| | _ | + | : | " | |HOME|PGDN|PGUP|END | | +| | | | | | | | | { | } | | | +| | | | | | | | | +``` + +## Fkey Layer (3) + +Honestly, I use this more for jumping to my gaming layer and for reset than I use it for Fkeys. Lol. Hitting the left windows key while in this layer locks the gaming layer listed below +``` +| | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 |F10 |RSET| +| |F11 |F12 | | | | | | | | | +| | | | | | | | | | | | +| |FN 4| | | | | | | +``` + +## "Gaming" Layer (4) + +Based on the "gaming" layer on my minivan that I mostly just use for mouse keys. To toggle this back off you hit the right windows key (to go to layer 3) and then the left windows key again. +``` +|ESC | | | | | |MWUP|MLCK|M UP|MRCK| | | +| TAB | | | | | |MWDN|M L |M DN|M R | | +| | | | | | | | | | | | +| | | | SPACE | | | | | +``` + diff --git a/keyboards/amj40/keymaps/jetpacktuxedo/rules.mk b/keyboards/amj40/keymaps/jetpacktuxedo/rules.mk new file mode 100644 index 000000000000..d7f3e76054e4 --- /dev/null +++ b/keyboards/amj40/keymaps/jetpacktuxedo/rules.mk @@ -0,0 +1,27 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. It uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/amj40/keymaps/myee/build.sh b/keyboards/amj40/keymaps/myee/build.sh new file mode 100644 index 000000000000..6b4b4568f54d --- /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 000000000000..8e6c4dfa4305 --- /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 000000000000..baddea72d539 --- /dev/null +++ b/keyboards/amj40/keymaps/myee/keymap.c @@ -0,0 +1,114 @@ + + + +#include QMK_KEYBOARD_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] = LAYOUT( \ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\ + F(2), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, \ + KC_LCTL, KC_LGUI,KC_LALT, F(0), F(1), KC_RGUI,KC_RALT, KC_RCTL \ + ), + + [_LOWER] = LAYOUT( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_UP, KC_MINS, KC_EQL, KC_DEL, \ + _______, _______, KC_ASTR, KC_LBRC, KC_RBRC, KC_QUOT, KC_DQUO, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSLS, \ + _______, _______, _______, KC_LPRN, KC_RPRN, KC_HOME, KC_PGUP, KC_PGDN, KC_END, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [_RAISE] = LAYOUT( \ + KC_GRV, KC_LPRN, KC_RPRN, KC_DQUO, KC_QUOT, KC_SCLN, KC_COLON,KC_UNDS, KC_PLUS, _______, _______, KC_BSPC, \ + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \ + _______, _______, _______, KC_LCBR, KC_RCBR, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, BL_INC, BL_DEC \ + ), + + [_ADJUST] = LAYOUT( \ + _______, 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 000000000000..2659292ae54f --- /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 000000000000..034e697bc2f2 --- /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 000000000000..da5457e19531 --- /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/amj60/amj60.h b/keyboards/amj60/amj60.h index b6aa6b7d3c04..400f0691ee64 100644 --- a/keyboards/amj60/amj60.h +++ b/keyboards/amj60/amj60.h @@ -19,7 +19,7 @@ * | 40 | 41 | 42 | 45 | 4a | 4b | 4c | 4d | * `-----------------------------------------------------------' */ -#define KEYMAP( \ +#define LAYOUT( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k49,\ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ @@ -48,7 +48,7 @@ * | 40 | 41 | 42 | 45 | 4a | 4b | 4c | 4d | * `-----------------------------------------------------------' */ -#define KEYMAP_ANSI( \ +#define LAYOUT_60_ansi( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ @@ -63,8 +63,6 @@ {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, XXX, k4a, k4b, k4c, k4d} \ } -#define LAYOUT_60_ansi KEYMAP_ANSI - /* AMJ60 HHKB matrix layout * ,------------------------------------------------------------. * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d| 49 | @@ -79,7 +77,7 @@ * `------------------------------------------------------------' */ -#define KEYMAP_HHKB( \ +#define LAYOUT_hhkb( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k49, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ @@ -107,7 +105,7 @@ * | 40 | 41 | 42 | 45 | 4a | 4b | 4c | 4d | * `-----------------------------------------------------------' */ -#define KEYMAP_ISO( \ +#define LAYOUT_iso( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ @@ -135,7 +133,7 @@ * | 40 | 41 | 42 | 45 | 4a | 4b | 4c | 4d | * `-----------------------------------------------------------' */ -#define KEYMAP_ISO_SPLITRSHIFT( \ +#define LAYOUT_iso_splitrshift( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ @@ -150,7 +148,7 @@ {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, XXX, k4a, k4b, k4c, k4d} \ } -#define KEYMAP_MAX( \ +#define LAYOUT_max( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k49,\ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ diff --git a/keyboards/amj60/info.json b/keyboards/amj60/info.json new file mode 100644 index 000000000000..dd6a7aef0ddf --- /dev/null +++ b/keyboards/amj60/info.json @@ -0,0 +1,27 @@ +{ + "keyboard_name": "AMJ60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"k00", "x":0, "y":0}, {"label":"k01", "x":1, "y":0}, {"label":"k02", "x":2, "y":0}, {"label":"k03", "x":3, "y":0}, {"label":"k04", "x":4, "y":0}, {"label":"k05", "x":5, "y":0}, {"label":"k06", "x":6, "y":0}, {"label":"k07", "x":7, "y":0}, {"label":"k08", "x":8, "y":0}, {"label":"k09", "x":9, "y":0}, {"label":"k0a", "x":10, "y":0}, {"label":"k0b", "x":11, "y":0}, {"label":"k0c", "x":12, "y":0}, {"label":"k0d", "x":13, "y":0}, {"label":"k49", "x":14, "y":0}, {"label":"k10", "x":0, "y":1, "w":1.5}, {"label":"k11", "x":1.5, "y":1}, {"label":"k12", "x":2.5, "y":1}, {"label":"k13", "x":3.5, "y":1}, {"label":"k14", "x":4.5, "y":1}, {"label":"k15", "x":5.5, "y":1}, {"label":"k16", "x":6.5, "y":1}, {"label":"k17", "x":7.5, "y":1}, {"label":"k18", "x":8.5, "y":1}, {"label":"k19", "x":9.5, "y":1}, {"label":"k1a", "x":10.5, "y":1}, {"label":"k1b", "x":11.5, "y":1}, {"label":"k1c", "x":12.5, "y":1}, {"label":"k1d", "x":13.5, "y":1, "w":1.5}, {"label":"k20", "x":0, "y":2, "w":1.75}, {"label":"k21", "x":1.75, "y":2}, {"label":"k22", "x":2.75, "y":2}, {"label":"k23", "x":3.75, "y":2}, {"label":"k24", "x":4.75, "y":2}, {"label":"k25", "x":5.75, "y":2}, {"label":"k26", "x":6.75, "y":2}, {"label":"k27", "x":7.75, "y":2}, {"label":"k28", "x":8.75, "y":2}, {"label":"k29", "x":9.75, "y":2}, {"label":"k2a", "x":10.75, "y":2}, {"label":"k2b", "x":11.75, "y":2}, {"label":"k2c", "x":12.75, "y":2}, {"label":"k2d", "x":13.75, "y":2, "w":1.25}, {"label":"k30", "x":0, "y":3, "w":1.25}, {"label":"k31", "x":1.25, "y":3}, {"label":"k32", "x":2.25, "y":3}, {"label":"k33", "x":3.25, "y":3}, {"label":"k34", "x":4.25, "y":3}, {"label":"k35", "x":5.25, "y":3}, {"label":"k36", "x":6.25, "y":3}, {"label":"k37", "x":7.25, "y":3}, {"label":"k38", "x":8.25, "y":3}, {"label":"k39", "x":9.25, "y":3}, {"label":"k3a", "x":10.25, "y":3}, {"label":"k3b", "x":11.25, "y":3}, {"label":"k3c", "x":12.25, "y":3, "w":1.75}, {"label":"k3d", "x":14, "y":3}, {"label":"k40", "x":0, "y":4, "w":1.25}, {"label":"k41", "x":1.25, "y":4, "w":1.25}, {"label":"k42", "x":2.5, "y":4, "w":1.25}, {"label":"k45", "x":3.75, "y":4, "w":6.25}, {"label":"k4a", "x":10, "y":4, "w":1.25}, {"label":"k4b", "x":11.25, "y":4, "w":1.25}, {"label":"k4c", "x":12.5, "y":4, "w":1.25}, {"label":"k4d", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_ansi": { + "layout": [{"label":"k00", "x":0, "y":0}, {"label":"k01", "x":1, "y":0}, {"label":"k02", "x":2, "y":0}, {"label":"k03", "x":3, "y":0}, {"label":"k04", "x":4, "y":0}, {"label":"k05", "x":5, "y":0}, {"label":"k06", "x":6, "y":0}, {"label":"k07", "x":7, "y":0}, {"label":"k08", "x":8, "y":0}, {"label":"k09", "x":9, "y":0}, {"label":"k0a", "x":10, "y":0}, {"label":"k0b", "x":11, "y":0}, {"label":"k0c", "x":12, "y":0}, {"label":"k0d", "x":13, "y":0, "w":2}, {"label":"k10", "x":0, "y":1, "w":1.5}, {"label":"k11", "x":1.5, "y":1}, {"label":"k12", "x":2.5, "y":1}, {"label":"k13", "x":3.5, "y":1}, {"label":"k14", "x":4.5, "y":1}, {"label":"k15", "x":5.5, "y":1}, {"label":"k16", "x":6.5, "y":1}, {"label":"k17", "x":7.5, "y":1}, {"label":"k18", "x":8.5, "y":1}, {"label":"k19", "x":9.5, "y":1}, {"label":"k1a", "x":10.5, "y":1}, {"label":"k1b", "x":11.5, "y":1}, {"label":"k1c", "x":12.5, "y":1}, {"label":"k1d", "x":13.5, "y":1, "w":1.5}, {"label":"k20", "x":0, "y":2, "w":1.75}, {"label":"k21", "x":1.75, "y":2}, {"label":"k22", "x":2.75, "y":2}, {"label":"k23", "x":3.75, "y":2}, {"label":"k24", "x":4.75, "y":2}, {"label":"k25", "x":5.75, "y":2}, {"label":"k26", "x":6.75, "y":2}, {"label":"k27", "x":7.75, "y":2}, {"label":"k28", "x":8.75, "y":2}, {"label":"k29", "x":9.75, "y":2}, {"label":"k2a", "x":10.75, "y":2}, {"label":"k2b", "x":11.75, "y":2}, {"label":"k2d", "x":12.75, "y":2, "w":2.25}, {"label":"k30", "x":0, "y":3, "w":2.25}, {"label":"k32", "x":2.25, "y":3}, {"label":"k33", "x":3.25, "y":3}, {"label":"k34", "x":4.25, "y":3}, {"label":"k35", "x":5.25, "y":3}, {"label":"k36", "x":6.25, "y":3}, {"label":"k37", "x":7.25, "y":3}, {"label":"k38", "x":8.25, "y":3}, {"label":"k39", "x":9.25, "y":3}, {"label":"k3a", "x":10.25, "y":3}, {"label":"k3b", "x":11.25, "y":3}, {"label":"k3d", "x":12.25, "y":3, "w":2.75}, {"label":"k40", "x":0, "y":4, "w":1.25}, {"label":"k41", "x":1.25, "y":4, "w":1.25}, {"label":"k42", "x":2.5, "y":4, "w":1.25}, {"label":"k45", "x":3.75, "y":4, "w":6.25}, {"label":"k4a", "x":10, "y":4, "w":1.25}, {"label":"k4b", "x":11.25, "y":4, "w":1.25}, {"label":"k4c", "x":12.5, "y":4, "w":1.25}, {"label":"k4d", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_hhkb": { + "layout": [{"label":"k00", "x":0, "y":0}, {"label":"k01", "x":1, "y":0}, {"label":"k02", "x":2, "y":0}, {"label":"k03", "x":3, "y":0}, {"label":"k04", "x":4, "y":0}, {"label":"k05", "x":5, "y":0}, {"label":"k06", "x":6, "y":0}, {"label":"k07", "x":7, "y":0}, {"label":"k08", "x":8, "y":0}, {"label":"k09", "x":9, "y":0}, {"label":"k0a", "x":10, "y":0}, {"label":"k0b", "x":11, "y":0}, {"label":"k0c", "x":12, "y":0}, {"label":"k0d", "x":13, "y":0}, {"label":"k49", "x":14, "y":0}, {"label":"k10", "x":0, "y":1, "w":1.5}, {"label":"k11", "x":1.5, "y":1}, {"label":"k12", "x":2.5, "y":1}, {"label":"k13", "x":3.5, "y":1}, {"label":"k14", "x":4.5, "y":1}, {"label":"k15", "x":5.5, "y":1}, {"label":"k16", "x":6.5, "y":1}, {"label":"k17", "x":7.5, "y":1}, {"label":"k18", "x":8.5, "y":1}, {"label":"k19", "x":9.5, "y":1}, {"label":"k1a", "x":10.5, "y":1}, {"label":"k1b", "x":11.5, "y":1}, {"label":"k1c", "x":12.5, "y":1}, {"label":"k1d", "x":13.5, "y":1, "w":1.5}, {"label":"k20", "x":0, "y":2, "w":1.75}, {"label":"k21", "x":1.75, "y":2}, {"label":"k22", "x":2.75, "y":2}, {"label":"k23", "x":3.75, "y":2}, {"label":"k24", "x":4.75, "y":2}, {"label":"k25", "x":5.75, "y":2}, {"label":"k26", "x":6.75, "y":2}, {"label":"k27", "x":7.75, "y":2}, {"label":"k28", "x":8.75, "y":2}, {"label":"k29", "x":9.75, "y":2}, {"label":"k2a", "x":10.75, "y":2}, {"label":"k2b", "x":11.75, "y":2}, {"label":"k2d", "x":12.75, "y":2, "w":2.25}, {"label":"k30", "x":0, "y":3, "w":2.25}, {"label":"k32", "x":2.25, "y":3}, {"label":"k33", "x":3.25, "y":3}, {"label":"k34", "x":4.25, "y":3}, {"label":"k35", "x":5.25, "y":3}, {"label":"k36", "x":6.25, "y":3}, {"label":"k37", "x":7.25, "y":3}, {"label":"k38", "x":8.25, "y":3}, {"label":"k39", "x":9.25, "y":3}, {"label":"k3a", "x":10.25, "y":3}, {"label":"k3b", "x":11.25, "y":3}, {"label":"k3d", "x":12.25, "y":3, "w":1.75}, {"label":"k3c", "x":14, "y":3}, {"label":"k40", "x":0, "y":4, "w":1.25}, {"label":"k41", "x":1.25, "y":4, "w":1.25}, {"label":"k42", "x":2.5, "y":4, "w":1.25}, {"label":"k45", "x":3.75, "y":4, "w":6.25}, {"label":"k4a", "x":10, "y":4, "w":1.25}, {"label":"k4b", "x":11.25, "y":4, "w":1.25}, {"label":"k4c", "x":12.5, "y":4, "w":1.25}, {"label":"k4d", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_iso": { + "layout": [{"label":"k00", "x":0, "y":0}, {"label":"k01", "x":1, "y":0}, {"label":"k02", "x":2, "y":0}, {"label":"k03", "x":3, "y":0}, {"label":"k04", "x":4, "y":0}, {"label":"k05", "x":5, "y":0}, {"label":"k06", "x":6, "y":0}, {"label":"k07", "x":7, "y":0}, {"label":"k08", "x":8, "y":0}, {"label":"k09", "x":9, "y":0}, {"label":"k0a", "x":10, "y":0}, {"label":"k0b", "x":11, "y":0}, {"label":"k0c", "x":12, "y":0}, {"label":"k0d", "x":13, "y":0, "w":2}, {"label":"k10", "x":0, "y":1, "w":1.5}, {"label":"k11", "x":1.5, "y":1}, {"label":"k12", "x":2.5, "y":1}, {"label":"k13", "x":3.5, "y":1}, {"label":"k14", "x":4.5, "y":1}, {"label":"k15", "x":5.5, "y":1}, {"label":"k16", "x":6.5, "y":1}, {"label":"k17", "x":7.5, "y":1}, {"label":"k18", "x":8.5, "y":1}, {"label":"k19", "x":9.5, "y":1}, {"label":"k1a", "x":10.5, "y":1}, {"label":"k1b", "x":11.5, "y":1}, {"label":"k1c", "x":12.5, "y":1}, {"label":"k1d", "x":13.5, "y":1, "w":1.5}, {"label":"k20", "x":0, "y":2, "w":1.75}, {"label":"k21", "x":1.75, "y":2}, {"label":"k22", "x":2.75, "y":2}, {"label":"k23", "x":3.75, "y":2}, {"label":"k24", "x":4.75, "y":2}, {"label":"k25", "x":5.75, "y":2}, {"label":"k26", "x":6.75, "y":2}, {"label":"k27", "x":7.75, "y":2}, {"label":"k28", "x":8.75, "y":2}, {"label":"k29", "x":9.75, "y":2}, {"label":"k2a", "x":10.75, "y":2}, {"label":"k2b", "x":11.75, "y":2}, {"label":"k2c", "x":12.75, "y":2}, {"label":"k2d", "x":13.75, "y":2, "w":1.25}, {"label":"k30", "x":0, "y":3, "w":1.25}, {"label":"k31", "x":1.25, "y":3}, {"label":"k32", "x":2.25, "y":3}, {"label":"k33", "x":3.25, "y":3}, {"label":"k34", "x":4.25, "y":3}, {"label":"k35", "x":5.25, "y":3}, {"label":"k36", "x":6.25, "y":3}, {"label":"k37", "x":7.25, "y":3}, {"label":"k38", "x":8.25, "y":3}, {"label":"k39", "x":9.25, "y":3}, {"label":"k3a", "x":10.25, "y":3}, {"label":"k3b", "x":11.25, "y":3}, {"label":"k3d", "x":12.25, "y":3, "w":2.75}, {"label":"k40", "x":0, "y":4, "w":1.25}, {"label":"k41", "x":1.25, "y":4, "w":1.25}, {"label":"k42", "x":2.5, "y":4, "w":1.25}, {"label":"k45", "x":3.75, "y":4, "w":6.25}, {"label":"k4a", "x":10, "y":4, "w":1.25}, {"label":"k4b", "x":11.25, "y":4, "w":1.25}, {"label":"k4c", "x":12.5, "y":4, "w":1.25}, {"label":"k4d", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_iso_splitrshift": { + "layout": [{"label":"k00", "x":0, "y":0}, {"label":"k01", "x":1, "y":0}, {"label":"k02", "x":2, "y":0}, {"label":"k03", "x":3, "y":0}, {"label":"k04", "x":4, "y":0}, {"label":"k05", "x":5, "y":0}, {"label":"k06", "x":6, "y":0}, {"label":"k07", "x":7, "y":0}, {"label":"k08", "x":8, "y":0}, {"label":"k09", "x":9, "y":0}, {"label":"k0a", "x":10, "y":0}, {"label":"k0b", "x":11, "y":0}, {"label":"k0c", "x":12, "y":0}, {"label":"k0d", "x":13, "y":0, "w":2}, {"label":"k10", "x":0, "y":1, "w":1.5}, {"label":"k11", "x":1.5, "y":1}, {"label":"k12", "x":2.5, "y":1}, {"label":"k13", "x":3.5, "y":1}, {"label":"k14", "x":4.5, "y":1}, {"label":"k15", "x":5.5, "y":1}, {"label":"k16", "x":6.5, "y":1}, {"label":"k17", "x":7.5, "y":1}, {"label":"k18", "x":8.5, "y":1}, {"label":"k19", "x":9.5, "y":1}, {"label":"k1a", "x":10.5, "y":1}, {"label":"k1b", "x":11.5, "y":1}, {"label":"k1c", "x":12.5, "y":1}, {"label":"k1d", "x":13.5, "y":1, "w":1.5}, {"label":"k20", "x":0, "y":2, "w":1.75}, {"label":"k21", "x":1.75, "y":2}, {"label":"k22", "x":2.75, "y":2}, {"label":"k23", "x":3.75, "y":2}, {"label":"k24", "x":4.75, "y":2}, {"label":"k25", "x":5.75, "y":2}, {"label":"k26", "x":6.75, "y":2}, {"label":"k27", "x":7.75, "y":2}, {"label":"k28", "x":8.75, "y":2}, {"label":"k29", "x":9.75, "y":2}, {"label":"k2a", "x":10.75, "y":2}, {"label":"k2b", "x":11.75, "y":2}, {"label":"k2c", "x":12.75, "y":2}, {"label":"k2d", "x":13.75, "y":2, "w":1.25}, {"label":"k30", "x":0, "y":3, "w":1.25}, {"label":"k31", "x":1.25, "y":3}, {"label":"k32", "x":2.25, "y":3}, {"label":"k33", "x":3.25, "y":3}, {"label":"k34", "x":4.25, "y":3}, {"label":"k35", "x":5.25, "y":3}, {"label":"k36", "x":6.25, "y":3}, {"label":"k37", "x":7.25, "y":3}, {"label":"k38", "x":8.25, "y":3}, {"label":"k39", "x":9.25, "y":3}, {"label":"k3a", "x":10.25, "y":3}, {"label":"k3b", "x":11.25, "y":3}, {"label":"k3d", "x":12.25, "y":3, "w":1.75}, {"label":"k3c", "x":14, "y":3}, {"label":"k40", "x":0, "y":4, "w":1.25}, {"label":"k41", "x":1.25, "y":4, "w":1.25}, {"label":"k42", "x":2.5, "y":4, "w":1.25}, {"label":"k45", "x":3.75, "y":4, "w":6.25}, {"label":"k4a", "x":10, "y":4, "w":1.25}, {"label":"k4b", "x":11.25, "y":4, "w":1.25}, {"label":"k4c", "x":12.5, "y":4, "w":1.25}, {"label":"k4d", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_max": { + "layout": [{"label":"k00", "x":0, "y":0}, {"label":"k01", "x":1, "y":0}, {"label":"k02", "x":2, "y":0}, {"label":"k03", "x":3, "y":0}, {"label":"k04", "x":4, "y":0}, {"label":"k05", "x":5, "y":0}, {"label":"k06", "x":6, "y":0}, {"label":"k07", "x":7, "y":0}, {"label":"k08", "x":8, "y":0}, {"label":"k09", "x":9, "y":0}, {"label":"k0a", "x":10, "y":0}, {"label":"k0b", "x":11, "y":0}, {"label":"k0c", "x":12, "y":0}, {"label":"k0d", "x":13, "y":0}, {"label":"k49", "x":14, "y":0}, {"label":"k10", "x":0, "y":1, "w":1.5}, {"label":"k11", "x":1.5, "y":1}, {"label":"k12", "x":2.5, "y":1}, {"label":"k13", "x":3.5, "y":1}, {"label":"k14", "x":4.5, "y":1}, {"label":"k15", "x":5.5, "y":1}, {"label":"k16", "x":6.5, "y":1}, {"label":"k17", "x":7.5, "y":1}, {"label":"k18", "x":8.5, "y":1}, {"label":"k19", "x":9.5, "y":1}, {"label":"k1a", "x":10.5, "y":1}, {"label":"k1b", "x":11.5, "y":1}, {"label":"k1c", "x":12.5, "y":1}, {"label":"k1d", "x":13.5, "y":1, "w":1.5}, {"label":"k20", "x":0, "y":2, "w":1.75}, {"label":"k21", "x":1.75, "y":2}, {"label":"k22", "x":2.75, "y":2}, {"label":"k23", "x":3.75, "y":2}, {"label":"k24", "x":4.75, "y":2}, {"label":"k25", "x":5.75, "y":2}, {"label":"k26", "x":6.75, "y":2}, {"label":"k27", "x":7.75, "y":2}, {"label":"k28", "x":8.75, "y":2}, {"label":"k29", "x":9.75, "y":2}, {"label":"k2a", "x":10.75, "y":2}, {"label":"k2b", "x":11.75, "y":2}, {"label":"k2d", "x":12.75, "y":2, "w":2.25}, {"label":"k30", "x":0, "y":3, "w":1.25}, {"label":"k31", "x":1.25, "y":3}, {"label":"k32", "x":2.25, "y":3}, {"label":"k33", "x":3.25, "y":3}, {"label":"k34", "x":4.25, "y":3}, {"label":"k35", "x":5.25, "y":3}, {"label":"k36", "x":6.25, "y":3}, {"label":"k37", "x":7.25, "y":3}, {"label":"k38", "x":8.25, "y":3}, {"label":"k39", "x":9.25, "y":3}, {"label":"k3a", "x":10.25, "y":3}, {"label":"k3b", "x":11.25, "y":3}, {"label":"k3d", "x":12.25, "y":3, "w":1.75}, {"label":"k3c", "x":14, "y":3}, {"label":"k40", "x":0, "y":4, "w":1.25}, {"label":"k41", "x":1.25, "y":4, "w":1.25}, {"label":"k42", "x":2.5, "y":4, "w":1.25}, {"label":"k45", "x":3.75, "y":4, "w":6.25}, {"label":"k4a", "x":10, "y":4, "w":1.25}, {"label":"k4b", "x":11.25, "y":4, "w":1.25}, {"label":"k4c", "x":12.5, "y":4, "w":1.25}, {"label":"k4d", "x":13.75, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/amj60/keymaps/default/keymap.c b/keyboards/amj60/keymaps/default/keymap.c index 5c0b374fe617..fd8e198f59c8 100644 --- a/keyboards/amj60/keymaps/default/keymap.c +++ b/keyboards/amj60/keymaps/default/keymap.c @@ -1,5 +1,5 @@ -#include "amj60.h" +#include QMK_KEYBOARD_H // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Win |Alt | Space/Fn0 |Alt |Win |Menu|RCtl| * `-----------------------------------------------------------' */ - [_DEF] = KEYMAP_MAX( + [_DEF] = LAYOUT_max( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ @@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | |Alt |Prev|Vol-|Next| * `-----------------------------------------------------------' */ - [_SPC] = KEYMAP_MAX( + [_SPC] = LAYOUT_max( KC_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \ _______, KC_PAUS, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, KC_MPLY, \ diff --git a/keyboards/amj60/keymaps/iso_split_rshift/keymap.c b/keyboards/amj60/keymaps/iso_split_rshift/keymap.c index ee6511f83451..b5fd731ddd9b 100644 --- a/keyboards/amj60/keymaps/iso_split_rshift/keymap.c +++ b/keyboards/amj60/keymaps/iso_split_rshift/keymap.c @@ -1,5 +1,5 @@ -#include "amj60.h" +#include QMK_KEYBOARD_H // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Win |Alt | Space/Fn0 |Alt |Win |Menu|RCtl| Gui Menu, RCtrl is * `-----------------------------------------------------------' LEFT DWN RIGHT */ - [_DEF] = KEYMAP_ISO_SPLITRSHIFT( + [_DEF] = LAYOUT_iso_splitrshift( KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ TABDUAL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ CAPSDUAL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, ENTERDUAL, \ @@ -68,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | |Alt |Prev|Vol-|Next| * `-----------------------------------------------------------' */ - [_SPC] = KEYMAP_ISO_SPLITRSHIFT( + [_SPC] = LAYOUT_iso_splitrshift( KC_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ _______, KC_PAUS, KC_UP, GER_BRC_L, GER_BRC_R, _______, _______, GER_PAR_L, GER_PAR_R, _______, _______, _______, _______, _______, \ _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, KC_MPLY, \ @@ -88,7 +88,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | |Alt |Pos1|PgDn|End | * `-----------------------------------------------------------' */ - [_TAB] = KEYMAP_ISO_SPLITRSHIFT( + [_TAB] = LAYOUT_iso_splitrshift( KC_WAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \ _______, _______, _______, _______, _______, _______, _______, GER_CUR_L, GER_CUR_R, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, KC_ENT, \ @@ -108,7 +108,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Win |Alt | |Alt |Left|Down|Right| * `-----------------------------------------------------------' */ - [_SFX] = KEYMAP_ISO_SPLITRSHIFT( + [_SFX] = LAYOUT_iso_splitrshift( RESET, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, KC_BSPC, \ _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, KC_BSLS, \ _______, F(2), F(3), _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, XXXXXXX, KC_ENT, \ diff --git a/keyboards/amj60/keymaps/maximized/keymap.c b/keyboards/amj60/keymaps/maximized/keymap.c index 5c0b374fe617..fd8e198f59c8 100644 --- a/keyboards/amj60/keymaps/maximized/keymap.c +++ b/keyboards/amj60/keymaps/maximized/keymap.c @@ -1,5 +1,5 @@ -#include "amj60.h" +#include QMK_KEYBOARD_H // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Win |Alt | Space/Fn0 |Alt |Win |Menu|RCtl| * `-----------------------------------------------------------' */ - [_DEF] = KEYMAP_MAX( + [_DEF] = LAYOUT_max( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ @@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | |Alt |Prev|Vol-|Next| * `-----------------------------------------------------------' */ - [_SPC] = KEYMAP_MAX( + [_SPC] = LAYOUT_max( KC_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \ _______, KC_PAUS, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, KC_MPLY, \ diff --git a/keyboards/amj96/amj96.c b/keyboards/amj96/amj96.c new file mode 100644 index 000000000000..959e321c8f69 --- /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 000000000000..37bb6566fe09 --- /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 000000000000..1ba35b54d004 --- /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 000000000000..ac399adbde41 --- /dev/null +++ b/keyboards/amj96/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "AMJ96", + "url": "", + "maintainer": "qmk", + "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 000000000000..5e346088ed1d --- /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 000000000000..72a44eedf7ed --- /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 000000000000..478ab99669f5 --- /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 000000000000..e41bbec728d3 --- /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<event.pressed) { + switch(keycode) { + case CTRLZ: + SEND_STRING(SS_LCTRL("z")); + return false; + case CTRLX: + SEND_STRING(SS_LCTRL("x")); + return false; + case CTRLC: + SEND_STRING(SS_LCTRL("c")); + return false; + case CTRLV: + SEND_STRING(SS_LCTRL("v")); + return false; + } + } + return true; +}; diff --git a/keyboards/atom47/keymaps/maartenwut/readme.md b/keyboards/atom47/keymaps/maartenwut/readme.md new file mode 100644 index 000000000000..679595385710 --- /dev/null +++ b/keyboards/atom47/keymaps/maartenwut/readme.md @@ -0,0 +1 @@ +This is the default keymap as found on the Vortex Core, with some added buttons for RGB and backlight control. diff --git a/keyboards/atom47/readme.md b/keyboards/atom47/readme.md new file mode 100644 index 000000000000..66f599c6b386 --- /dev/null +++ b/keyboards/atom47/readme.md @@ -0,0 +1,26 @@ +# Atom47 + +![Atom47](https://i.imgur.com/Wwflqvt.png) + +## Support +Keyboard Maintainer: [Maarten Dekkers](https://github.com/maartenwut) +Hardware Supported: Atom47 rev2/rev3 +Hardware Availability: [GeekHack.com Group Buy](https://geekhack.org/index.php?topic=93447.msg2545221) + + +## Features (rev3 and up) +- QMK Firmware +- 6 Underglow RGB leds +- In-switch leds +- Through-hole micro usb connector (less likely to break off!) +- South facing leds for the QMX/Zealencio users +- Multiple layouts +- Easily reachable reset button under the spacebar +- CapsLock indicator + +## Build +To build the default keymap for the latest revision, simply run `make atom47:default`. Specifiy the revision like so: `make atom47/rev3:default`. + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. + +![Atom47](https://i.imgur.com/JfYnOba.jpg) diff --git a/keyboards/atom47/rev2/config.h b/keyboards/atom47/rev2/config.h new file mode 100644 index 000000000000..df21130d36b1 --- /dev/null +++ b/keyboards/atom47/rev2/config.h @@ -0,0 +1,73 @@ +/* +Copyright 2012 Maarten Dekkers . +*/ + +#ifndef REV2_CONFIG_H +#define REV2_CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0003 +#define MANUFACTURER Vortex +#define PRODUCT Core +#define DESCRIPTION Atom47 PCB for the Vortex Core Rev.2 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 13 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS {B1,B2,B3,B7} +#define MATRIX_COL_PINS {D7,D5,F0,F1,F4,F6,F7,D4,C7,C6,D6,B5,B4} +#define UNUSED_PINS + +#define BACKLIGHT_PIN B6 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* Backlight configuration + */ +#define BACKLIGHT_LEVELS 4 + +#define RGB_DI_PIN D0 // The pin the LED strip is connected to +#define RGBLED_NUM 1 // Number of LEDs in your strip + +#define QMK_ESC_OUTPUT D7 // usually COL +#define QMK_ESC_INPUT B1 // usually ROW +#define QMK_LED B6 + +#endif diff --git a/keyboards/atom47/rev2/info.json b/keyboards/atom47/rev2/info.json new file mode 100644 index 000000000000..3c45ca8d4528 --- /dev/null +++ b/keyboards/atom47/rev2/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Atom47", + "url": "https://atomkb.eu/atom47", + "maintainer": "Maarten Dekkers", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":0, "y":1, "w":1.25}, {"x":1.25, "y":1}, {"x":2.25, "y":1}, {"x":3.25, "y":1}, {"x":4.25, "y":1}, {"x":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1}, {"x":11.25, "y":1, "w":1.75}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2, "w":1.25}, {"x":12, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3, "w":1.75}, {"x":6, "y":3, "w":2.75}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3, "w":1.25}] + } + } +} diff --git a/keyboards/atom47/rev2/readme.md b/keyboards/atom47/rev2/readme.md new file mode 100644 index 000000000000..30f44df1dc6c --- /dev/null +++ b/keyboards/atom47/rev2/readme.md @@ -0,0 +1,23 @@ +# Atom47 rev2 + +This is the keymap for rev2 of the Atom47. Only 9 of those have been sold for testing purposes. It had a slightly misaligned usb port and the pcb was too thick (should've been 1.2mm instead of 1.6mm). The pcb only supports the default hardware layout, although /u/ChrisSwires has [modified his](https://www.reddit.com/r/MechanicalKeyboards/comments/7n2dua/not_your_average_core_with_honeywell/) and put a big spacebar in it. + +## Support +Keyboard Maintainer: [Matthew Kerfoot](https://github.com/mkerfoot) +Hardware Supported: Atom47 rev2 +Hardware Availability: None + + +## Features +- QMK Firmware +- In-switch leds +- Through-hole micro usb connector (less likely to break off!) +- Easily reachable reset button under the spacebar +- In-switch CapsLock indicator + +## Build +To build the default keymap, simply run `make atom47/rev2:default`. + +For an alternative, heavily modified layout you would just need to run `make atom47/rev2:LEdiodes`. + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/atom47/rev2/rev2.c b/keyboards/atom47/rev2/rev2.c new file mode 100644 index 000000000000..31a8561f0c5e --- /dev/null +++ b/keyboards/atom47/rev2/rev2.c @@ -0,0 +1,31 @@ +#include "rev2.h" +#include "led.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + led_init_ports(); +}; + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + matrix_scan_user(); +}; + +void led_init_ports(void) { + // * Set our LED pins as output + DDRB &= ~(1<<5); +} + +void led_set_kb(uint8_t usb_led) { + if (usb_led & (1<. +*/ + +#ifndef REV3_CONFIG_H +#define REV3_CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0003 +#define MANUFACTURER Vortex +#define PRODUCT Core +#define DESCRIPTION Atom47 PCB for the Vortex Core Rev.3 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 13 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS {B3,B2,B1,B0} +#define MATRIX_COL_PINS {B7,F0,F1,F4,F6,D4,D6,D7,B4,B5,C6,C7,F7} +#define UNUSED_PINS + +#define BACKLIGHT_PIN B6 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* Backlight configuration + */ +#define BACKLIGHT_LEVELS 4 + +#define RGB_DI_PIN F5 // The pin the LED strip is connected to +#define RGBLED_NUM 6 // Number of LEDs in your strip + +#define QMK_ESC_OUTPUT B7 // usually COL +#define QMK_ESC_INPUT B3 // usually ROW +#define QMK_LED E6 + +#endif diff --git a/keyboards/atom47/rev3/info.json b/keyboards/atom47/rev3/info.json new file mode 100644 index 000000000000..3c45ca8d4528 --- /dev/null +++ b/keyboards/atom47/rev3/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Atom47", + "url": "https://atomkb.eu/atom47", + "maintainer": "Maarten Dekkers", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":0, "y":1, "w":1.25}, {"x":1.25, "y":1}, {"x":2.25, "y":1}, {"x":3.25, "y":1}, {"x":4.25, "y":1}, {"x":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1}, {"x":11.25, "y":1, "w":1.75}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2, "w":1.25}, {"x":12, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3, "w":1.75}, {"x":6, "y":3, "w":2.75}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3, "w":1.25}] + } + } +} diff --git a/keyboards/atom47/rev3/rev3.c b/keyboards/atom47/rev3/rev3.c new file mode 100644 index 000000000000..2cd04fa767bc --- /dev/null +++ b/keyboards/atom47/rev3/rev3.c @@ -0,0 +1,24 @@ +#include "rev3.h" +#include "led.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + led_init_ports(); +}; + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + matrix_scan_user(); +}; + +void led_init_ports(void) { + // * Set our LED pins as output + DDRE |= (1 << 6); +} + +void led_set_kb(uint8_t usb_led) { + led_set_user(usb_led); +} diff --git a/keyboards/atom47/rev3/rev3.h b/keyboards/atom47/rev3/rev3.h new file mode 100644 index 000000000000..ad875bb404fd --- /dev/null +++ b/keyboards/atom47/rev3/rev3.h @@ -0,0 +1,23 @@ +#ifndef ATOM47_REV3_H +#define ATOM47_REV3_H + +#include "quantum.h" + +// readability +#define XXX KC_NO + +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1c, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ + k30, k31, k32, k33, k35, k37, k39, k3a, k3b, k3c \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, XXX, k1c}, \ + {k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c}, \ + {k30, k31, k32, k33, XXX, k35, XXX, k37, XXX, k39, k3a, k3b, k3c} \ +} + + +#endif diff --git a/keyboards/atom47/rev3/rules.mk b/keyboards/atom47/rev3/rules.mk new file mode 100644 index 000000000000..13e553b56285 --- /dev/null +++ b/keyboards/atom47/rev3/rules.mk @@ -0,0 +1,2 @@ +NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) diff --git a/keyboards/atom47/rules.mk b/keyboards/atom47/rules.mk new file mode 100644 index 000000000000..5f3dbb6686c0 --- /dev/null +++ b/keyboards/atom47/rules.mk @@ -0,0 +1,66 @@ +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 +BOOTLOADER= qmk-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality (+1150) +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID + +DEFAULT_FOLDER = atom47/rev3 + diff --git a/keyboards/atomic/atomic.h b/keyboards/atomic/atomic.h index b7ceb68d07ba..a22029f7695d 100644 --- a/keyboards/atomic/atomic.h +++ b/keyboards/atomic/atomic.h @@ -10,7 +10,7 @@ // The following is an example using the Planck MIT layout // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array -#define KEYMAP_SEMI_STANDARD( \ +#define LAYOUT_semi_standard( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ @@ -24,7 +24,7 @@ { K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E } \ } -#define KEYMAP_GRID( \ +#define LAYOUT_grid( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E,\ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E,\ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E,\ @@ -38,6 +38,6 @@ { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E } \ } -#define LAYOUT_ortho_5x15 KEYMAP_GRID +#define LAYOUT_ortho_5x15 LAYOUT_grid #endif \ No newline at end of file diff --git a/keyboards/atomic/info.json b/keyboards/atomic/info.json new file mode 100644 index 000000000000..b07a070253aa --- /dev/null +++ b/keyboards/atomic/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Atomic", + "url": "", + "maintainer": "qmk", + "bootloader": "", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_semi_standard": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2, "w":2}, {"x":14, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3, "w":2}, {"x":13, "y":3}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}] + } + } +} diff --git a/keyboards/atomic/keymaps/abienz.c b/keyboards/atomic/keymaps/abienz.c index 589a64dc4e2e..2e69165f24ad 100644 --- a/keyboards/atomic/keymaps/abienz.c +++ b/keyboards/atomic/keymaps/abienz.c @@ -1,36 +1,33 @@ -#include "atomic.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = { /* Colemak */ - { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NO }, - { KC_TAB, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, CM_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, - { KC_BSPC, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, KC_QUOT, KC_ENT, KC_NO, KC_PGUP }, - { KC_LSFT, CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, CM_COMM, CM_DOT, CM_SLSH, KC_RSFT, KC_NO, KC_UP, KC_PGDN }, - { KC_LCTL, KC_LGUI, KC_NO, KC_LALT, FUNC(1), KC_SPC, KC_NO, KC_RALT, FUNC(2), KC_RGUI, KC_NO, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, - }, - [1] = { /* function */ - { KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, KC_NO }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_SLEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MPLY }, - { KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, FUNC(1), KC_TRNS, KC_NO, KC_TRNS, FUNC(2), KC_TRNS, KC_NO, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT }, - } + [0] = LAYOUT_grid( /* Colemak */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NO , + KC_TAB, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, CM_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL , + KC_BSPC, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, KC_QUOT, KC_ENT, KC_NO, KC_PGUP, + KC_LSFT, CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, CM_COMM, CM_DOT, CM_SLSH, KC_RSFT, KC_NO, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_NO, KC_LALT, FUNC(1), KC_SPC, KC_NO, KC_RALT, FUNC(2), KC_RGUI, KC_NO, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, + ), + [1] = LAYOUT_grid( /* function */ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, KC_NO , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_SLEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MPLY, + KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, FUNC(1), KC_TRNS, KC_NO, KC_TRNS, FUNC(2), KC_TRNS, KC_NO, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT, + ), }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(1), - [2] = ACTION_LAYER_MOMENTARY(1), - + [1] = ACTION_LAYER_MOMENTARY(1), + [2] = ACTION_LAYER_MOMENTARY(1), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ +const macro_t * action_get_macro(keyrecord_t * record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function - switch(id) { - case 0: - return MACRODOWN(TYPE(KC_T), END); + switch (id) { + case 0: + return MACRODOWN(TYPE(KC_T), END); break; - } - return MACRO_NONE; + } + return MACRO_NONE; }; - diff --git a/keyboards/atomic/keymaps/default/keymap.c b/keyboards/atomic/keymaps/default/keymap.c index 0ede363a1f34..ae1efb2b6632 100644 --- a/keyboards/atomic/keymaps/default/keymap.c +++ b/keyboards/atomic/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "atomic.h" +#include QMK_KEYBOARD_H // Fillers to make layering more clear #define _______ KC_TRNS @@ -21,7 +21,7 @@ * | KEY . XXXXXX | * '-----------------' */ - + /* ROW 2 OPTIONS * .--------------------------------------------------------------------------------------------------------------------------------------. * | | | | | | | | | | | | | | | | @@ -30,7 +30,7 @@ * | KEY . XXXXXX | | KEY . XXXXXX | * '-----------------' '-----------------' */ - + /* ROW 3 OPTIONS * .--------------------------------------------------------------------------------------------------------------------------------------. * | | | | | | | | | | | | | | | | @@ -42,7 +42,7 @@ * | X | * '-----------------' */ - + /* ROW 4 OPTIONS * .--------------------------------------------------------------------------------------------------------------------------------------. * | | | | | | | | | | | | | | | | @@ -78,157 +78,156 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* QWERTY - MIT ENHANCED / GRID COMPATIBLE - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | ESC | A | S | D | F | G | H | J | K | L | ; | ' | XXXXXX . ENTER | PG UP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | - * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| - * | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [_QW] = { /* QWERTY */ - { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC }, - { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, - { KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP }, - { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, - { M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT }, - }, - -/* COLEMAK - MIT ENHANCED / GRID COMPATIBLE - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | TAB | Q | W | F | P | G | J | L | U | Y | ; | [ | ] | \ | DEL | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | ESC | A | R | S | T | D | H | N | E | I | O | ' | XXXXXX . ENTER | PG UP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | LSHIFT | Z | X | C | V | B | K | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | - * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| - * | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [_CM] = { /* COLEMAK */ - { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC }, - { KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, - { KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP }, - { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, - { M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT }, - }, - -/* DVORAK - MIT ENHANCED / GRID COMPATIBLE - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | TAB | ' | , | . | P | Y | F | G | C | R | L | [ | ] | \ | DEL | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | ESC | A | O | E | U | I | D | H | T | N | S | / | XXXXXX . ENTER | PG UP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | LSHIFT | ; | Q | J | K | X | B | M | W | V | Z | XXXXXX . RSHIFT | UP | PG DN | - * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| - * | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ + /* QWERTY - MIT ENHANCED / GRID COMPATIBLE + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | ESC | A | S | D | F | G | H | J | K | L | ; | ' | XXXXXX . ENTER | PG UP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ - [_DV] = { /* DVORAK */ - { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC }, - { KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, - { KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, KC_ENT, KC_ENT, KC_PGUP }, - { KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, - { M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT }, - }, - -/* LOWERED - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | | INS | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | XXXXXX . | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | XXXXXX . | | | - * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| - * | | | | | | XXXXXX . | | | | | | | | | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [_LW] = { /* LOWERED */ - { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ }, - { _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, _______, KC_INS }, - { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, ___T___, ___T___, _______ }, - { _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, ___T___, ___T___, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - }, - -/* RAISED - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | | INS | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | XXXXXX . | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | XXXXXX . | | | - * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| - * | | | | | | XXXXXX . | | | | | | | | | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [_RS] = { /* RAISED */ - { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ }, - { _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, KC_INS }, - { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, ___T___, ___T___, _______ }, - { _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, ___T___, ___T___, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - }, - -/* FUNCTION - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | NUM LK | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | SCR LK | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | PAUSE | PR SCR | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | FAST M | NEXT | VOL+ | VOL- | PLAY | | XXXXXX . | WHEEL+ | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | | | QWERTY | COLEMK | DVORAK | | | | | | | XXXXXX . | MOUS U | WHEEL- | - * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| - * | | | | | | XXXXXX . MS BT1 | | | | | | MOUS L | MOUS D | MOUS R | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [_FN] = { /* FUNCTION */ - { KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ }, - { KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR }, - { KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U }, - { _______, _______, DF(_QW), DF(_CM), DF(_DV), _______, _______, _______, _______, _______, _______, ___T___, ___T___, KC_MS_U, KC_WH_D }, - { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R }, - }, + [_QW] = LAYOUT_grid( /* QWERTY */ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL , + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN, + M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* COLEMAK - MIT ENHANCED / GRID COMPATIBLE + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | F | P | G | J | L | U | Y | ; | [ | ] | \ | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | ESC | A | R | S | T | D | H | N | E | I | O | ' | XXXXXX . ENTER | PG UP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | LSHIFT | Z | X | C | V | B | K | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_CM] = LAYOUT_grid( /* COLEMAK */ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL , + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN, + M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* DVORAK - MIT ENHANCED / GRID COMPATIBLE + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | ' | , | . | P | Y | F | G | C | R | L | [ | ] | \ | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | ESC | A | O | E | U | I | D | H | T | N | S | / | XXXXXX . ENTER | PG UP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | LSHIFT | ; | Q | J | K | X | B | M | W | V | Z | XXXXXX . RSHIFT | UP | PG DN | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_DV] = LAYOUT_grid( /* DVORAK */ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL , + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, KC_ENT, KC_ENT, KC_PGUP, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN, + M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* LOWERED + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | | INS | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | XXXXXX . | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | XXXXXX . | | | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | XXXXXX . | | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_LW] = LAYOUT_grid( /* LOWERED */ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, _______, KC_INS , + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, ___T___, ___T___, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, ___T___, ___T___, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* RAISED + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | | INS | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | XXXXXX . | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | XXXXXX . | | | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | XXXXXX . | | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_RS] = LAYOUT_grid( /* RAISED */ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, KC_INS , + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, ___T___, ___T___, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, ___T___, ___T___, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* FUNCTION + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | NUM LK | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | SCR LK | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | PAUSE | PR SCR | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | FAST M | NEXT | VOL+ | VOL- | PLAY | | XXXXXX . | WHEEL+ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | | | QWERTY | COLEMK | DVORAK | | | | | | | XXXXXX . | MOUS U | WHEEL- | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | XXXXXX . MS BT1 | | | | | | MOUS L | MOUS D | MOUS R | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_FN] = LAYOUT_grid( /* FUNCTION */ + KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___, + KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR, + KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U, + _______, _______, DF(_QW), DF(_CM), DF(_DV), _______, _______, _______, _______, _______, _______, ___T___, ___T___, KC_MS_U, KC_WH_D, + _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R + ), }; const uint16_t PROGMEM fn_actions[] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - break; + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); } - return MACRO_NONE; + break; + } + return MACRO_NONE; }; diff --git a/keyboards/atomic/keymaps/michelle.c b/keyboards/atomic/keymaps/michelle.c index 2364c46a15dd..9c22423d6855 100644 --- a/keyboards/atomic/keymaps/michelle.c +++ b/keyboards/atomic/keymaps/michelle.c @@ -1,183 +1,182 @@ -#include "atomic.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = { /* Dvorak */ - { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_NO }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ - { KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_INS, KC_DEL }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ -// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ -// │ X │ │ X │ -// └─────────────────┘ └─────────────────┘ - { KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_NO, KC_PGUP }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ -// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ -// │ X │ │ X │ -// └─────────────────┘ └─────────────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ - { KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_NO, KC_UP, KC_PGDN }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ -// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ -// │ X │ │ X │ -// └─────────────────┘ └─────────────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ - { KC_LCTL, MO(1), KC_NO, KC_LALT, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_LGUI, MO(2), KC_LEFT, KC_DOWN, KC_RGHT }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ -// ┌─ 1.25u ──┬ 1.25u ───┬─── 1.25u ┬─── 1.25u ─┬─ 2u ────────────┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬──── 1.25u ┐ -// │ X │ X │ X │ X │ X │ X │ X │ X │ X │ -// └──────────┮──────────┮──────────┮───────────┮─────────────────┮──────────┮──────────┮──────────┮───────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ -// ┌───────────────────── 6.25u ────────────────────────────┐ -// │ X │ -// └────────────────────────────────────────────────────────┘ -// ┌─────────────────────── 6.25u ──────────────────────────┬─ 1.25u ──┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬── 1.25u ──┐ -// │ X │ X │ X │ X │ X │ X │ -// └────────────────────────────────────────────────────────┮──────────┮──────────┮──────────┮──────────┮───────────┘ - }, - [1] = { /* Qwerty + F keys */ - { KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, KC_NO }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ - { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_INS, KC_DEL }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ -// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ -// │ X │ │ X │ -// └─────────────────┘ └─────────────────┘ - { KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_NO, KC_PGUP }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ -// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ -// │ X │ │ X │ -// └─────────────────┘ └─────────────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ - { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, KC_UP, KC_PGDN }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ -// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ -// │ X │ │ X │ -// └─────────────────┘ └─────────────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ - { KC_LCTL, KC_TRNS, KC_NO, KC_LALT, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_LGUI, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ -// ┌─ 1.25u ──┬ 1.25u ───┬─── 1.25u ┬─── 1.25u ─┬─ 2u ────────────┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬──── 1.25u ┐ -// │ X │ X │ X │ X │ X │ X │ X │ X │ X │ -// └──────────┮──────────┮──────────┮───────────┮─────────────────┮──────────┮──────────┮──────────┮───────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ -// ┌───────────────────── 6.25u ────────────────────────────┐ -// │ X │ -// └────────────────────────────────────────────────────────┘ -// ┌─────────────────────── 6.25u ──────────────────────────┬─ 1.25u ──┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬── 1.25u ──┐ -// │ X │ X │ X │ X │ X │ X │ -// └────────────────────────────────────────────────────────┮──────────┮──────────┮──────────┮──────────┮───────────┘ - }, - [2] = { /* Numpad + qwerty shortcut keys */ - { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_P7, KC_P8, KC_P9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_NO }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ - { KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_P4, KC_P5, KC_P6, KC_L, KC_SLSH, KC_EQL, KC_INS, KC_DEL }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ -// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ -// │ X │ │ X │ -// └─────────────────┘ └─────────────────┘ - { KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_P1, KC_P2, KC_P3, KC_S, KC_MINS, KC_ENT, KC_NO, KC_PGUP }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ -// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ -// │ X │ │ X │ -// └─────────────────┘ └─────────────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ - { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_X, KC_B, KC_P0, KC_P0, KC_PENT, KC_Z, KC_RSFT, KC_NO, KC_UP, KC_PGDN }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ -// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ -// │ X │ │ X │ -// └─────────────────┘ └─────────────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ - { KC_LCTL, KC_TRNS, KC_NO, KC_LALT, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_LGUI, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT }, -// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ -// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -// └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ -// ┌─ 1.25u ──┬ 1.25u ───┬─── 1.25u ┬─── 1.25u ─┬─ 2u ────────────┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬──── 1.25u ┐ -// │ X │ X │ X │ X │ X │ X │ X │ X │ X │ -// └──────────┮──────────┮──────────┮───────────┮─────────────────┮──────────┮──────────┮──────────┮───────────┘ -// ┌─ 2u ────────────┐ -// │ X │ -// └─────────────────┘ -// ┌───────────────────── 6.25u ────────────────────────────┐ -// │ X │ -// └────────────────────────────────────────────────────────┘ -// ┌─────────────────────── 6.25u ──────────────────────────┬─ 1.25u ──┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬── 1.25u ──┐ -// │ X │ X │ X │ X │ X │ X │ -// └────────────────────────────────────────────────────────┮──────────┮──────────┮──────────┮──────────┮───────────┘ - }, + [0] = LAYOUT_grid( /* Dvorak */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_NO , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_INS, KC_DEL , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ + // ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ + // │ X │ │ X │ + // └─────────────────┘ └─────────────────┘ + KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_NO, KC_PGUP , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ + // ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ + // │ X │ │ X │ + // └─────────────────┘ └─────────────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_NO, KC_UP, KC_PGDN , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + // ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ + // │ X │ │ X │ + // └─────────────────┘ └─────────────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + KC_LCTL, MO(1), KC_NO, KC_LALT, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_LGUI, MO(2), KC_LEFT, KC_DOWN, KC_RGHT , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ + // ┌─ 1.25u ──┬ 1.25u ───┬─── 1.25u ┬─── 1.25u ─┬─ 2u ────────────┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬──── 1.25u ┐ + // │ X │ X │ X │ X │ X │ X │ X │ X │ X │ + // └──────────┮──────────┮──────────┮───────────┮─────────────────┮──────────┮──────────┮──────────┮───────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + // ┌───────────────────── 6.25u ────────────────────────────┐ + // │ X │ + // └────────────────────────────────────────────────────────┘ + // ┌─────────────────────── 6.25u ──────────────────────────┬─ 1.25u ──┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬── 1.25u ──┐ + // │ X │ X │ X │ X │ X │ X │ + // └────────────────────────────────────────────────────────┮──────────┮──────────┮──────────┮──────────┮───────────┘ + ), + [1] = LAYOUT_grid( /* Qwerty + F keys */ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, KC_NO , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_INS, KC_DEL , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ + // ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ + // │ X │ │ X │ + // └─────────────────┘ └─────────────────┘ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_NO, KC_PGUP , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ + // ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ + // │ X │ │ X │ + // └─────────────────┘ └─────────────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, KC_UP, KC_PGDN , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + // ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ + // │ X │ │ X │ + // └─────────────────┘ └─────────────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + KC_LCTL, KC_TRNS, KC_NO, KC_LALT, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_LGUI, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ + // ┌─ 1.25u ──┬ 1.25u ───┬─── 1.25u ┬─── 1.25u ─┬─ 2u ────────────┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬──── 1.25u ┐ + // │ X │ X │ X │ X │ X │ X │ X │ X │ X │ + // └──────────┮──────────┮──────────┮───────────┮─────────────────┮──────────┮──────────┮──────────┮───────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + // ┌───────────────────── 6.25u ────────────────────────────┐ + // │ X │ + // └────────────────────────────────────────────────────────┘ + // ┌─────────────────────── 6.25u ──────────────────────────┬─ 1.25u ──┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬── 1.25u ──┐ + // │ X │ X │ X │ X │ X │ X │ + // └────────────────────────────────────────────────────────┮──────────┮──────────┮──────────┮──────────┮───────────┘ + ), + [2] = LAYOUT_grid( /* Numpad + qwerty shortcut keys */ + { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_P7, KC_P8, KC_P9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_NO , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_P4, KC_P5, KC_P6, KC_L, KC_SLSH, KC_EQL, KC_INS, KC_DEL , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ + // ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ + // │ X │ │ X │ + // └─────────────────┘ └─────────────────┘ + KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_P1, KC_P2, KC_P3, KC_S, KC_MINS, KC_ENT, KC_NO, KC_PGUP , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ + // ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ + // │ X │ │ X │ + // └─────────────────┘ └─────────────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_X, KC_B, KC_P0, KC_P0, KC_PENT, KC_Z, KC_RSFT, KC_NO, KC_UP, KC_PGDN , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + // ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ + // │ X │ │ X │ + // └─────────────────┘ └─────────────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + KC_LCTL, KC_TRNS, KC_NO, KC_LALT, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_LGUI, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT , + // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + // │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + // └────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┮────────┘ + // ┌─ 1.25u ──┬ 1.25u ───┬─── 1.25u ┬─── 1.25u ─┬─ 2u ────────────┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬──── 1.25u ┐ + // │ X │ X │ X │ X │ X │ X │ X │ X │ X │ + // └──────────┮──────────┮──────────┮───────────┮─────────────────┮──────────┮──────────┮──────────┮───────────┘ + // ┌─ 2u ────────────┐ + // │ X │ + // └─────────────────┘ + // ┌───────────────────── 6.25u ────────────────────────────┐ + // │ X │ + // └────────────────────────────────────────────────────────┘ + // ┌─────────────────────── 6.25u ──────────────────────────┬─ 1.25u ──┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬── 1.25u ──┐ + // │ X │ X │ X │ X │ X │ X │ + // └────────────────────────────────────────────────────────┮──────────┮──────────┮──────────┮──────────┮───────────┘ + ), }; const uint16_t PROGMEM fn_actions[] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function - switch(id) { - case 0: - return MACRODOWN(TYPE(KC_T), END); + switch(id) { + case 0: + return MACRODOWN(TYPE(KC_T), END); break; - } - return MACRO_NONE; + } + return MACRO_NONE; }; diff --git a/keyboards/atomic/keymaps/pvc/keymap.c b/keyboards/atomic/keymaps/pvc/keymap.c index 2e78e64b1c87..4ccac63f6cb1 100644 --- a/keyboards/atomic/keymaps/pvc/keymap.c +++ b/keyboards/atomic/keymaps/pvc/keymap.c @@ -1,4 +1,4 @@ -#include "atomic.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #include "eeconfig.h" #include "led.h" @@ -111,126 +111,126 @@ enum keyboard_macros { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* LAYER = LAYER_QWERTY - .--------------------------------------------------------------------------------------------------------------------------------------. - | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP . BACKSP | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | CAP LK | A | S | D | F | G | H | J | K | L | ; | ' | ENTER . ENTER | PG UP | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT . RSHIFT | UP | PG DN | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | LCTRL | LWIN | FN | LALT | UPPER | SPACE . SPACE | LOWER | OSHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT | - '--------------------------------------------------------------------------------------------------------------------------------------' -*/ -[LAYER_QWERTY] = { - { KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, KC_BSPC }, - { KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, - { KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , KC_ENT , KC_PGUP }, - { KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_RSFT, KC_UP , KC_PGDN }, - { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC , KC_SPC , M_LOWER, OS_SHFT, KC_RALT, KC_APP , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT } -}, -/* LAYER = LAYER_UPPER - .--------------------------------------------------------------------------------------------------------------------------------------. - | PRINT | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | NUM LK | KP / | KP * | KP - | XXXXXX | XXXXXX | ______ . ______ | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | PAUSE | F1 | F2 | F3 | F4 | NUM LK | KP / | KP 7 | KP 8 | KP 9 | KP - | ______ | ______ | ______ | INS | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | ______ | F5 | F6 | F7 | F8 | CAP LK | KP * | KP 4 | KP 5 | KP 6 | KP + | ______ | ______ . ______ | HOME | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | ______ | F9 | F10 | F11 | F12 | SCR LK | KP 0 | KP 1 | KP 2 | KP 3 | KP ENT | ______ . ______ | ______ | END | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | ______ | ______ | ______ | ______ | UPPER | KP 0 . KP 0 | ______ | RALT | KP . | KP ENT | ______ | ______ | ______ | ______ | - '--------------------------------------------------------------------------------------------------------------------------------------' -*/ -[LAYER_UPPER] = { - { KC_PSCR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, XXXXXXX, XXXXXXX, _______, _______ }, - { KC_PAUS, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_NLCK, KC_PSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______, _______, _______, KC_INS }, - { _______, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_CAPS, KC_PAST, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, _______, _______, KC_HOME }, - { _______, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_SLCK, KC_KP_0, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, _______, _______, KC_END }, - { _______, _______, _______, _______, M_UPPER, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, _______, _______, _______, _______ } -}, -/* LAYER = LAYER_LOWER - .--------------------------------------------------------------------------------------------------------------------------------------. - | PRINT | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | ______ . ______ | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | ______ | $ | { | [ | ( | % | # | ) | ] | } | @ | ______ | ______ | ______ | INS | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | ______ | ^ | * | + | - | / | \ | _ | ' | " | ` | ______ | ______ . ______ | HOME | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | ______ | | | & | ! | ~ | ; | : | = | < | > | ? | ______ . ______ | ______ | END | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | ______ | ______ | ______ | ______ | ______ | ______ . ______ | LOWER | ______ | ______ | ______ | ______ | ______ | ______ | ______ | - '--------------------------------------------------------------------------------------------------------------------------------------' -*/ -[LAYER_LOWER] = { - { KC_PSCR, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______, _______ }, - { _______, KC_DLR , KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT , _______, _______, _______, KC_INS }, - { _______, KC_CIRC, KC_ASTR, KC_PLUS, KC_MINS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT , KC_GRV , _______, _______, _______, KC_HOME }, - { _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL , KC_LT , KC_GT , KC_QUES, _______, _______, _______, KC_END }, - { _______, _______, _______, _______, _______, _______, _______, M_LOWER, _______, _______, _______, _______, _______, _______, _______ } -}, -/* LAYER = LAYER_FUNCTION - .--------------------------------------------------------------------------------------------------------------------------------------. - | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | XXXXXX | F13 | F14 | F15 | F16 | NUM LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | XXXXXX | F17 | F18 | F19 | F20 | SCR LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | XXXXXX | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | ______ | F21 | F22 | F23 | F24 | CAP LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | ______ . ______ | VOL UP | MUTE | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | ______ | ______ | FN | ______ | ______ | PLAY . PLAY | ______ | ______ | ______ | ______ | ______ | PREV | VOL DN | NEXT | - '--------------------------------------------------------------------------------------------------------------------------------------' -*/ -[LAYER_FUNCTION] = { - { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, - { XXXXXXX, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, - { XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, - { _______, KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_VOLU, KC_MUTE }, - { _______, _______, M_FUNCT, _______, _______, KC_MPLY, KC_MPLY, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT } -}, -/* LAYER = LAYER_MOUSE - .--------------------------------------------------------------------------------------------------------------------------------------. - | ESC | MS AC0 | MS AC1 | MS AC2 | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MS UL | MS U | MS UR | XXXXXX | XXXXXX | XXXXXX | MS WHL | MS WHR | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | XXXXXX | MS BT5 | MS BT4 | MS BT3 | MS BT2 | XXXXXX | XXXXXX | MS L | XXXXXX | MS R | XXXXXX | XXXXXX | XXXXXX . XXXXXX | MS WHU | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | ______ | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MS DL | MS D | MS DR | XXXXXX | ______ . ______ | MS U | MS WHD | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | ______ | ______ | ______ | ______ | ______ | MS BT1 . MS BT1 | ______ | ______ | ______ | ______ | ______ | MS L | MS D | MS R | - '--------------------------------------------------------------------------------------------------------------------------------------' -*/ -[LAYER_MOUSE] = { - { KC_ESC , KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, - { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_UL, KC_MS_U, M_MS_UR, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_L, KC_WH_R }, - { XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, KC_MS_L, XXXXXXX, KC_MS_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_U }, - { _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_DL, KC_MS_D, M_MS_DR, XXXXXXX, _______, _______, KC_MS_U, KC_WH_D }, - { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R } -}, -/* LAYER = LAYER_ADJUST - .--------------------------------------------------------------------------------------------------------------------------------------. - | XXXXXX | HELP 1 | HELP 2 | HELP 3 | HELP 4 | HELP 5 | HELP 6 | HELP 7 | HELP 8 | HELP 9 | XXXXXX | MUSIC | AUDIO | XXXXXX . XXXXXX | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | XXXXXX | BRTOG | BRSPD+ | BRSPD- | BRDFLT | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | XXXXXX | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | XXXXXX | QWERTY | XXXXXX | XXXXXX | BACKLT | RESET | XXXXXX | MOUSE | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | VOICE+ | XXXXXX | - |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - | XXXXXX | XXXXXX | XXXXXX | XXXXXX | UPPER | XXXXXX . XXXXXX | LOWER | XXXXXX | XXXXXX | XXXXXX | XXXXXX | TEMPO- | VOICE- | TEMPO+ | - '--------------------------------------------------------------------------------------------------------------------------------------' -*/ -[LAYER_ADJUST] = { - { XXXXXXX, M_HELP1, M_HELP2, M_HELP3, M_HELP4, M_HELP5, M_HELP6, M_HELP7, M_HELP8, M_HELP9, XXXXXXX, MU_TOG , AU_TOG , XXXXXXX, XXXXXXX }, - { XXXXXXX, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, - { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, - { XXXXXXX, M_QWRTY, XXXXXXX, XXXXXXX, M_BACKL, RESET , XXXXXXX, M_MOUSE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MUV_IN , XXXXXXX }, - { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_UPPER, XXXXXXX, XXXXXXX, M_LOWER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TMPO_DN, MUV_DE , TMPO_UP } -}, + /* LAYER = LAYER_QWERTY + .--------------------------------------------------------------------------------------------------------------------------------------. + | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP . BACKSP | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | CAP LK | A | S | D | F | G | H | J | K | L | ; | ' | ENTER . ENTER | PG UP | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT . RSHIFT | UP | PG DN | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | LCTRL | LWIN | FN | LALT | UPPER | SPACE . SPACE | LOWER | OSHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT | + '--------------------------------------------------------------------------------------------------------------------------------------' + */ + [LAYER_QWERTY] = LAYOUT_grid( + KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, KC_BSPC, + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL , + KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , KC_ENT , KC_PGUP, + KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_RSFT, KC_UP , KC_PGDN, + KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC , KC_SPC , M_LOWER, OS_SHFT, KC_RALT, KC_APP , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + /* LAYER = LAYER_UPPER + .--------------------------------------------------------------------------------------------------------------------------------------. + | PRINT | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | NUM LK | KP / | KP * | KP - | XXXXXX | XXXXXX | ______ . ______ | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | PAUSE | F1 | F2 | F3 | F4 | NUM LK | KP / | KP 7 | KP 8 | KP 9 | KP - | ______ | ______ | ______ | INS | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | F5 | F6 | F7 | F8 | CAP LK | KP * | KP 4 | KP 5 | KP 6 | KP + | ______ | ______ . ______ | HOME | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | F9 | F10 | F11 | F12 | SCR LK | KP 0 | KP 1 | KP 2 | KP 3 | KP ENT | ______ . ______ | ______ | END | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ______ | ______ | ______ | UPPER | KP 0 . KP 0 | ______ | RALT | KP . | KP ENT | ______ | ______ | ______ | ______ | + '--------------------------------------------------------------------------------------------------------------------------------------' + */ + [LAYER_UPPER] = LAYOUT_grid( + KC_PSCR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, XXXXXXX, XXXXXXX, _______, _______, + KC_PAUS, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_NLCK, KC_PSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______, _______, _______, KC_INS , + _______, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_CAPS, KC_PAST, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, _______, _______, KC_HOME, + _______, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_SLCK, KC_KP_0, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, _______, _______, KC_END , + _______, _______, _______, _______, M_UPPER, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, _______, _______, _______, _______ + ), + /* LAYER = LAYER_LOWER + .--------------------------------------------------------------------------------------------------------------------------------------. + | PRINT | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | ______ . ______ | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | $ | { | [ | ( | % | # | ) | ] | } | @ | ______ | ______ | ______ | INS | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ^ | * | + | - | / | \ | _ | ' | " | ` | ______ | ______ . ______ | HOME | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | | | & | ! | ~ | ; | : | = | < | > | ? | ______ . ______ | ______ | END | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ______ | ______ | ______ | ______ | ______ . ______ | LOWER | ______ | ______ | ______ | ______ | ______ | ______ | ______ | + '--------------------------------------------------------------------------------------------------------------------------------------' + */ + [LAYER_LOWER] = LAYOUT_grid( + KC_PSCR, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______, _______, + _______, KC_DLR , KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT , _______, _______, _______, KC_INS , + _______, KC_CIRC, KC_ASTR, KC_PLUS, KC_MINS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT , KC_GRV , _______, _______, _______, KC_HOME, + _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL , KC_LT , KC_GT , KC_QUES, _______, _______, _______, KC_END , + _______, _______, _______, _______, _______, _______, _______, M_LOWER, _______, _______, _______, _______, _______, _______, _______ + ), + /* LAYER = LAYER_FUNCTION + .--------------------------------------------------------------------------------------------------------------------------------------. + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | F13 | F14 | F15 | F16 | NUM LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | F17 | F18 | F19 | F20 | SCR LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | F21 | F22 | F23 | F24 | CAP LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | ______ . ______ | VOL UP | MUTE | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ______ | FN | ______ | ______ | PLAY . PLAY | ______ | ______ | ______ | ______ | ______ | PREV | VOL DN | NEXT | + '--------------------------------------------------------------------------------------------------------------------------------------' + */ + [LAYER_FUNCTION] = LAYOUT_grid( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_VOLU, KC_MUTE, + _______, _______, M_FUNCT, _______, _______, KC_MPLY, KC_MPLY, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ), + /* LAYER = LAYER_MOUSE + .--------------------------------------------------------------------------------------------------------------------------------------. + | ESC | MS AC0 | MS AC1 | MS AC2 | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MS UL | MS U | MS UR | XXXXXX | XXXXXX | XXXXXX | MS WHL | MS WHR | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | MS BT5 | MS BT4 | MS BT3 | MS BT2 | XXXXXX | XXXXXX | MS L | XXXXXX | MS R | XXXXXX | XXXXXX | XXXXXX . XXXXXX | MS WHU | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MS DL | MS D | MS DR | XXXXXX | ______ . ______ | MS U | MS WHD | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ______ | ______ | ______ | ______ | MS BT1 . MS BT1 | ______ | ______ | ______ | ______ | ______ | MS L | MS D | MS R | + '--------------------------------------------------------------------------------------------------------------------------------------' + */ + [LAYER_MOUSE] = LAYOUT_grid( + KC_ESC , KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_UL, KC_MS_U, M_MS_UR, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_L, KC_WH_R, + XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, KC_MS_L, XXXXXXX, KC_MS_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_U, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_DL, KC_MS_D, M_MS_DR, XXXXXXX, _______, _______, KC_MS_U, KC_WH_D, + _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R + ), + /* LAYER = LAYER_ADJUST + .--------------------------------------------------------------------------------------------------------------------------------------. + | XXXXXX | HELP 1 | HELP 2 | HELP 3 | HELP 4 | HELP 5 | HELP 6 | HELP 7 | HELP 8 | HELP 9 | XXXXXX | MUSIC | AUDIO | XXXXXX . XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | BRTOG | BRSPD+ | BRSPD- | BRDFLT | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | QWERTY | XXXXXX | XXXXXX | BACKLT | RESET | XXXXXX | MOUSE | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | VOICE+ | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | UPPER | XXXXXX . XXXXXX | LOWER | XXXXXX | XXXXXX | XXXXXX | XXXXXX | TEMPO- | VOICE- | TEMPO+ | + '--------------------------------------------------------------------------------------------------------------------------------------' + */ + [LAYER_ADJUST] = LAYOUT_grid( + XXXXXXX, M_HELP1, M_HELP2, M_HELP3, M_HELP4, M_HELP5, M_HELP6, M_HELP7, M_HELP8, M_HELP9, XXXXXXX, MU_TOG , AU_TOG , XXXXXXX, XXXXXXX, + XXXXXXX, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, M_QWRTY, XXXXXXX, XXXXXXX, M_BACKL, RESET , XXXXXXX, M_MOUSE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MUV_IN , XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_UPPER, XXXXXXX, XXXXXXX, M_LOWER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TMPO_DN, MUV_DE , TMPO_UP + ), }; #ifdef AUDIO_ENABLE @@ -255,22 +255,19 @@ float tone_scroll_off[][2] = SONG(SCROLL_LOCK_OFF_SOUND); #endif /* AUDIO_ENABLE */ -void persistent_default_layer_set(uint16_t default_layer) -{ - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); } const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_ONESHOT(MOD_LSFT), + [0] = ACTION_MODS_ONESHOT(MOD_LSFT), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - // MACRODOWN only works in this function - switch(id) - { + // MACRODOWN only works in this function + switch(id) { case MACRO_HELP_1: if (record->event.pressed) @@ -359,7 +356,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case MACRO_BREATH_DEFAULT: if (record->event.pressed) { - breathing_defaults(); + breathing_period_default(); } break; diff --git a/keyboards/atomic/keymaps/twolayer.c b/keyboards/atomic/keymaps/twolayer.c index 8ea045d806a9..f0ff56467da2 100644 --- a/keyboards/atomic/keymaps/twolayer.c +++ b/keyboards/atomic/keymaps/twolayer.c @@ -1,72 +1,68 @@ -#include "atomic.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* QWERTY - MIT ENHANCED / GRID COMPATIBLE - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | LCTRL1 | A | S | D | F | G | H | J | K | L | ; | ' | XXXXXX . ENTER | PG UP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | - * |--------+--------+--------+--------+--------+- 6.25u ---------+--------+--------+--------+--------+-----------------+--------+--------| - * | BRITE | LALT | FN | XXXXXX . SPACE | RCTRL | RALT | FN | LEFT | DOWN | RIGHT | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [0] = { /* QWERTY */ - { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC }, - { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, - { KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP }, - { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, - { M(0), KC_ALT, MO(1), KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RCTL, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT }, - }, + /* QWERTY - MIT ENHANCED / GRID COMPATIBLE + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | LCTRL1 | A | S | D | F | G | H | J | K | L | ; | ' | XXXXXX . ENTER | PG UP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | + * |--------+--------+--------+--------+--------+- 6.25u ---------+--------+--------+--------+--------+-----------------+--------+--------| + * | BRITE | LALT | FN | XXXXXX . SPACE | RCTRL | RALT | FN | LEFT | DOWN | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + [0] = LAYOUT_grid( /* QWERTY */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN, + M(0), KC_ALT, MO(1), KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RCTL, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, + ), - -/* FUNCTION - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | GRV | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | SCR LK | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | PAUSE | PR SCR | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | FAST M | NEXT | VOL+ | VOL- | PLAY | | XXXXXX . | WHEEL+ | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | NUM LK | | | | | | | | INSERT | END1 | HOME | XXXXXX . | MOUS U | WHEEL- | - * |--------+--------+--------+--------+--------+- 6.25 ------------+--------+--------+------+--------+-----------------+--------+--------| - * | | | FN | XXXXXX . MS BT1 | | | FN | MOUS L | MOUS D | MOUS R | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [1] = { /* FUNCTION LAYER*/ - { KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ }, - { KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR }, - { KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U }, - { KC_NLCK, _______, _______, _______, _______, _______, _______, _______, KC_INSERT, KC_END, KC_HOME, ___T___, ___T___, KC_MS_U, KC_WH_D }, - { _______, _______, MO(1), _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, MO(1), KC_MS_L, KC_MS_D, KC_MS_R }, - }, + /* FUNCTION + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | GRV | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | SCR LK | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | PAUSE | PR SCR | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | FAST M | NEXT | VOL+ | VOL- | PLAY | | XXXXXX . | WHEEL+ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | NUM LK | | | | | | | | INSERT | END1 | HOME | XXXXXX . | MOUS U | WHEEL- | + * |--------+--------+--------+--------+--------+- 6.25 ------------+--------+--------+------+--------+-----------------+--------+--------| + * | | | FN | XXXXXX . MS BT1 | | | FN | MOUS L | MOUS D | MOUS R | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + [1] = LAYOUT_grid( /* FUNCTION LAYER*/ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___, + KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR, + KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U, + KC_NLCK, _______, _______, _______, _______, _______, _______, _______, KC_INSERT, KC_END, KC_HOME, ___T___, ___T___, KC_MS_U, KC_WH_D, + _______, _______, MO(1), _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, MO(1), KC_MS_L, KC_MS_D, KC_MS_R, + ), }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(1), - [2] = ACTION_LAYER_MOMENTARY(1), + [1] = ACTION_LAYER_MOMENTARY(1), + [2] = ACTION_LAYER_MOMENTARY(1), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - break; + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); } - return MACRO_NONE; + break; + } + return MACRO_NONE; }; diff --git a/keyboards/atreus/atreus.h b/keyboards/atreus/atreus.h index f841c351997a..8e868ecc0e67 100644 --- a/keyboards/atreus/atreus.h +++ b/keyboards/atreus/atreus.h @@ -9,7 +9,7 @@ // This a shortcut to help you visually see your layout. // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array -#define KEYMAP( \ +#define LAYOUT( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ diff --git a/keyboards/atreus/info.json b/keyboards/atreus/info.json new file mode 100644 index 000000000000..73cff2509a4e --- /dev/null +++ b/keyboards/atreus/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Atreus", + "url": "", + "maintainer": "qmk", + "width": 13, + "height": 4.7, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0.6}, {"x":1, "y":0.35}, {"x":2, "y":0}, {"x":3, "y":0.35}, {"x":4, "y":0.7}, {"x":8, "y":0.7}, {"x":9, "y":0.35}, {"x":10, "y":0}, {"x":11, "y":0.35}, {"x":12, "y":0.6}, {"x":0, "y":1.6}, {"x":1, "y":1.35}, {"x":2, "y":1}, {"x":3, "y":1.35}, {"x":4, "y":1.7}, {"x":8, "y":1.7}, {"x":9, "y":1.35}, {"x":10, "y":1}, {"x":11, "y":1.35}, {"x":12, "y":1.6}, {"x":0, "y":2.6}, {"x":1, "y":2.35}, {"x":2, "y":2}, {"x":3, "y":2.35}, {"x":4, "y":2.7}, {"x":8, "y":2.7}, {"x":9, "y":2.35}, {"x":10, "y":2}, {"x":11, "y":2.35}, {"x":12, "y":2.6}, {"x":0, "y":3.6}, {"x":1, "y":3.35}, {"x":2, "y":3}, {"x":3, "y":3.35}, {"x":4, "y":3.7}, {"x":5, "y":2.95, "h":1.5}, {"x":7, "y":2.95, "h":1.5}, {"x":8, "y":3.7}, {"x":9, "y":3.35}, {"x":10, "y":3}, {"x":11, "y":3.35}, {"x":12, "y":3.6}] + } + } +} diff --git a/keyboards/atreus/keymaps/alphadox/keymap.c b/keyboards/atreus/keymaps/alphadox/keymap.c index b8ec0e032fa6..575a640c4f15 100644 --- a/keyboards/atreus/keymaps/alphadox/keymap.c +++ b/keyboards/atreus/keymaps/alphadox/keymap.c @@ -1,4 +1,4 @@ -#include "atreus.h" +#include QMK_KEYBOARD_H #define BASE 0 #define SYMB 1 @@ -9,27 +9,26 @@ enum macro_id { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -[BASE] = KEYMAP( + [BASE] = LAYOUT( KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_SCLN, LT(ETC,KC_A), KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH), KC_GRV, KC_DEL, KC_LALT, GUI_T(KC_TAB), LT(SYMB,KC_BSPC), CTL_T(KC_ESC), SFT_T(KC_ENT), LT(SYMB,KC_SPC), GUI_T(KC_LEFT), KC_DOWN, KC_UP, LCAG_T(KC_RGHT) -), + ), -[SYMB] = KEYMAP( + [SYMB] = LAYOUT( KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_EQL, KC_7, KC_8, KC_9, KC_PLUS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_BSLS, KC_MINS, KC_4, KC_5, KC_6, KC_QUOT, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_ASTR, KC_UNDS, KC_1, KC_2, KC_3, KC_DQUO, KC_TILD, KC_AMPR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_NO, KC_DOT, KC_TRNS -), + ), -[ETC] = KEYMAP( + [ETC] = LAYOUT( RESET, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_VOLU, KC_F7, KC_F8, KC_F9, KC_HOME, LT(ETC,KC_A), KC_NO, KC_NO, KC_NO, KC_PGDN, KC_VOLD, KC_F4, KC_F5, KC_F6, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, KC_MUTE, KC_F1, KC_F2, KC_F3, KC_INS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO -), + ), }; const uint16_t PROGMEM fn_actions[] = { diff --git a/keyboards/atreus/keymaps/classic/keymap.c b/keyboards/atreus/keymaps/classic/keymap.c index d07411626907..529b58a13b4f 100644 --- a/keyboards/atreus/keymaps/classic/keymap.c +++ b/keyboards/atreus/keymaps/classic/keymap.c @@ -1,4 +1,4 @@ -#include "atreus.h" +#include QMK_KEYBOARD_H // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -9,23 +9,26 @@ #define _LW 2 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QW] = KEYMAP( /* Qwerty */ - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P , - KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN , - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH , - KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT ), + [_QW] = LAYOUT( /* Qwerty */ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P , + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN , + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH , + KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT + ), - [_RS] = KEYMAP( /* [> RAISE <] */ - KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR , - KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS , - KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS , - TG(_LW), KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL ), + [_RS] = LAYOUT( /* [> RAISE <] */ + KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR , + KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS , + KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS , + TG(_LW), KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL + ), - [_LW] = KEYMAP( /* [> LOWER <] */ - KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 , - KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12 , - KC_TRNS, KC_TRNS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, DF(_QW), KC_TRNS, KC_TRNS, RESET ) + [_LW] = LAYOUT( /* [> LOWER <] */ + KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 , + KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12 , + KC_TRNS, KC_TRNS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, DF(_QW), KC_TRNS, KC_TRNS, RESET + ), }; const uint16_t PROGMEM fn_actions[] = { diff --git a/keyboards/atreus/keymaps/default/keymap.c b/keyboards/atreus/keymaps/default/keymap.c index 9e91233c329d..2e991ac6f27e 100644 --- a/keyboards/atreus/keymaps/default/keymap.c +++ b/keyboards/atreus/keymaps/default/keymap.c @@ -1,7 +1,7 @@ // this is the style you want to emulate. // This is the canonical layout file for the Quantum project. If you want to add another keyboard, -#include "atreus.h" +#include QMK_KEYBOARD_H // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -12,50 +12,51 @@ #define _LW 2 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QW] = KEYMAP( /* Qwerty */ - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P , - KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN , - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH , - KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT ), -/* - * ! @ up { } || pgup 7 8 9 * - * # left down right $ || pgdn 4 5 6 + - * [ ] ( ) & || ` 1 2 3 \ - * lower insert super shift bksp ctrl || alt space fn . 0 = - */ -[_RS] = KEYMAP( /* [> RAISE <] */ - KC_EXLM, KC_AT, KC_UP, KC_LCBR, KC_RCBR, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR , - KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DLR, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS , - KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS , - TG(_LW), KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL ), -/* - * insert home up end pgup || up F7 F8 F9 F10 - * del left down right pgdn || down F4 F5 F6 F11 - * volup reset || F1 F2 F3 F12 - * voldn super shift bksp ctrl || alt space L0 prtsc scroll pause - */ -[_LW] = KEYMAP( /* [> LOWER <] */ - KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 , - KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , - KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, KC_NO, KC_F1, KC_F2, KC_F3, KC_F12 , - KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, TO(_QW), KC_PSCR, KC_SLCK, KC_PAUS ) + [_QW] = LAYOUT( /* Qwerty */ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P , + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN , + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH , + KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT + ), + + /* + * ! @ up { } || pgup 7 8 9 * + * # left down right $ || pgdn 4 5 6 + + * [ ] ( ) & || ` 1 2 3 \ + * lower insert super shift bksp ctrl || alt space fn . 0 = + */ + [_RS] = LAYOUT( /* [> RAISE <] */ + KC_EXLM, KC_AT, KC_UP, KC_LCBR, KC_RCBR, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR , + KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DLR, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS , + KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS , + TG(_LW), KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL ), + /* + * insert home up end pgup || up F7 F8 F9 F10 + * del left down right pgdn || down F4 F5 F6 F11 + * volup reset || F1 F2 F3 F12 + * voldn super shift bksp ctrl || alt space L0 prtsc scroll pause + */ + [_LW] = LAYOUT( /* [> LOWER <] */ + KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 , + KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , + KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, KC_NO, KC_F1, KC_F2, KC_F3, KC_F12 , + KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, TO(_QW), KC_PSCR, KC_SLCK, KC_PAUS ) }; const uint16_t PROGMEM fn_actions[] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); } - return MACRO_NONE; + break; + } + return MACRO_NONE; }; diff --git a/keyboards/atreus/keymaps/dvorak_42_key/keymap.c b/keyboards/atreus/keymaps/dvorak_42_key/keymap.c index 457db372abcb..ba343ce4dbf1 100644 --- a/keyboards/atreus/keymaps/dvorak_42_key/keymap.c +++ b/keyboards/atreus/keymaps/dvorak_42_key/keymap.c @@ -1,5 +1,5 @@ -#include "atreus.h" +#include QMK_KEYBOARD_H // layers #define BASE 0 @@ -7,6 +7,7 @@ #define KEYSEL 2 #define MOUSE 3 #define COMBINED 4 +#define BROWSER_CONTROL 5 // macros #define MOUSE_TOGGLE 1 @@ -14,6 +15,19 @@ static bool mouse_lock = false; +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + + // Cloud9 macros + CLOUD9_TAB_LEFT, + CLOUD9_TAB_RIGHT, + CLOUD9_TAB_CLOSE, + CLOUD9_GOTO_SYMBOL, + CLOUD9_GOTO_LINE, + CLOUD9_NAVIGATE, + +}; + // building instructions: // make atreus:dvorak_42_key @@ -21,49 +35,87 @@ static bool mouse_lock = false; // avrdude -p atmega32u4 -c avr109 -U flash:w:atreus_dvorak_42_key.hex -P COM7 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -[BASE] = { - {KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, KC_TRNS, KC_F, KC_G, KC_C, KC_R, KC_L, }, - {KC_A, KC_O, KC_E, KC_U, KC_I, KC_TRNS, KC_D, KC_H, KC_T, KC_N, KC_S, }, - {KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, MO(KEYNAV), KC_B, KC_M, KC_W, KC_V, KC_Z, }, - {OSM(MOD_LSFT), OSM(MOD_LCTL), M(MOUSE_TOGGLE), MO(KEYSEL), MO(COMBINED), KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_CAPSLOCK, OSM(MOD_LSFT), } -}, - -[KEYNAV] = { - {KC_ESC, MEH(KC_F9), RCTL(KC_Z), RCTL(KC_S), MEH(KC_F10), KC_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, }, - {MEH(KC_F11), MEH(KC_F12), RSFT(KC_TAB), KC_TAB, MEH(KC_A), KC_TRNS, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), }, - {MEH(KC_B), MEH(KC_C), MEH(KC_D), MEH(KC_E), MEH(KC_F), KC_TRNS, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_PGDOWN, }, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE), } -}, - -[KEYSEL] = { - {MEH(KC_G), MEH(KC_H),MEH(KC_I), MEH(KC_J), MEH(KC_K), KC_TRNS, KC_TRNS, RSFT(KC_HOME), RSFT(KC_UP), RSFT(KC_END), RSFT(KC_PGUP), }, - {MEH(KC_L), MEH(KC_M),MEH(KC_N), MEH(KC_O), MEH(KC_P), KC_TRNS, RSFT(RCTL(KC_LEFT)), RSFT(KC_LEFT), RSFT(KC_DOWN), RSFT(KC_RIGHT), RSFT(RCTL(KC_RIGHT)), }, - {MEH(KC_Q), MEH(KC_R),MEH(KC_S), MEH(KC_T), MEH(KC_U), KC_TRNS, KC_TRNS, RCTL(KC_C),RCTL(KC_X), RCTL(KC_V), RSFT(KC_PGDN), }, - {RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE), } -}, - -[COMBINED] = { - {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_PLUS, KC_7, KC_8, KC_9, KC_ASTR, }, - {KC_LPRN, KC_RPRN, KC_LBRACKET, KC_RBRACKET, KC_UNDS, KC_TRNS, KC_MINS, KC_4, KC_5, KC_6, KC_SLSH, }, - {KC_COLN, KC_DQUO, KC_LCBR, KC_RCBR, KC_AMPR, KC_TRNS, KC_EQUAL, KC_1, KC_2, KC_3, KC_QUES, }, - {KC_TRNS, KC_TILD, KC_GRAVE, KC_CIRC, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_PIPE, KC_BSLS, } -}, - -[MOUSE] = { - {KC_TRNS, KC_PGUP, KC_MS_WH_UP, KC_UP, KC_TRNS, KC_TRNS, KC_UP, KC_HOME, KC_MS_U, KC_END, KC_MS_WH_UP, }, - {KC_MS_ACCEL0, KC_PGDN, KC_MS_WH_DOWN, KC_DOWN, KC_TRNS, KC_TRNS, KC_DOWN, KC_MS_L, KC_MS_D, KC_MS_R, KC_MS_WH_DOWN, }, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN3, MEH(KC_X), MEH(KC_Y), MEH(KC_Z), KC_F5, RCTL(KC_W), }, - {KC_TRNS, M(MOUSE_LOCK), KC_TRNS, KC_MS_ACCEL0, KC_TRNS, KC_BTN1, KC_BTN2, RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), LALT(KC_LEFT), } -}, - - + [BASE] = LAYOUT( + KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, + KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, + KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, + OSM(MOD_LSFT), OSM(MOD_LCTL), MO(KEYSEL), MO(BROWSER_CONTROL), MO(COMBINED), MO(KEYNAV), KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_CAPSLOCK, OSM(MOD_LSFT) + ), + + [KEYNAV] = LAYOUT( + KC_ESC, CLOUD9_GOTO_LINE, RCTL(KC_Z), RCTL(KC_S), MEH(KC_F10), KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, + MEH(KC_F11), CLOUD9_GOTO_SYMBOL, RSFT(KC_TAB), KC_TAB, MEH(KC_A), LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), + MEH(KC_B), CLOUD9_NAVIGATE, CLOUD9_TAB_LEFT, CLOUD9_TAB_RIGHT, CLOUD9_TAB_CLOSE, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_PGDOWN, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE) + ), + + [KEYSEL] = LAYOUT( + MEH(KC_G), MEH(KC_H),MEH(KC_I), MEH(KC_J), MEH(KC_K), KC_TRNS, RSFT(KC_HOME), RSFT(KC_UP), RSFT(KC_END), RSFT(KC_PGUP), + MEH(KC_L), MEH(KC_M),MEH(KC_N), MEH(KC_O), MEH(KC_P), RSFT(RCTL(KC_LEFT)), RSFT(KC_LEFT), RSFT(KC_DOWN), RSFT(KC_RIGHT), RSFT(RCTL(KC_RIGHT)), + MEH(KC_Q), MEH(KC_R),MEH(KC_S), MEH(KC_T), MEH(KC_U), KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), RSFT(KC_PGDN), + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE) + ), + + [COMBINED] = LAYOUT( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_PLUS, KC_7, KC_8, KC_9, KC_ASTR, + KC_LPRN, KC_RPRN, KC_LBRACKET, KC_RBRACKET, KC_UNDS, KC_MINS, KC_4, KC_5, KC_6, KC_SLSH, + KC_COLN, KC_DQUO, KC_LCBR, KC_RCBR, KC_AMPR, KC_EQUAL, KC_1, KC_2, KC_3, KC_QUES, + KC_TRNS, KC_TILD, KC_GRAVE, KC_CIRC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_PIPE, KC_BSLS + ), + + [MOUSE] = LAYOUT( + KC_TRNS, KC_PGUP, KC_MS_WH_UP, KC_UP, KC_TRNS, KC_UP, KC_HOME, KC_MS_U, KC_END, KC_MS_WH_UP, + KC_MS_ACCEL0, KC_PGDN, KC_MS_WH_DOWN, KC_DOWN, KC_TRNS, KC_DOWN, KC_MS_L, KC_MS_D, KC_MS_R, KC_MS_WH_DOWN, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MEH(KC_X), MEH(KC_Y), MEH(KC_Z), KC_F5, RCTL(KC_W), + KC_TRNS, M(MOUSE_LOCK), KC_TRNS, KC_MS_ACCEL0, KC_TRNS, KC_BTN3, KC_BTN1, KC_BTN2, RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), LALT(KC_LEFT) + ), + + [BROWSER_CONTROL] = LAYOUT( + KC_TRNS, KC_BTN3, KC_MS_U, KC_BTN1, KC_BTN2, KC_UP, KC_PGUP, KC_PGDN, KC_MS_WH_UP, KC_TRNS, + KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_DOWN, RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), KC_MS_WH_DOWN, LALT(KC_LEFT), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RCTL(KC_1), RCTL(KC_9), KC_F6, KC_F5, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RCTL(KC_W), RCTL(KC_T), RSFT(RCTL(KC_TAB)), KC_TRNS, KC_TRNS, KC_TRNS + ), }; const uint16_t PROGMEM fn_actions[] = { }; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if(record->event.pressed) { + switch (keycode) { + // Cloud9 macros + case CLOUD9_TAB_LEFT: + SEND_STRING(SS_LCTRL("[")); + return true; + break; + case CLOUD9_TAB_RIGHT: + SEND_STRING(SS_LCTRL("]")); + return true; + break; + case CLOUD9_TAB_CLOSE: + SEND_STRING(SS_LALT("w")); + return true; + break; + case CLOUD9_GOTO_SYMBOL: + SEND_STRING(SS_LSFT(SS_LCTRL("e"))); + return true; + break; + case CLOUD9_GOTO_LINE: + SEND_STRING(SS_LCTRL("g")); + return true; + break; + case CLOUD9_NAVIGATE: + SEND_STRING(SS_LCTRL("e")); + return true; + break; + } + } + + return true; +} + const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function @@ -87,7 +139,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) else mouse_lock = true; } - break; + break; } return MACRO_NONE; }; diff --git a/keyboards/atreus/keymaps/erlandsona/keymap.c b/keyboards/atreus/keymaps/erlandsona/keymap.c index 32c8826e023f..232c700e948b 100644 --- a/keyboards/atreus/keymaps/erlandsona/keymap.c +++ b/keyboards/atreus/keymaps/erlandsona/keymap.c @@ -1,7 +1,7 @@ // this is the style you want to emulate. // This is the canonical layout file for the Quantum project. If you want to add another keyboard, -#include "atreus.h" +#include QMK_KEYBOARD_H // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -17,23 +17,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[BASE] = KEYMAP( /* Qwerty */ - KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , - KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , - SFT_T(KC_Z), KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SFT_T(KC_QUOT), - KC_LCTL , KC_LALT, KC_LALT, KC_LGUI, KC_BSPC, KC_ESC, KC_ENT, KC_SPC, F(NUMS), KC_RALT, KC_SLSH, KC_BSLS ), - -[NUMS] = KEYMAP( /* Numbers / Arrows / Symbols */ - KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_LPRN, KC_RPRN, KC_MINS, KC_EQL , KC_LBRC, - KC_TAB , KC_5 , KC_6 , KC_7 , KC_8 , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_RBRC, - _______, KC_9 , KC_0 , KC_DOT , KC_COMM, KC_HOME, KC_PGDN, KC_PGUP, KC_END , _______, - _______, _______, _______, _______, KC_DEL , F(MOUS), _______, _______, _______, _______, _______, _______), - -[MOUS] = KEYMAP( /* Mouse and Media Keys */ - KC_SLCK, KC_PAUSE, KC_F11 , KC_F10 , KC_F9 , KC_F8 , KC_F7 , KC_F6 , KC_F5 , KC_F4, - KC_VOLD, KC_ACL0 , KC_ACL1, KC_ACL2, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_F3, - KC_MUTE, KC_MPRV , KC_MPLY, KC_MNXT, KC_MUTE, KC_WH_R, KC_WH_U, KC_WH_D, KC_WH_L, KC_F2, - _______, _______ , _______, _______, _______, _______, _______, KC_BTN1, F(BASE), RESET , KC_F12 , KC_F1) + [BASE] = LAYOUT( /* Qwerty */ + KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , + KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , + SFT_T(KC_Z), KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SFT_T(KC_QUOT), + KC_LCTL , KC_LALT, KC_LALT, KC_LGUI, KC_BSPC, KC_ESC, KC_ENT, KC_SPC, F(NUMS), KC_RALT, KC_SLSH, KC_BSLS + ), + + [NUMS] = LAYOUT( /* Numbers / Arrows / Symbols */ + KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_LPRN, KC_RPRN, KC_MINS, KC_EQL , KC_LBRC, + KC_TAB , KC_5 , KC_6 , KC_7 , KC_8 , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_RBRC, + _______, KC_9 , KC_0 , KC_DOT , KC_COMM, KC_HOME, KC_PGDN, KC_PGUP, KC_END , _______, + _______, _______, _______, _______, KC_DEL , F(MOUS), _______, _______, _______, _______, _______, _______ + ), + + [MOUS] = LAYOUT( /* Mouse and Media Keys */ + KC_SLCK, KC_PAUSE, KC_F11 , KC_F10 , KC_F9 , KC_F8 , KC_F7 , KC_F6 , KC_F5 , KC_F4, + KC_VOLD, KC_ACL0 , KC_ACL1, KC_ACL2, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_F3, + KC_MUTE, KC_MPRV , KC_MPLY, KC_MNXT, KC_MUTE, KC_WH_R, KC_WH_U, KC_WH_D, KC_WH_L, KC_F2, + _______, _______ , _______, _______, _______, _______, _______, KC_BTN1, F(BASE), RESET , KC_F12 , KC_F1 + ), }; @@ -45,17 +48,16 @@ const uint16_t PROGMEM fn_actions[] = { [MOUS] = ACTION_LAYER_ON(2, 1) // switch to layer 2 }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); } - return MACRO_NONE; + break; + } + return MACRO_NONE; }; diff --git a/keyboards/atreus/keymaps/gerb/keymap.c b/keyboards/atreus/keymaps/gerb/keymap.c index 1ba3942e3b94..c52f32ef61d9 100644 --- a/keyboards/atreus/keymaps/gerb/keymap.c +++ b/keyboards/atreus/keymaps/gerb/keymap.c @@ -1,7 +1,7 @@ // This is the personal keymap of Chris Gerber (@gerbercj). I haven't worked out the kinks // with the Colemak and Dvorak support yet, but everything else works nicely. -#include "atreus.h" +#include QMK_KEYBOARD_H // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -14,53 +14,52 @@ #define _L2 4 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QW] = { /* Qwerty */ - {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_Y, KC_U, KC_I, KC_O, KC_P }, - {KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO, KC_H, KC_J, KC_K, KC_L, KC_SCLN}, - {KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH}, - {KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_RCTL, KC_SPC, MO(_L1), KC_MINS, KC_QUOT, KC_ENT } - }, - [_CM] = { /* Colemak */ - {KC_Q, KC_W, KC_F, KC_P, KC_G, KC_NO, KC_J, KC_L, KC_U, KC_Y, KC_SCLN}, - {KC_A, KC_R, KC_S, KC_T, KC_D, KC_NO, KC_H, KC_N, KC_E, KC_I, KC_O }, - {KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH}, - {KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_RCTL, KC_SPC, MO(_L1), KC_MINS, KC_QUOT, KC_ENT } - }, - [_DV] = { /* Dvorak */ - {KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_NO, KC_F, KC_G, KC_C, KC_R, KC_L }, - {KC_A, KC_O, KC_E, KC_U, KC_I, KC_NO, KC_D, KC_H, KC_T, KC_N, KC_S }, - {KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LALT, KC_B, KC_M, KC_W, KC_V, KC_Z }, - {KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_RCTL, KC_SPC, MO(_L1), KC_MINS, KC_SLSH, KC_ENT } - }, - [_L1] = { /* LAYER 1 */ - {KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_NO, KC_VOLU, KC_7, KC_8, KC_9, KC_LBRC}, - {KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_NO, KC_VOLD, KC_4, KC_5, KC_6, KC_RBRC}, - {KC_GRV, KC_MPRV, KC_MPLY, KC_MNXT, KC_MINS, KC_LALT, KC_MUTE, KC_1, KC_2, KC_3, KC_BSLS}, - {TG(_L2), KC_APP, KC_LGUI, KC_LSFT, KC_BSPC, KC_RCTL, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL } - }, - [_L2] = { /* LAYER 2 */ - {KC_TRNS, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U, KC_NO, DF(_QW), KC_F7, KC_F8, KC_F9, KC_F10 }, - {KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, KC_NO, DF(_CM), KC_F6, KC_F5, KC_F6, KC_F11 }, - {KC_BTN4, KC_BTN1, KC_BTN2, KC_BTN3, KC_BTN4, KC_LALT, DF(_DV), KC_F1, KC_F2, KC_F3, KC_F12 }, - {KC_TRNS, KC_TRNS, KC_LGUI, KC_LSFT, KC_BSPC, KC_RCTL, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, RESET } - } + [_QW] = LAYOUT( /* Qwerty */ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_RCTL, KC_SPC, MO(_L1), KC_MINS, KC_QUOT, KC_ENT + ), + [_CM] = LAYOUT( /* Colemak */ + KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, + KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_RCTL, KC_SPC, MO(_L1), KC_MINS, KC_QUOT, KC_ENT + ), + [_DV] = LAYOUT( /* Dvorak */ + KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, + KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, + KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, + KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_RCTL, KC_SPC, MO(_L1), KC_MINS, KC_SLSH, KC_ENT + ), + [_L1] = LAYOUT( /* LAYER 1 */ + KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_VOLU, KC_7, KC_8, KC_9, KC_LBRC, + KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_VOLD, KC_4, KC_5, KC_6, KC_RBRC, + KC_GRV, KC_MPRV, KC_MPLY, KC_MNXT, KC_MINS, KC_MUTE, KC_1, KC_2, KC_3, KC_BSLS, + TG(_L2), KC_APP, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_RCTL, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL + ), + [_L2] = LAYOUT( /* LAYER 2 */ + KC_TRNS, KC_WH_L, KC_MS_U, KC_WH_R, KC_WH_U, DF(_QW), KC_F7, KC_F8, KC_F9, KC_F10, + KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, DF(_CM), KC_F6, KC_F5, KC_F6, KC_F11, + KC_BTN4, KC_BTN1, KC_BTN2, KC_BTN3, KC_BTN4, DF(_DV), KC_F1, KC_F2, KC_F3, KC_F12, + KC_TRNS, KC_TRNS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LALT, KC_RCTL, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, RESET + ), }; const uint16_t PROGMEM fn_actions[] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); } - return MACRO_NONE; + break; + } + return MACRO_NONE; }; diff --git a/keyboards/atreus/keymaps/henxing/keymap.c b/keyboards/atreus/keymaps/henxing/keymap.c index e5ff5f5d3fbb..51a46fa37374 100644 --- a/keyboards/atreus/keymaps/henxing/keymap.c +++ b/keyboards/atreus/keymaps/henxing/keymap.c @@ -1,4 +1,4 @@ -#include "atreus.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #include "eeconfig.h" @@ -19,87 +19,85 @@ enum custom_keycodes { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* - * q w e r t || y u i o p - * a s d f g || h j k l ; - * z x c v b || n m , . / - * esc tab gui shift bksp ctrl || alt space lower - ' enter - */ - [_QWERTY] = KEYMAP( \ - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ - KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, \ - KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, LOWER, KC_MINS, KC_QUOT, KC_ENT \ - ), - - /* - * ! @ up { } || pgup 7 8 9 * - * # left down right $ || pgdn 4 5 6 + - * [ ] ( ) & || ` 1 2 3 \ - * raise insert gui shift bksp ctrl || alt space ____ . 0 = - */ - [_LOWER] = KEYMAP( \ - KC_EXLM, KC_AT, KC_UP, KC_LCBR, KC_RCBR, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR, \ - KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS, \ - KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS, \ - RAISE, KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL \ - ), - - /* - * insert home up end pgup || up F7 F8 F9 F10 - * del left down right pgdn || down F4 F5 F6 F11 - * volup reset || F1 F2 F3 F12 - * voldn super shift bksp ctrl || alt space QWERTY prtsc scroll pause - */ - [_RAISE] = KEYMAP( \ - KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10, \ - KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11, \ - KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12, \ - KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, QWERTY, KC_PSCR, KC_SLCK, KC_PAUS \ - ) - + /* + * q w e r t || y u i o p + * a s d f g || h j k l ; + * z x c v b || n m , . / + * esc tab gui shift bksp ctrl || alt space lower - ' enter + */ + [_QWERTY] = LAYOUT( \ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, \ + KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, LOWER, KC_MINS, KC_QUOT, KC_ENT \ + ), + + /* + * ! @ up { } || pgup 7 8 9 * + * # left down right $ || pgdn 4 5 6 + + * [ ] ( ) & || ` 1 2 3 \ + * raise insert gui shift bksp ctrl || alt space ____ . 0 = + */ + [_LOWER] = LAYOUT( \ + KC_EXLM, KC_AT, KC_UP, KC_LCBR, KC_RCBR, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR, \ + KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS, \ + KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS, \ + RAISE, KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL \ + ), + + /* + * insert home up end pgup || up F7 F8 F9 F10 + * del left down right pgdn || down F4 F5 F6 F11 + * volup reset || F1 F2 F3 F12 + * voldn super shift bksp ctrl || alt space QWERTY prtsc scroll pause + */ + [_RAISE] = LAYOUT( \ + KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10, \ + KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11, \ + KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12, \ + KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, QWERTY, KC_PSCR, KC_SLCK, KC_PAUS \ + ), }; void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); } bool process_record_user(uint16_t keycode, keyrecord_t *record) { - // The value to return - bool return_value = false; - - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - break; - - case LOWER: - // Toggle LOWER layer on when key pressed and off when released - if (record->event.pressed) { - layer_on(_LOWER); - } else { - layer_off(_LOWER); - } - break; - - case RAISE: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_RAISE); - } - break; - - default: - - // If the keycode is not handled by any of the other cases, the - // function should return true - return_value = true; - break; - } - - return return_value; + // The value to return + bool return_value = false; + + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + break; + + case LOWER: + // Toggle LOWER layer on when key pressed and off when released + if (record->event.pressed) { + layer_on(_LOWER); + } else { + layer_off(_LOWER); + } + break; + + case RAISE: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_RAISE); + } + break; + + default: + + // If the keycode is not handled by any of the other cases, the + // function should return true + return_value = true; + break; + } + + return return_value; } diff --git a/keyboards/atreus/keymaps/jeremy/keymap.c b/keyboards/atreus/keymaps/jeremy/keymap.c index 90ec6f9049a2..42bef9d80c95 100644 --- a/keyboards/atreus/keymaps/jeremy/keymap.c +++ b/keyboards/atreus/keymaps/jeremy/keymap.c @@ -1,6 +1,6 @@ // This is the personal keymap of Jeremy Cowgar (@jcowgar). It is written for the programmer. -#include "atreus.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #include "keymap_colemak.h" @@ -25,41 +25,43 @@ #define KM_REDO LGUI(LSFT(KC_Z)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[ALPH] = { - {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P}, - {KC_A, LT(NUMS, KC_S), LT(FKEY, KC_D), KC_F, KC_G, KC_TRNS, KC_H, KC_J, LT(CURS, KC_K), LT(SYMB, KC_L), KC_SCLN}, - {KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH}, - {KC_LCTL, KC_ESC, KC_NO, KC_LSFT, KC_SPC, KC_LGUI, KC_ENT, KC_RSFT, KC_NO, KC_ESC, KC_RCTL} -}, -[NUMS] = { - {KC_TRNS, KC_TRNS, KC_TRNS, KC_ASTR, KC_SLSH, KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, KC_SLSH}, - {KC_TRNS, KC_TRNS, KC_EQL, KC_PLUS, KC_MINS, KC_TRNS, KC_LPRN, KC_4, KC_5, KC_6, KC_ASTR}, - {KC_TRNS, KC_TRNS, KC_DOT, KC_COMM, CM_SCLN, KC_TRNS, KC_RPRN, KC_1, KC_2, KC_3, KC_MINS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_EQL, KC_PLUS} -}, -[CURS] = { - {KC_TRNS, KC_BSPC, KC_UP, KC_DELT, KC_PGUP, KC_TRNS, KC_TRNS, KM_SAVE, KC_TRNS, KM_OPEN, KC_TRNS}, - {KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KM_UNDO, KC_LALT, KC_TRNS, KC_LGUI, KC_TRNS}, - {KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_MPLY, KM_COPY, KM_REDO, KM_CLSE, KC_TRNS, KC_TRNS, KC_TRNS}, - {KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TAB, KM_CUT, KM_PAST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} -}, -[SYMB] = { - {KC_BSLS, KC_EXLM, KC_LABK, KC_RABK, CM_COLN, KC_TRNS, KC_UNDS, KC_DLR, KC_QUES, KC_TRNS, KC_PERC}, - {KC_AT, KC_AMPR, KC_LPRN, KC_RPRN, CM_SCLN, KC_TRNS, KC_COMM, KC_DOT, KC_QUOT, KC_TRNS, KC_TILD}, - {KC_HASH, KC_PIPE, KC_LCBR, KC_RCBR, KC_SLSH, KC_TRNS, KC_TRNS, KC_GRV, KC_DQT, KC_TRNS, KC_CIRC}, - {KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} -}, -[FKEY] = { - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F5, KC_F6, KC_F7, KC_F8}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} -}}; + [ALPH] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, LT(NUMS, KC_S), LT(FKEY, KC_D), KC_F, KC_G, KC_H, KC_J, LT(CURS, KC_K), LT(SYMB, KC_L), KC_SCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_LCTL, KC_ESC, KC_NO, KC_LSFT, KC_SPC, KC_LALT, KC_LGUI, KC_ENT, KC_RSFT, KC_NO, KC_ESC, KC_RCTL + ), + [NUMS] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_ASTR, KC_SLSH, KC_TRNS, KC_7, KC_8, KC_9, KC_SLSH, + KC_TRNS, KC_TRNS, KC_EQL, KC_PLUS, KC_MINS, KC_LPRN, KC_4, KC_5, KC_6, KC_ASTR, + KC_TRNS, KC_TRNS, KC_DOT, KC_COMM, CM_SCLN, KC_RPRN, KC_1, KC_2, KC_3, KC_MINS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_EQL, KC_PLUS + ), + [CURS] = LAYOUT( + KC_TRNS, KC_BSPC, KC_UP, KC_DELT, KC_PGUP, KC_TRNS, KM_SAVE, KC_TRNS, KM_OPEN, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KM_UNDO, KC_LALT, KC_TRNS, KC_LGUI, KC_TRNS, + KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_MPLY, KM_REDO, KM_CLSE, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TAB, KM_COPY, KM_CUT, KM_PAST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [SYMB] = LAYOUT( + KC_BSLS, KC_EXLM, KC_LABK, KC_RABK, CM_COLN, KC_UNDS, KC_DLR, KC_QUES, KC_TRNS, KC_PERC, + KC_AT, KC_AMPR, KC_LPRN, KC_RPRN, CM_SCLN, KC_COMM, KC_DOT, KC_QUOT, KC_TRNS, KC_TILD, + KC_HASH, KC_PIPE, KC_LCBR, KC_RCBR, KC_SLSH, KC_TRNS, KC_GRV, KC_DQT, KC_TRNS, KC_CIRC, + KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [FKEY] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F5, KC_F6, KC_F7, KC_F8, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + +const uint16_t PROGMEM fn_actions[] = { -const uint16_t PROGMEM fn_actions[] = {}; +}; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) {} return MACRO_NONE; diff --git a/keyboards/atreus/keymaps/khitsule/keymap.c b/keyboards/atreus/keymaps/khitsule/keymap.c index 23fabf0d7916..04cd4d591682 100644 --- a/keyboards/atreus/keymaps/khitsule/keymap.c +++ b/keyboards/atreus/keymaps/khitsule/keymap.c @@ -1,10 +1,10 @@ // Personal keymap of khitsule -#include "atreus.h" +#include QMK_KEYBOARD_H -#define ALPH 0 -#define LOWR 1 -#define RAIS 2 +#define ALPH 0 +#define LOWR 1 +#define RAIS 2 // enum layers { // ALPH, //alpha qwerty @@ -24,24 +24,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[ALPH] = { - {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P}, - {KC_A, KC_S, KC_D, KC_F, KC_G, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN}, - {KC_Z, KC_X, KC_C, KC_V, KC_B, CTL_T(KC_SPC), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH}, - {KC_ESC, KC_TRNS, KC_TRNS, ALT_T(KC_ENT), LT(LOWR, KC_TAB), SFT_T(KC_BSPC), LT(RAIS, KC_DEL), KC_LGUI, KC_TRNS, KC_QUOT, KC_MINUS} -}, -[LOWR] = { - {KC_PSCR, KC_HOME, KC_UP, KC_END, KC_TRNS, KC_TRNS, KC_LPRN, KC_F7, KC_F8, KC_F9, KC_RPRN}, - {KC_VOLU, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGUP, KC_TRNS, KC_LBRC, KC_F4, KC_F5, KC_F6, KC_RBRC}, - {KC_VOLD, KC_MPRV, KC_MPLY, KC_MNXT, KC_PGDN, KC_TRNS, LSFT(KC_LBRC), KC_F1, KC_F2, KC_F3, LSFT(KC_RBRC)}, - {KM_DLEFT, KM_DRIGHT, LALT(KC_TAB), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} -}, -[RAIS] = { - {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, KC_TRNS}, - {KC_CIRC, KC_AMPR, KC_GRV, KC_TILD, KC_PIPE, KC_TRNS, KC_PLUS, KC_4, KC_5, KC_6, KC_ASTR}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, KC_MINUS, KC_1, KC_2, KC_3, KC_SLASH}, - {RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_EQL} -} + [ALPH] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_ESC, KC_TRNS, KC_TRNS, ALT_T(KC_ENT), LT(LOWR, KC_TAB), CTL_T(KC_SPC), SFT_T(KC_BSPC), LT(RAIS, KC_DEL), KC_LGUI, KC_TRNS, KC_QUOT, KC_MINUS + ), + [LOWR] = LAYOUT( + KC_PSCR, KC_HOME, KC_UP, KC_END, KC_TRNS, KC_LPRN, KC_F7, KC_F8, KC_F9, KC_RPRN, + KC_VOLU, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGUP, KC_LBRC, KC_F4, KC_F5, KC_F6, KC_RBRC, + KC_VOLD, KC_MPRV, KC_MPLY, KC_MNXT, KC_PGDN, LSFT(KC_LBRC), KC_F1, KC_F2, KC_F3, LSFT(KC_RBRC), + KM_DLEFT, KM_DRIGHT, LALT(KC_TAB), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [RAIS] = LAYOUT( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_7, KC_8, KC_9, KC_TRNS, + KC_CIRC, KC_AMPR, KC_GRV, KC_TILD, KC_PIPE, KC_PLUS, KC_4, KC_5, KC_6, KC_ASTR, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_MINUS, KC_1, KC_2, KC_3, KC_SLASH, + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_EQL + ), }; const uint16_t PROGMEM fn_actions[] = { @@ -49,9 +49,8 @@ const uint16_t PROGMEM fn_actions[] = { [2] = ACTION_MACRO_TAP(2) }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch(id) { +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch(id) { case 1: return tap_mod_macro(record, LGUI, MACRO( D(LSFT), T(9), U(LSFT), END)); break; diff --git a/keyboards/atreus/keymaps/replicaJunction/keymap.c b/keyboards/atreus/keymaps/replicaJunction/keymap.c index d39a184d4870..2d8f0d70f867 100644 --- a/keyboards/atreus/keymaps/replicaJunction/keymap.c +++ b/keyboards/atreus/keymaps/replicaJunction/keymap.c @@ -15,7 +15,7 @@ * here: https://colemakmods.github.io/mod-dh/ */ -#include "atreus.h" +#include QMK_KEYBOARD_H // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -47,136 +47,136 @@ ; // This doesn't do anything. It's just for VSCode because its syntax highlighting is weird for the above #define statements. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* - * Colemak-ModDH - * - * ,----------------------------------. ,----------------------------------. - * | Q | W | F | P | B | | J | L | U | Y | ; | - * +------+------+------+------+------| +------+------+------+------+------| - * | A | R | S | T | G | | M | N | E | I | O | - * +------+------+------+------+------| +------+------+------+------+------| - * |Z Shft| X | C | D | V | ,------. ,------. | K | H | , | . |/ Shft| - * +------+------+------+------+------| | Ctrl | | Alt | +------+------+------+------+------| - * | Esc | Gui | Tab | _FN | Bksp | | Del | | Enter| |Sp/_NU| _EX | - | ' | = | - * `----------------------------------' `------' `------' `----------------------------------' - * - */ -[_CO] = KEYMAP( - KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, - KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, - SFT_T(KC_Z), KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, SFT_T(KC_SLSH), - KC_ESC, KC_LGUI, KC_TAB, MO(_FN), KC_BSPC, CTL_T(KC_DEL), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_EX), KC_MINS, KC_QUOT, KC_EQL -), - -/* - * QWERTY - * - * ,----------------------------------. ,----------------------------------. - * | Q | W | E | R | T | | Y | U | I | O | P | - * +------+------+------+------+------| +------+------+------+------+------| - * | A | S | D | F | G | | H | J | K | L | ; | - * +------+------+------+------+------| +------+------+------+------+------| - * |Z Shft| X | C | V | B | ,------. ,------. | N | M | , | . |/ Shft| - * +------+------+------+------+------| | Ctrl | | Alt | +------+------+------+------+------| - * | Esc | Gui | Tab | _FN | Bksp | | Del | | Enter| |Sp/_NU| _EX | - | ' | = | - * `----------------------------------' `------' `------' `----------------------------------' - * - */ -[_QW] = KEYMAP( /* Qwerty */ - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, - KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, - SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH), - KC_ESC, KC_LGUI, KC_TAB, MO(_FN), KC_BSPC, CTL_T(KC_DEL), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_EX), KC_MINS, KC_QUOT, KC_EQL -), - -/* - * Extend - * - * Ctrl+` is a keyboard shortcut for the program ConEmu, which brings up a dropdown console window. - * - * Also note that some dual-role keys are overridden here with their modifiers - * - * ,----------------------------------. ,----------------------------------. - * | | | | |Ctrl `| | PgUp | Home | Up | End | Del | - * +------+------+------+------+------| +------+------+------+------+------| - * | Gui | Shift| Alt | Ctrl | | | PgDn | Left | Down | Right| Bksp | - * +------+------+------+------+------| +------+------+------+------+------| - * | Shift| Cut | Copy | | Paste| ,------. ,------. | | ^Tab | Tab | |Insert| - * +------+------+------+------+------| | Del | | Enter| +------+------+------+------+------| - * | | | | | | | | | | | Space|XXXXXX| | |PrntSc| - * `----------------------------------' `------' `------' `----------------------------------' - * - */ -[_EX] = KEYMAP( /* Extend */ - _______, _______, _______, _______, LCTL(KC_GRV), KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, - KC_LGUI, KC_LSFT, KC_LALT, KC_LCTL, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, - KC_LSFT, KX_CUT, KX_COPY, _______, KX_PAST, _______, KCX_LST, KC_TAB, _______, KC_INS, - _______, _______, _______, _______, _______, KC_DEL, KC_ENT, KC_SPC, _______, _______, _______, KC_PSCR -), - -/* - * Numbers and symbols - * - * ,----------------------------------. ,----------------------------------. - * | ! | @ | { | } | & | | / | 7 | 8 | 9 | * | - * +------+------+------+------+------| +------+------+------+------+------| - * | # | $ | ( | ) | ~ | | | | 4 | 5 | 6 | - | - * +------+------+------+------+------| +------+------+------+------+------| - * | % | ^ | [ | ] | ` | ,------. ,------. | \ | 1 | 2 | 3 | + | - * +------+------+------+------+------| | | | | +------+------+------+------+------| - * | | _GA | | | | | | | | |XXXXXX| 0 | . | = | | - * `----------------------------------' `------' `------' `----------------------------------' - * - */ -[_NU] = KEYMAP( /* Numbers and symbols */ - KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_AMPR, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR, - KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_TILD, KC_PIPE, KC_4, KC_5, KC_6, KC_MINS, - KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_GRV, KC_BSLS, KC_1, KC_2, KC_3, KC_PLUS, - _______, TG(_GA), _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_EQL, _______ -), - -/* - * Functions - * - * ,----------------------------------. ,----------------------------------. - * | Caps | F9 | F10 | F11 | F12 | | _USER|Whl Up| MUp |Whl Dn| | - * +------+------+------+------+------| +------+------+------+------+------| - * | | F5 | F6 | F7 | F8 | | Vol ^| MLeft| MDown|MRight| | - * +------+------+------+------+------| +------+------+------+------+------| - * | | F1 | F2 | F3 | F4 | ,------. ,------. | Vol v| | | | | - * +------+------+------+------+------| | | |RClick| +------+------+------+------+------| - * | | | |XXXXXX| | | | | | |LClick|MClick| _CO | _GA | RESET| - * `----------------------------------' `------' `------' `----------------------------------' - * - */ -[_FN] = KEYMAP( /* Functions */ - KC_CAPS, KC_F9, KC_F10, KC_F11, KC_F12, M(_USER),KC_WH_U, KC_MS_U, KC_WH_D, _______, - _______, KC_F5, KC_F6, KC_F7, KC_F8, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_R, _______, - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_VOLD, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, KC_BTN2, KC_BTN1, KC_BTN3, DF(_CO), DF(_QW), RESET -), - -/* - * Gaming - * - * ,----------------------------------. ,----------------------------------. - * | | | | | | | |Whl Up| MUp |Whl Dn| | - * +------+------+------+------+------| +------+------+------+------+------| - * | | | | | | | | MLeft| MDown|MRight| | - * +------+------+------+------+------| +------+------+------+------+------| - * | Z | | | | | ,------. ,------. | | | | | | - * +------+------+------+------+------| | Bksp | |RClick| +------+------+------+------+------| - * | | _GA | | Shift| Space| | | | | |LClick|MClick| | | | - * `----------------------------------' `------' `------' `----------------------------------' - * - */ -[_GA] = KEYMAP( /* Gaming */ - _______, _______, _______, _______, _______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, - _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, - KC_Z, _______, _______, _______, _______, _______, _______, KC_MS_D, _______, _______, - _______, TG(_GA), _______, KC_LSFT, KC_SPC, KC_BSPC, KC_BTN2, KC_BTN1, KC_BTN3, _______, _______, _______ -)}; + /* + * Colemak-ModDH + * + * ,----------------------------------. ,----------------------------------. + * | Q | W | F | P | B | | J | L | U | Y | ; | + * +------+------+------+------+------| +------+------+------+------+------| + * | A | R | S | T | G | | M | N | E | I | O | + * +------+------+------+------+------| +------+------+------+------+------| + * |Z Shft| X | C | D | V | ,------. ,------. | K | H | , | . |/ Shft| + * +------+------+------+------+------| | Ctrl | | Alt | +------+------+------+------+------| + * | Esc | Gui | Tab | _FN | Bksp | | Del | | Enter| |Sp/_NU| _EX | - | ' | = | + * `----------------------------------' `------' `------' `----------------------------------' + * + */ + [_CO] = LAYOUT( + KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, + KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, + SFT_T(KC_Z), KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, SFT_T(KC_SLSH), + KC_ESC, KC_LGUI, KC_TAB, MO(_FN), KC_BSPC, CTL_T(KC_DEL), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_EX), KC_MINS, KC_QUOT, KC_EQL + ), + + /* + * QWERTY + * + * ,----------------------------------. ,----------------------------------. + * | Q | W | E | R | T | | Y | U | I | O | P | + * +------+------+------+------+------| +------+------+------+------+------| + * | A | S | D | F | G | | H | J | K | L | ; | + * +------+------+------+------+------| +------+------+------+------+------| + * |Z Shft| X | C | V | B | ,------. ,------. | N | M | , | . |/ Shft| + * +------+------+------+------+------| | Ctrl | | Alt | +------+------+------+------+------| + * | Esc | Gui | Tab | _FN | Bksp | | Del | | Enter| |Sp/_NU| _EX | - | ' | = | + * `----------------------------------' `------' `------' `----------------------------------' + * + */ + [_QW] = LAYOUT( /* Qwerty */ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH), + KC_ESC, KC_LGUI, KC_TAB, MO(_FN), KC_BSPC, CTL_T(KC_DEL), ALT_T(KC_ENT), LT(_NU, KC_SPC), MO(_EX), KC_MINS, KC_QUOT, KC_EQL + ), + + /* + * Extend + * + * Ctrl+` is a keyboard shortcut for the program ConEmu, which brings up a dropdown console window. + * + * Also note that some dual-role keys are overridden here with their modifiers + * + * ,----------------------------------. ,----------------------------------. + * | | | | |Ctrl `| | PgUp | Home | Up | End | Del | + * +------+------+------+------+------| +------+------+------+------+------| + * | Gui | Shift| Alt | Ctrl | | | PgDn | Left | Down | Right| Bksp | + * +------+------+------+------+------| +------+------+------+------+------| + * | Shift| Cut | Copy | | Paste| ,------. ,------. | | ^Tab | Tab | |Insert| + * +------+------+------+------+------| | Del | | Enter| +------+------+------+------+------| + * | | | | | | | | | | | Space|XXXXXX| | |PrntSc| + * `----------------------------------' `------' `------' `----------------------------------' + * + */ + [_EX] = LAYOUT( /* Extend */ + _______, _______, _______, _______, LCTL(KC_GRV), KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, + KC_LGUI, KC_LSFT, KC_LALT, KC_LCTL, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, + KC_LSFT, KX_CUT, KX_COPY, _______, KX_PAST, _______, KCX_LST, KC_TAB, _______, KC_INS, + _______, _______, _______, _______, _______, KC_DEL, KC_ENT, KC_SPC, _______, _______, _______, KC_PSCR + ), + + /* + * Numbers and symbols + * + * ,----------------------------------. ,----------------------------------. + * | ! | @ | { | } | & | | / | 7 | 8 | 9 | * | + * +------+------+------+------+------| +------+------+------+------+------| + * | # | $ | ( | ) | ~ | | | | 4 | 5 | 6 | - | + * +------+------+------+------+------| +------+------+------+------+------| + * | % | ^ | [ | ] | ` | ,------. ,------. | \ | 1 | 2 | 3 | + | + * +------+------+------+------+------| | | | | +------+------+------+------+------| + * | | _GA | | | | | | | | |XXXXXX| 0 | . | = | | + * `----------------------------------' `------' `------' `----------------------------------' + * + */ + [_NU] = LAYOUT( /* Numbers and symbols */ + KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_AMPR, KC_SLSH, KC_7, KC_8, KC_9, KC_ASTR, + KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_TILD, KC_PIPE, KC_4, KC_5, KC_6, KC_MINS, + KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_GRV, KC_BSLS, KC_1, KC_2, KC_3, KC_PLUS, + _______, TG(_GA), _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_EQL, _______ + ), + + /* + * Functions + * + * ,----------------------------------. ,----------------------------------. + * | Caps | F9 | F10 | F11 | F12 | | _USER|Whl Up| MUp |Whl Dn| | + * +------+------+------+------+------| +------+------+------+------+------| + * | | F5 | F6 | F7 | F8 | | Vol ^| MLeft| MDown|MRight| | + * +------+------+------+------+------| +------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | ,------. ,------. | Vol v| | | | | + * +------+------+------+------+------| | | |RClick| +------+------+------+------+------| + * | | | |XXXXXX| | | | | | |LClick|MClick| _CO | _GA | RESET| + * `----------------------------------' `------' `------' `----------------------------------' + * + */ + [_FN] = LAYOUT( /* Functions */ + KC_CAPS, KC_F9, KC_F10, KC_F11, KC_F12, M(_USER),KC_WH_U, KC_MS_U, KC_WH_D, _______, + _______, KC_F5, KC_F6, KC_F7, KC_F8, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_R, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_VOLD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_BTN2, KC_BTN1, KC_BTN3, DF(_CO), DF(_QW), RESET + ), + + /* + * Gaming + * + * ,----------------------------------. ,----------------------------------. + * | | | | | | | |Whl Up| MUp |Whl Dn| | + * +------+------+------+------+------| +------+------+------+------+------| + * | | | | | | | | MLeft| MDown|MRight| | + * +------+------+------+------+------| +------+------+------+------+------| + * | Z | | | | | ,------. ,------. | | | | | | + * +------+------+------+------+------| | Bksp | |RClick| +------+------+------+------+------| + * | | _GA | | Shift| Space| | | | | |LClick|MClick| | | | + * `----------------------------------' `------' `------' `----------------------------------' + * + */ + [_GA] = LAYOUT( /* Gaming */ + _______, _______, _______, _______, _______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, + _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, + KC_Z, _______, _______, _______, _______, _______, _______, KC_MS_D, _______, _______, + _______, TG(_GA), _______, KC_LSFT, KC_SPC, KC_BSPC, KC_BTN2, KC_BTN1, KC_BTN3, _______, _______, _______ + ) +}; /* * Template @@ -197,17 +197,16 @@ const uint16_t PROGMEM fn_actions[] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function - switch(id) { - case _USER: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; + switch(id) { + case _USER: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); } - return MACRO_NONE; + break; + } + return MACRO_NONE; }; diff --git a/keyboards/atreus/keymaps/xk/keymap.c b/keyboards/atreus/keymaps/xk/keymap.c index 9ac1138ec05a..ed1f634cebe8 100644 --- a/keyboards/atreus/keymaps/xk/keymap.c +++ b/keyboards/atreus/keymaps/xk/keymap.c @@ -1,7 +1,7 @@ // this is the style you want to emulate. // This is the canonical layout file for the Quantum project. If you want to add another keyboard, -#include "atreus.h" +#include QMK_KEYBOARD_H #define _COLEMAK 0 #define _KAMELOC 1 @@ -109,169 +109,170 @@ OSX, const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* - TAP - ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ - │ Q │ W │ F │ P │ B │ │ J │ L │ U │ Y │ ; │ - ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── - │ A │ R │ S │ T │ G │ │ M │ N │ E │ I │ O │ - ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── - │ X │ C │ D │ V │ Z ├────┐ ┌───── K │ H │ , │ . │ / │ - ├────┌────┌────┌────┌───── │ │ ├────┌────┌────┌────┌───── - │SFTn│CTLn│ALTn│ROUS│SPC │BKSP│ │TAB │ENT │PGDN│ ' │ \ │ESC │ - └────┮────┮────┮────┮────┮────┘ └────┮────┮────┮────┮────┮────┘ - HOLD - ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ - │ │ │ │ │ │ │ │ │ │ │ALT │ - ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── - │ │ │ │ │ │ │ │ │ │ │ │ - ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── - │ │ │ │ │ ├────┐ ┌───── │ │ │ │CTL │ - ├────┌────┌────┌────┌───── │ │ ├────┌────┌────┌────┌───── - │SFT │CTL │ALT │ROUS│L123│L OH│ │L OH│L123│L!@#│ │L FN│LESC│ - └────┮────┮────┮────┮────┮────┘ └────┮────┮────┮────┮────┮────┘ - DOUBLETAP - ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ - │ │ │ │ │ │ │ │ │ │ │ │ - ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── - │ │ │ │ │ │ │ │ │ │ │ │ - ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── - │ │ │ │ │ ├────┐ ┌───── │ │ │ │ │ - ├────┌────┌────┌────┌───── │ │ ├────┌────┌────┌────┌───── - │OSML│OSML│OSML│NADA│ │ │ │ │ │ │ │ │ │ - └────┮────┮────┮────┮────┮────┘ └────┮────┮────┮────┮────┮────┘ -*/ + /* + TAP + ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ + │ Q │ W │ F │ P │ B │ │ J │ L │ U │ Y │ ; │ + ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── + │ A │ R │ S │ T │ G │ │ M │ N │ E │ I │ O │ + ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── + │ X │ C │ D │ V │ Z ├────┐ ┌───── K │ H │ , │ . │ / │ + ├────┌────┌────┌────┌───── │ │ ├────┌────┌────┌────┌───── + │SFTn│CTLn│ALTn│ROUS│SPC │BKSP│ │TAB │ENT │PGDN│ ' │ \ │ESC │ + └────┮────┮────┮────┮────┮────┘ └────┮────┮────┮────┮────┮────┘ + HOLD + ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ + │ │ │ │ │ │ │ │ │ │ │ALT │ + ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── + │ │ │ │ │ │ │ │ │ │ │ │ + ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── + │ │ │ │ │ ├────┐ ┌───── │ │ │ │CTL │ + ├────┌────┌────┌────┌───── │ │ ├────┌────┌────┌────┌───── + │SFT │CTL │ALT │ROUS│L123│L OH│ │L OH│L123│L!@#│ │L FN│LESC│ + └────┮────┮────┮────┮────┮────┘ └────┮────┮────┮────┮────┮────┘ + DOUBLETAP + ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ + │ │ │ │ │ │ │ │ │ │ │ │ + ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── + │ │ │ │ │ │ │ │ │ │ │ │ + ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── + │ │ │ │ │ ├────┐ ┌───── │ │ │ │ │ + ├────┌────┌────┌────┌───── │ │ ├────┌────┌────┌────┌───── + │OSML│OSML│OSML│NADA│ │ │ │ │ │ │ │ │ │ + └────┮────┮────┮────┮────┮────┘ └────┮────┮────┮────┮────┮────┘ + */ -// Colemak PB&J (Mod-DH) -[_COLEMAK] = KEYMAP( \ - KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, ALT_IT, \ - KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, \ - KC_X, KC_C, KC_D, KC_V, KC_Z, KC_K, KC_H, KC_COMM, SFT_IT, CTL_IT, \ - KYCTL, KYSFT, KYALT, TT(_MLAYER), XK_SPC, XK_TAB, XK_BSP, XK_ENT, XK_PGDN, XK_APO, PIPBOY, XK_ESC \ -), + // Colemak PB&J (Mod-DH) + [_COLEMAK] = LAYOUT( \ + KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, ALT_IT, \ + KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, \ + KC_X, KC_C, KC_D, KC_V, KC_Z, KC_K, KC_H, KC_COMM, SFT_IT, CTL_IT, \ + KYCTL, KYSFT, KYALT, TT(_MLAYER), XK_SPC, XK_TAB, XK_BSP, XK_ENT, XK_PGDN, XK_APO, PIPBOY, XK_ESC \ + ), -// useful for one-handed typing -[_KAMELOC] = KEYMAP( \ - KC_SCLN, KC_Y, KC_U, KC_L, KC_J, KC_B, KC_P, KC_F, KC_W, KC_Q, \ - KC_O, KC_I, KC_E, KC_N, KC_M, KC_G, KC_T, KC_S, KC_R, KC_A, \ - KC_SLSH, KC_DOT, KC_COMM, KC_H, KC_K, KC_Z, KC_V, KC_D, KC_C, KC_X, \ - XK_ESC, PIPBOY, TT(_MLAYER), KC_PGDN, KC_ENT, _______, _______, XK_SPC, KC_PGUP, KYALT, KYCTL, KYSFT \ -), + // useful for one-handed typing + [_KAMELOC] = LAYOUT( \ + KC_SCLN, KC_Y, KC_U, KC_L, KC_J, KC_B, KC_P, KC_F, KC_W, KC_Q, \ + KC_O, KC_I, KC_E, KC_N, KC_M, KC_G, KC_T, KC_S, KC_R, KC_A, \ + KC_SLSH, KC_DOT, KC_COMM, KC_H, KC_K, KC_Z, KC_V, KC_D, KC_C, KC_X, \ + XK_ESC, PIPBOY, TT(_MLAYER), KC_PGDN, KC_ENT, _______, _______, XK_SPC, KC_PGUP, KYALT, KYCTL, KYSFT \ + ), -/* - ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ - │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ - ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── - │ M │ V- │ V+ │NEXT│PLAY│ │ ← │ ↓ │ ↑ │ → │DASH│ - ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── - │ - │ = │ ` │GUI │UNDO├────┐ ┌─────HOME│END │HOME│INS │ \ │ - ├────┌────┌────┌────┌───── │ │ ├────┌────┌────┌────┌───── - │ │ │ │ │ │ │ │ │ │GUI │ │ │ │ - └────┮────┮────┮────┮────┮────┘ └────┮────┮────┮────┮────┮────┘ -*/ + /* + ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ + │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ + ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── + │ M │ V- │ V+ │NEXT│PLAY│ │ ← │ ↓ │ ↑ │ → │DASH│ + ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── + │ - │ = │ ` │GUI │UNDO├────┐ ┌─────HOME│END │HOME│INS │ \ │ + ├────┌────┌────┌────┌───── │ │ ├────┌────┌────┌────┌───── + │ │ │ │ │ │ │ │ │ │GUI │ │ │ │ + └────┮────┮────┮────┮────┮────┘ └────┮────┮────┮────┮────┮────┘ + */ -[_IKAPILA] = KEYMAP( \ - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \ - KC_MUTE, KC_VOLD, KC_VOLU, TD(MND), KC_MPLY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TD(DSH), \ - KC_MINS, KC_EQL, KC_GRV, KC_LGUI, LCTL(KC_Z), TD(HND), KC_HOME, TD(HND), KC_INS, KC_BSLS, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_LGUI, _______, _______, KYSFT \ -), + [_IKAPILA] = LAYOUT( \ + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \ + KC_MUTE, KC_VOLD, KC_VOLU, TD(MND), KC_MPLY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TD(DSH), \ + KC_MINS, KC_EQL, KC_GRV, KC_LGUI, LCTL(KC_Z), TD(HND), KC_HOME, TD(HND), KC_INS, KC_BSLS, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_LGUI, _______, _______, KYSFT \ + ), -/* - ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ - │ ! │ @ │ # │ $ │ % │ │ ^ │ & │ * │ ( │ ) │ - ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── - │PSCR│ ← │ ↓ │ ↑ │ → │ │NEXT│PGUP│ V+ │ V- │DASH│ - ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── - │ _ │ + │ ~ │HOME│END ├────┐ ┌───── {} │ () │ <> │ [ │ ] │ - ├────┌────┌────┌────┌───── │ │ ├────┌────┌────┌────┌───── - │ │ │ │ │ │DEL │ │BKSP│ │ │ │ │ │ - └────┮────┮────┮────┮────┮────┘ └────┮────┮────┮────┮────┮────┘ -*/ + /* + ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ + │ ! │ @ │ # │ $ │ % │ │ ^ │ & │ * │ ( │ ) │ + ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── + │PSCR│ ← │ ↓ │ ↑ │ → │ │NEXT│PGUP│ V+ │ V- │DASH│ + ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── + │ _ │ + │ ~ │HOME│END ├────┐ ┌───── {} │ () │ <> │ [ │ ] │ + ├────┌────┌────┌────┌───── │ │ ├────┌────┌────┌────┌───── + │ │ │ │ │ │DEL │ │BKSP│ │ │ │ │ │ + └────┮────┮────┮────┮────┮────┘ └────┮────┮────┮────┮────┮────┘ + */ -[_IKASHFT] = KEYMAP( \ - KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, \ - KC_PSCR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TD(MND), KC_PGUP, KC_VOLU, TD(VOM), KC_MDSH, \ - KC_UNDS, KC_PLUS, KC_TILD, KC_HOME, KC_END, M(1), M(0), M(5), KC_LBRC, KC_RBRC, \ - _______, _______, _______, _______, _______, KC_BSPC, KC_DEL, _______, _______, _______, _______, _______ \ -), + [_IKASHFT] = LAYOUT( \ + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, \ + KC_PSCR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TD(MND), KC_PGUP, KC_VOLU, TD(VOM), KC_MDSH, \ + KC_UNDS, KC_PLUS, KC_TILD, KC_HOME, KC_END, M(1), M(0), M(5), KC_LBRC, KC_RBRC, \ + _______, _______, _______, _______, _______, KC_BSPC, KC_DEL, _______, _______, _______, _______, _______ \ + ), -/* - ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ - │ F1 │ F2 │ F3 │ F4 │ F5 │ │ F6 │ F7 │ F8 │ F9 │ F10│ - ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── - │ F21│ F22│ F23│ F24│PAUS│ │ │SCLK│BOOT│ │NKRO│ - ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── - │ │ │ │ │ ├────┐ ┌───── │ │ │ │CAPS│ - ├────┌────┌────┌────┌───── │ │ ├────┌────┌────┌────┌───── - │ │ │ │ │ │ │ │ │ │ │ │ │ │ - └────┮────┮────┮────┮────┮────┘ └────┮────┮────┮────┮────┮────┘ -*/ + /* + ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ + │ F1 │ F2 │ F3 │ F4 │ F5 │ │ F6 │ F7 │ F8 │ F9 │ F10│ + ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── + │ F21│ F22│ F23│ F24│PAUS│ │ │SCLK│BOOT│ │NKRO│ + ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── + │ │ │ │ │ ├────┐ ┌───── │ │ │ │CAPS│ + ├────┌────┌────┌────┌───── │ │ ├────┌────┌────┌────┌───── + │ │ │ │ │ │ │ │ │ │ │ │ │ │ + └────┮────┮────┮────┮────┮────┘ └────┮────┮────┮────┮────┮────┘ + */ -[_FNCTION] = KEYMAP( \ - TD(F11), TD(F12), TD(F13), TD(F14), TD(F15), TD(F16), TD(F17), TD(F18), TD(F19), TD(F20), \ - KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, KC_SLCK, XXXXXXX, XXXXXXX, TGNKRO, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_CAPS, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -), + [_FNCTION] = LAYOUT( \ + TD(F11), TD(F12), TD(F13), TD(F14), TD(F15), TD(F16), TD(F17), TD(F18), TD(F19), TD(F20), \ + KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, KC_SLCK, XXXXXXX, XXXXXXX, TGNKRO, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_CAPS, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), -[_GAMEQWERTY] = KEYMAP( \ - KC_P, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, \ - KC_SCLN, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, \ - KC_SLSH, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, TD(COD), \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -), + [_GAMEQWERTY] = LAYOUT( \ + KC_P, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, \ + KC_SCLN, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, \ + KC_SLSH, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, TD(COD), \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), -/* - ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ - │^HOM│^PGD│^UP │^PGU│^PGU│ │ │MW_L│ MU │MW_R│ AC2│ - ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── - │^END│^LFT│^DWN│^RGT│^PGD│ │ │ ML │ MD │ MR │ AC1│ - ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── - │ M5 │ M2 │ M4 │ M3 │ M1 ├────┐ ┌───── │MW_D│MW_U│ │ AC0│ - ├────┌────┌────┌────┌───── │ │ ├────┌────┌────┌────┌───── - │ │ │ │ │ │ │ │ │ │ │ │ │ │ - └────┮────┮────┮────┮────┮────┘ └────┮────┮────┮────┮────┮────┘ -*/ + /* + ┌────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┐ + │^HOM│^PGD│^UP │^PGU│^PGU│ │ │MW_L│ MU │MW_R│ AC2│ + ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── + │^END│^LFT│^DWN│^RGT│^PGD│ │ │ ML │ MD │ MR │ AC1│ + ├────┌────┌────┌────┌───── ├────┌────┌────┌────┌───── + │ M5 │ M2 │ M4 │ M3 │ M1 ├────┐ ┌───── │MW_D│MW_U│ │ AC0│ + ├────┌────┌────┌────┌───── │ │ ├────┌────┌────┌────┌───── + │ │ │ │ │ │ │ │ │ │ │ │ │ │ + └────┮────┮────┮────┮────┮────┘ └────┮────┮────┮────┮────┮────┘ + */ -[_MLAYER] = KEYMAP( \ - LALT(KC_ESC), KC_9, KC_8, KC_7, KC_6, M(1), M(0), KC_MS_U, M(0), M(2), \ - KC_0, KC_2, KC_3, KC_4, KC_5, M(5), KC_MS_L, KC_MS_D, KC_MS_R, KC_ACL2, \ - KC_1, KC_0, XXXXXXX, XXXXXXX, KC_BTN5, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, M(5), \ - _______, _______, _______, _______, KC_BTN1, KC_BTN2, KC_BTN2, KC_BTN1, KC_BTN2, _______, KC_ACL0, _______ \ -), + [_MLAYER] = LAYOUT( \ + LALT(KC_ESC), KC_9, KC_8, KC_7, KC_6, M(1), M(0), KC_MS_U, M(0), M(2), \ + KC_0, KC_2, KC_3, KC_4, KC_5, M(5), KC_MS_L, KC_MS_D, KC_MS_R, KC_ACL2, \ + KC_1, KC_0, XXXXXXX, XXXXXXX, KC_BTN5, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, M(5), \ + _______, _______, _______, _______, KC_BTN1, KC_BTN2, KC_BTN2, KC_BTN1, KC_BTN2, _______, KC_ACL0, _______ \ + ), -//one_ring=2__rule__them-all -[_GRVTABL] = KEYMAP( \ - LALT(KC_PSCR), M(4), KC_PWR, KC_POWER, RESET, RESET, KC_R, KC_E, KC_I, LALT(KC_PSCR), \ - TG(_NINEKEY), TG(_FNCTION), TG(_MLAYER), TG(_IKASHFT), TG(_IKAPILA), TG(_IKAPILA), KC_S, KC_U, KC_B, TG(_NINEKEY), \ - M(3), TG(_GAMEQWERTY), XXXXXXX, XXXXXXX, XXXXXXX, KC_MYCM, KC_CALC, XXXXXXX, TG(_GAMEQWERTY), M(3), \ - TT(_GRVTABL), TG(_FNCTION), TG(_MLAYER), TG(_IKASHFT), TG(_IKAPILA), _______, _______, TG(_IKAPILA), TG(_IKASHFT), TG(_MLAYER), TG(_MLAYER), TG(_NINEKEY) \ -)}; + //one_ring=2__rule__them-all + [_GRVTABL] = LAYOUT( \ + LALT(KC_PSCR), M(4), KC_PWR, KC_POWER, RESET, RESET, KC_R, KC_E, KC_I, LALT(KC_PSCR), \ + TG(_NINEKEY), TG(_FNCTION), TG(_MLAYER), TG(_IKASHFT), TG(_IKAPILA), TG(_IKAPILA), KC_S, KC_U, KC_B, TG(_NINEKEY), \ + M(3), TG(_GAMEQWERTY), XXXXXXX, XXXXXXX, XXXXXXX, KC_MYCM, KC_CALC, XXXXXXX, TG(_GAMEQWERTY), M(3), \ + TT(_GRVTABL), TG(_FNCTION), TG(_MLAYER), TG(_IKASHFT), TG(_IKAPILA), _______, _______, TG(_IKAPILA), TG(_IKASHFT), TG(_MLAYER), TG(_MLAYER), TG(_NINEKEY) \ + ), +}; qk_tap_dance_action_t tap_dance_actions[] = { - [VOM] = ACTION_TAP_DANCE_DOUBLE(KC_VOLD, KC_MUTE), - [PRN] = ACTION_TAP_DANCE_DOUBLE(KC_LPRN, KC_RPRN), - [EGT] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR, KC_RCBR), - [HRD] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_RBRC), - [DSH] = ACTION_TAP_DANCE_DOUBLE(KC_NDSH, KC_MDSH), - [ESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, LALT(KC_F4)), - [EQE] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_ENT), - [UND] = ACTION_TAP_DANCE_DOUBLE(KC_Z, LCTL(KC_Z)), - [PGN] = ACTION_TAP_DANCE_DOUBLE(KC_PGDN, KC_PGUP), - [HND] = ACTION_TAP_DANCE_DOUBLE(KC_HOME, KC_END), - [COD] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT), - [MND] = ACTION_TAP_DANCE_DOUBLE(KC_MNXT, KC_MPRV), - [F11] = ACTION_TAP_DANCE_DOUBLE(KC_F1, KC_F11), - [F12] = ACTION_TAP_DANCE_DOUBLE(KC_F2, KC_F12), - [F13] = ACTION_TAP_DANCE_DOUBLE(KC_F3, KC_F13), - [F14] = ACTION_TAP_DANCE_DOUBLE(KC_F4, KC_F14), - [F15] = ACTION_TAP_DANCE_DOUBLE(KC_F5, KC_F15), - [F16] = ACTION_TAP_DANCE_DOUBLE(KC_F6, KC_F16), - [F17] = ACTION_TAP_DANCE_DOUBLE(KC_F7, KC_F17), - [F18] = ACTION_TAP_DANCE_DOUBLE(KC_F8, KC_F18), - [F19] = ACTION_TAP_DANCE_DOUBLE(KC_F9, KC_F19), - [F20] = ACTION_TAP_DANCE_DOUBLE(KC_F10, KC_F20), + [VOM] = ACTION_TAP_DANCE_DOUBLE(KC_VOLD, KC_MUTE), + [PRN] = ACTION_TAP_DANCE_DOUBLE(KC_LPRN, KC_RPRN), + [EGT] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR, KC_RCBR), + [HRD] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_RBRC), + [DSH] = ACTION_TAP_DANCE_DOUBLE(KC_NDSH, KC_MDSH), + [ESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, LALT(KC_F4)), + [EQE] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_ENT), + [UND] = ACTION_TAP_DANCE_DOUBLE(KC_Z, LCTL(KC_Z)), + [PGN] = ACTION_TAP_DANCE_DOUBLE(KC_PGDN, KC_PGUP), + [HND] = ACTION_TAP_DANCE_DOUBLE(KC_HOME, KC_END), + [COD] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT), + [MND] = ACTION_TAP_DANCE_DOUBLE(KC_MNXT, KC_MPRV), + [F11] = ACTION_TAP_DANCE_DOUBLE(KC_F1, KC_F11), + [F12] = ACTION_TAP_DANCE_DOUBLE(KC_F2, KC_F12), + [F13] = ACTION_TAP_DANCE_DOUBLE(KC_F3, KC_F13), + [F14] = ACTION_TAP_DANCE_DOUBLE(KC_F4, KC_F14), + [F15] = ACTION_TAP_DANCE_DOUBLE(KC_F5, KC_F15), + [F16] = ACTION_TAP_DANCE_DOUBLE(KC_F6, KC_F16), + [F17] = ACTION_TAP_DANCE_DOUBLE(KC_F7, KC_F17), + [F18] = ACTION_TAP_DANCE_DOUBLE(KC_F8, KC_F18), + [F19] = ACTION_TAP_DANCE_DOUBLE(KC_F9, KC_F19), + [F20] = ACTION_TAP_DANCE_DOUBLE(KC_F10, KC_F20), }; void matrix_init_user(){ @@ -281,33 +282,33 @@ void matrix_init_user(){ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { if (record->event.pressed) { switch(id) { - case 0: - return MACRO( D(LSFT), T(9), U(LSFT), D(LSFT), T(0), U(LSFT), T(LEFT), END ); - case 1: - return MACRO( D(LSFT), T(LBRC), U(LSFT), D(LSFT), T(RBRC), U(LSFT), T(LEFT), END ); - case 2: - return MACRO( T(LBRC), T(RBRC), T(LEFT), END); - case 5: - return MACRO( D(LSFT), T(COMMA), U(LSFT), D(LSFT), T(DOT), U(LSFT), END ); - case 3: - clear_keyboard(); - return false; - break; - case 4: - return MACRO( D(LSFT), T(SCOLON), U(LSFT), D(LSFT), T(9), U(LSFT), D(LSFT), T(0), U(LSFT), D(LSFT), T(LBRACKET), U(LSFT), D(LSFT), T(9), U(LSFT), D(LSFT), T(SCOLON), U(LSFT), D(LSFT), T(0), U(LSFT), D(LSFT), T(BSLASH), U(LSFT), D(LSFT), T(SCOLON), U(LSFT), D(LSFT), T(7), U(LSFT), D(LSFT), T(RBRACKET), U(LSFT), T(SCOLON), D(LSFT), T(SCOLON), U(LSFT), END ); - case WINSH: - set_unicode_input_mode(UC_WIN); - return false; - break; - case WIN: - set_unicode_input_mode(UC_WINC); - return false; - break; - case OSX: - set_unicode_input_mode(UC_OSX); - return false; - break; - } + case 0: + return MACRO( D(LSFT), T(9), U(LSFT), D(LSFT), T(0), U(LSFT), T(LEFT), END ); + case 1: + return MACRO( D(LSFT), T(LBRC), U(LSFT), D(LSFT), T(RBRC), U(LSFT), T(LEFT), END ); + case 2: + return MACRO( T(LBRC), T(RBRC), T(LEFT), END); + case 5: + return MACRO( D(LSFT), T(COMMA), U(LSFT), D(LSFT), T(DOT), U(LSFT), END ); + case 3: + clear_keyboard(); + return false; + break; + case 4: + return MACRO( D(LSFT), T(SCOLON), U(LSFT), D(LSFT), T(9), U(LSFT), D(LSFT), T(0), U(LSFT), D(LSFT), T(LBRACKET), U(LSFT), D(LSFT), T(9), U(LSFT), D(LSFT), T(SCOLON), U(LSFT), D(LSFT), T(0), U(LSFT), D(LSFT), T(BSLASH), U(LSFT), D(LSFT), T(SCOLON), U(LSFT), D(LSFT), T(7), U(LSFT), D(LSFT), T(RBRACKET), U(LSFT), T(SCOLON), D(LSFT), T(SCOLON), U(LSFT), END ); + case WINSH: + set_unicode_input_mode(UC_WIN); + return false; + break; + case WIN: + set_unicode_input_mode(UC_WINC); + return false; + break; + case OSX: + set_unicode_input_mode(UC_OSX); + return false; + break; + } } - return MACRO_NONE; + return MACRO_NONE; }; diff --git a/keyboards/atreus/keymaps/xyverz/keymap.c b/keyboards/atreus/keymaps/xyverz/keymap.c index 347445ef6bc9..fb0c5077f84b 100644 --- a/keyboards/atreus/keymaps/xyverz/keymap.c +++ b/keyboards/atreus/keymaps/xyverz/keymap.c @@ -2,7 +2,7 @@ // Chris Gerber (@gerbercj), with the addition of persistent layers like the Planck and // Preonic keyboards by Jack Humbert. -#include "atreus.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #include "eeconfig.h" @@ -43,7 +43,7 @@ enum planck_keycodes { #define XXXXXXX KC_NO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Dvorak Layer + /* Dvorak Layer ,----------------------------------. ,----------------------------------. | ' | , | . | P | Y | | F | G | C | R | L | |------+------+------+------+------| |------+------+------+------+------| @@ -53,14 +53,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+------+------+------| ||Enter |------+------+------+------+------| | Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | / | \ | `----------------------------------' `----------------------------------' */ - [_DVORAK] = { - {KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, XXXXXXX, KC_F, KC_G, KC_C, KC_R, KC_L }, - {KC_A, KC_O, KC_E, KC_U, KC_I, XXXXXXX, KC_D, KC_H, KC_T, KC_N, KC_S }, - {SFTSCLN, KC_Q, KC_J, KC_K, KC_X, KC_LCTL, KC_B, KC_M, KC_W, KC_V, SFTZED }, - {ESCTRL, TABALT, KC_LGUI, LOWER, KC_BSPC, ALTENT, KC_SPC, RAISE, KC_MINS, KC_SLSH, KC_BSLS} - }, - -/* QWERTY Layer + [_DVORAK] = LAYOUT( + KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L , + KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S , + SFTSCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, SFTZED , + ESCTRL, TABALT, KC_LGUI, LOWER, KC_BSPC, KC_LCTL, ALTENT, KC_SPC, RAISE, KC_MINS, KC_SLSH, KC_BSLS + ), + + /* QWERTY Layer ,----------------------------------. ,----------------------------------. | Q | W | E | R | T | | Y | U | I | O | P | |------+------+------+------+------| |------+------+------+------+------| @@ -70,14 +70,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+------+------+------| ||Enter |------+------+------+------+------| | Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | ' | \ | `----------------------------------' `----------------------------------' */ - [_QWERTY] = { - {KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, KC_Y, KC_U, KC_I, KC_O, KC_P }, - {KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, KC_H, KC_J, KC_K, KC_L, KC_SCLN}, - {SFTZED, KC_X, KC_C, KC_V, KC_B, KC_LCTL, KC_N, KC_M, KC_COMM, KC_DOT, SFTSLSH}, - {ESCTRL, TABALT, KC_LGUI, LOWER, KC_BSPC, ALTENT, KC_SPC, RAISE, KC_MINS, KC_QUOT, KC_BSLS} - }, - -/* Colemak Layer + [_QWERTY] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P , + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + SFTZED, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SFTSLSH, + ESCTRL, TABALT, KC_LGUI, LOWER, KC_BSPC, KC_LCTL, ALTENT, KC_SPC, RAISE, KC_MINS, KC_QUOT, KC_BSLS + ), + + /* Colemak Layer ,----------------------------------. ,----------------------------------. | Q | W | F | P | G | | J | L | U | Y | L | |------+------+------+------+------| |------+------+------+------+------| @@ -87,14 +87,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+------+------+------| ||Enter |------+------+------+------+------| | Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | ' | \ | `----------------------------------' `----------------------------------'*/ - [_COLEMAK] = { - {KC_Q, KC_W, KC_F, KC_P, KC_G, XXXXXXX, KC_J, KC_L, KC_U, KC_Y, KC_SCLN}, - {KC_A, KC_R, KC_S, KC_T, KC_D, XXXXXXX, KC_H, KC_N, KC_E, KC_I, KC_O }, - {SFTZED, KC_X, KC_C, KC_V, KC_B, KC_LCTL, KC_K, KC_M, KC_COMM, KC_DOT, SFTSLSH}, - {ESCTRL, TABALT, KC_LGUI, LOWER, KC_BSPC, ALTENT, KC_SPC, RAISE, KC_MINS, KC_QUOT, KC_BSLS} - }, - -/* Dvorak Layer with Command key on left thumb instead of Control + [_COLEMAK] = LAYOUT( + KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, + KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O , + SFTZED, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, SFTSLSH, + ESCTRL, TABALT, KC_LGUI, LOWER, KC_BSPC, KC_LCTL, ALTENT, KC_SPC, RAISE, KC_MINS, KC_QUOT, KC_BSLS + ), + + /* Dvorak Layer with Command key on left thumb instead of Control ,----------------------------------. ,----------------------------------. | ' | , | . | P | Y | | F | G | C | R | L | |------+------+------+------+------| |------+------+------+------+------| @@ -104,14 +104,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+------+------+------| ||Enter |------+------+------+------+------| | Esc | Tab | GUI | LOWER| BkSp |------'`------| Spc | RAISE| - | / | \ | `----------------------------------' `----------------------------------' */ - [_DVORMAC] = { - {KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, XXXXXXX, KC_F, KC_G, KC_C, KC_R, KC_L }, - {KC_A, KC_O, KC_E, KC_U, KC_I, XXXXXXX, KC_D, KC_H, KC_T, KC_N, KC_S }, - {SFTSCLN, KC_Q, KC_J, KC_K, KC_X, KC_LGUI, KC_B, KC_M, KC_W, KC_V, SFTZED }, - {ESCTRL, TABALT, KC_LGUI, LOWER, KC_BSPC, ALTENT, KC_SPC, RAISE, KC_MINS, KC_SLSH, KC_BSLS} - }, - -/* LOWER Layer + [_DVORMAC] = LAYOUT( + KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L , + KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S , + SFTSCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, SFTZED , + ESCTRL, TABALT, KC_LGUI, LOWER, KC_BSPC, KC_LGUI, ALTENT, KC_SPC, RAISE, KC_MINS, KC_SLSH, KC_BSLS + ), + + /* LOWER Layer ,----------------------------------. ,----------------------------------. | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |------+------+------+------+------| |------+------+------+------+------| @@ -121,14 +121,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+------+------+------| || |------+------+------+------+------| | ~ | | | | Del |------'`------| Ins | | | | | `----------------------------------' `----------------------------------'*/ - [_LOWER] = { - {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, XXXXXXX, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN}, - {KC_CAPS, _______, KC_UP, _______, KC_HOME, XXXXXXX, KC_PGUP, _______, KC_PLUS, KC_LCBR, KC_RCBR}, - {_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, _______}, - {KC_TILD, _______, _______, _______, KC_DEL, _______, KC_INS, _______, _______, _______, _______} - }, - -/* RAISE Layer + [_LOWER] = LAYOUT( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + KC_CAPS, _______, KC_UP, _______, KC_HOME, KC_PGUP, _______, KC_PLUS, KC_LCBR, KC_RCBR, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, _______, + KC_TILD, _______, _______, _______, KC_DEL, _______, _______, KC_INS, _______, _______, _______, _______ + ), + + /* RAISE Layer ,----------------------------------. ,----------------------------------. | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |------+------+------+------+------| |------+------+------+------+------| @@ -138,14 +138,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+------+------+------| || |------+------+------+------+------| | ` | | | | Del |------'`------| Ins | | | | | `----------------------------------' `----------------------------------'*/ - [_RAISE] = { - {KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, KC_6, KC_7, KC_8, KC_9, KC_0 }, - {KC_CAPS, _______, KC_UP, _______, KC_HOME, XXXXXXX, KC_PGUP, _______, KC_EQL, KC_LBRC, KC_RBRC}, - {_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______, KC_PGDN, KC_MPRV, KC_MPLY, KC_MNXT, _______}, - {KC_GRV, _______, _______, _______, KC_DEL, _______, KC_INS, _______, _______, _______, _______} - }, - -/* ADJUST Layer + [_RAISE] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 , + KC_CAPS, _______, KC_UP, _______, KC_HOME, KC_PGUP, _______, KC_EQL, KC_LBRC, KC_RBRC, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_PGDN, KC_MPRV, KC_MPLY, KC_MNXT, _______, + KC_GRV, _______, _______, _______, KC_DEL, _______, _______, KC_INS, _______, _______, _______, _______ + ), + + /* ADJUST Layer ,----------------------------------. ,----------------------------------. | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | |------+------+------+------+------| |------+------+------+------+------| @@ -155,13 +155,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |------+------+------+------+------| || |------+------+------+------+------| | | | | | |------'`------| | | | | RESET| `----------------------------------' `----------------------------------'*/ - [_ADJUST] = { - {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 }, - {KC_F11, _______, _______, _______, _______, XXXXXXX, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_F12 }, - {_______, QWERTY, COLEMAK, DVORAK, DVORMAC, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET } - } - + [_ADJUST] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 , + KC_F11, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_F12 , + _______, QWERTY, COLEMAK, DVORAK, DVORMAC, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET + ), }; const uint16_t PROGMEM fn_actions[] = { @@ -175,50 +174,50 @@ void persistent_default_layer_set(uint16_t default_layer) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - case DVORMAC: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_DVORMAC); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_DVORAK); } - return true; + return false; + break; + case DVORMAC: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_DVORMAC); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + } + return true; }; diff --git a/keyboards/atreus62/atreus62.h b/keyboards/atreus62/atreus62.h index d0bf68adcc28..4bf7dabc7dcb 100644 --- a/keyboards/atreus62/atreus62.h +++ b/keyboards/atreus62/atreus62.h @@ -8,7 +8,7 @@ void promicro_bootloader_jmp(bool program); // This a shortcut to help you visually see your layout. // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array -#define KEYMAP( \ +#define LAYOUT( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ @@ -24,7 +24,7 @@ void promicro_bootloader_jmp(bool program); } // Used to create a keymap using only KC_ prefixed keys. -#define KC_KEYMAP( \ +#define LAYOUT_kc( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ diff --git a/keyboards/atreus62/info.json b/keyboards/atreus62/info.json new file mode 100644 index 000000000000..5a7ed3754ba8 --- /dev/null +++ b/keyboards/atreus62/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Atreus62", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5.7, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0.6}, {"x":1, "y":0.6}, {"x":2, "y":0.35}, {"x":3, "y":0}, {"x":4, "y":0.35}, {"x":5, "y":0.7}, {"x":9, "y":0.7}, {"x":10, "y":0.35}, {"x":11, "y":0}, {"x":12, "y":0.35}, {"x":13, "y":0.6}, {"x":14, "y":0.6}, {"x":0, "y":1.6}, {"x":1, "y":1.6}, {"x":2, "y":1.35}, {"x":3, "y":1}, {"x":4, "y":1.35}, {"x":5, "y":1.7}, {"x":9, "y":1.7}, {"x":10, "y":1.35}, {"x":11, "y":1}, {"x":12, "y":1.35}, {"x":13, "y":1.6}, {"x":14, "y":1.6}, {"x":0, "y":2.6}, {"x":1, "y":2.6}, {"x":2, "y":2.35}, {"x":3, "y":2}, {"x":4, "y":2.35}, {"x":5, "y":2.7}, {"x":9, "y":2.7}, {"x":10, "y":2.35}, {"x":11, "y":2}, {"x":12, "y":2.35}, {"x":13, "y":2.6}, {"x":14, "y":2.6}, {"x":0, "y":3.6}, {"x":1, "y":3.6}, {"x":2, "y":3.35}, {"x":3, "y":3}, {"x":4, "y":3.35}, {"x":5, "y":3.7}, {"x":9, "y":3.7}, {"x":10, "y":3.35}, {"x":11, "y":3}, {"x":12, "y":3.35}, {"x":13, "y":3.6}, {"x":14, "y":3.6}, {"x":0, "y":4.6}, {"x":1, "y":4.6}, {"x":2, "y":4.35}, {"x":3, "y":4}, {"x":4, "y":4.35}, {"x":5, "y":4.7}, {"x":6, "y":3.95, "h":1.5}, {"x":8, "y":3.95, "h":1.5}, {"x":9, "y":4.7}, {"x":10, "y":4.35}, {"x":11, "y":4}, {"x":12, "y":4.35}, {"x":13, "y":4.6}, {"x":14, "y":4.6}] + } + } +} diff --git a/keyboards/atreus62/keymaps/atreus52/keymap.c b/keyboards/atreus62/keymaps/atreus52/keymap.c index 4adfb9e3c80a..72bb886534da 100644 --- a/keyboards/atreus62/keymaps/atreus52/keymap.c +++ b/keyboards/atreus62/keymaps/atreus52/keymap.c @@ -1,4 +1,4 @@ -#include "atreus62.h" +#include QMK_KEYBOARD_H // Layers #define DVORAK 0 @@ -9,91 +9,97 @@ #define RESETL 5 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[DVORAK] = KC_KEYMAP( + [DVORAK] = LAYOUT_kc( NO, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, NO, \ NO, QUOT, COMM, DOT, P, Y, F, G, C, R, L, NO, \ NO, A, O, E, U, I, D, H, T, N, S, NO, \ NO, SCLN, Q, J, K, X, B, M, W, V, Z, NO, \ - NO, FN2, LALT, LCTL, FN1, LSFT, BSPC, ENT, SPC, FN0, LGUI, LEFT, RGHT, NO ), + NO, FN2, LALT, LCTL, FN1, LSFT, BSPC, ENT, SPC, FN0, LGUI, LEFT, RGHT, NO + ), -[QWERTY] = KC_KEYMAP( + [QWERTY] = LAYOUT_kc( NO, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, NO, \ NO, Q, W, E, R, T, Y, U, I, O, P, NO, \ NO, A, S, D, F, G, H, J, K, L, SCLN, NO, \ NO, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, \ - NO, FN2, LALT, LCTL, FN1, LSFT, BSPC, ENT, SPC, FN0, LGUI, LEFT, RGHT, NO ), + NO, FN2, LALT, LCTL, FN1, LSFT, BSPC, ENT, SPC, FN0, LGUI, LEFT, RGHT, NO + ), -[RAISE] = KC_KEYMAP( + [RAISE] = LAYOUT_kc( NO, MRWD, MPRV, MPLY, MNXT, MFFD, TRNS, MUTE, VOLD, VOLU, DEL, NO, \ NO, TILD, GRV, LCBR, RCBR, DQUO, QUOT, EQL, PLUS, MINS, QUES, NO, \ NO, ESC, TAB, LPRN, RPRN, BSLS, SLSH, LEFT, DOWN, UP, RGHT, NO, \ NO, TRNS, TRNS, LBRC, RBRC, TRNS, INS, PIPE, UNDS, TRNS, TRNS, NO, \ - NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN3, NO ), + NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN3, NO + ), -[LOWER] = KC_KEYMAP( + [LOWER] = LAYOUT_kc( NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, NO, \ NO, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, NO, \ NO, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, NO, \ NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, DOT, TRNS, TRNS, TRNS, NO, \ - NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, NO ), + NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, NO + ), -[BDO] = KC_KEYMAP( + [BDO] = LAYOUT_kc( NO, ESC, 1, 2, 3, 4, 5, 0, SLSH, U, C, NO, \ NO, TAB, Q, W, E, R, 6, Y, I, O, P, NO, \ NO, LSFT, A, S, D, F, 7, G, H, J, K, NO, \ NO, T, Z, X, C, V, 8, B, N, M, L, NO, \ - NO, LCTL, SPC, SPC, SPC, SPC, COMM, ENT, 9, NO, NO, NO, FN2, NO ), + NO, LCTL, SPC, SPC, SPC, SPC, COMM, ENT, 9, NO, NO, NO, FN2, NO + ), -[RESETL] = KEYMAP( + [RESETL] = LAYOUT( KC_NO, RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_FN3,KC_NO ) - + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_FN3,KC_NO + ) }; const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(RAISE), // Raise layer - [1] = ACTION_LAYER_MOMENTARY(LOWER), // Lower layer - [2] = ACTION_LAYER_TOGGLE(BDO), // BDO layer - [3] = ACTION_LAYER_TOGGLE(RESETL) // RESET layer + [0] = ACTION_LAYER_MOMENTARY(RAISE), // Raise layer + [1] = ACTION_LAYER_MOMENTARY(LOWER), // Lower layer + [2] = ACTION_LAYER_TOGGLE(BDO), // BDO layer + [3] = ACTION_LAYER_TOGGLE(RESETL) // RESET layer }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch (id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } - else { - unregister_code(KC_RSFT); - } - break; +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + // MACRODOWN only works in this function + switch (id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } + else { + unregister_code(KC_RSFT); } - return MACRO_NONE; + break; + } + return MACRO_NONE; }; static uint8_t qw_dv_swap_state = 0; bool process_record_user (uint16_t keycode, keyrecord_t *record) { - if (keycode == KC_LGUI) { - if (record->event.pressed) - qw_dv_swap_state |= 0b00000001; - else - qw_dv_swap_state &= ~(0b00000001); + if (keycode == KC_LGUI) { + if (record->event.pressed) { + qw_dv_swap_state |= 0b00000001; + } else { + qw_dv_swap_state &= ~(0b00000001); } - if (keycode == KC_LCTL) { - if (record->event.pressed) - qw_dv_swap_state |= 0b00000010; - else - qw_dv_swap_state &= ~(0b00000010); + } + if (keycode == KC_LCTL) { + if (record->event.pressed) { + qw_dv_swap_state |= 0b00000010; + } else { + qw_dv_swap_state &= ~(0b00000010); } + } - if (qw_dv_swap_state == 0b00000011) { - layer_invert(DVORAK); - } - return true; + if (qw_dv_swap_state == 0b00000011) { + layer_invert(DVORAK); + } + return true; } diff --git a/keyboards/atreus62/keymaps/default/keymap.c b/keyboards/atreus62/keymaps/default/keymap.c index 52802c77b7dc..89ff7012ea06 100644 --- a/keyboards/atreus62/keymaps/default/keymap.c +++ b/keyboards/atreus62/keymaps/default/keymap.c @@ -1,7 +1,7 @@ // this is the style you want to emulate. // This is the canonical layout file for the Quantum project. If you want to add another keyboard, -#include "atreus62.h" +#include QMK_KEYBOARD_H // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -12,40 +12,39 @@ #define _RESET 2 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_DEFAULT] = { /* qwerty */ - { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS }, - { KC_BSLS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC }, - { KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT }, - { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DELT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LBRC }, - { KC_LCTL, KC_LGUI, KC_LALT, KC_GRV, MO(_NAV),KC_BSPC, KC_ENT, KC_SPC, KC_EQL, KC_MINS, KC_QUOT, KC_ENT, KC_RGUI } -}, + [_DEFAULT] = LAYOUT( /* qwerty */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS , + KC_BSLS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC , + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT , + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LBRC , + KC_LCTL, KC_LGUI, KC_LALT, KC_GRV, MO(_NAV),KC_BSPC, KC_DELT, KC_ENT, KC_SPC, KC_EQL, KC_MINS, KC_QUOT, KC_ENT, KC_RGUI + ), -[_NAV] = { - { TO(_DEFAULT), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F12, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS }, - { TO(_RESET), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS } -}, + [_NAV] = LAYOUT( + TO(_DEFAULT), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F12, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS , + TO(_RESET), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), -[_RESET] = { - { TO(_DEFAULT), KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO }, - { KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO }, - { KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO }, - { KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO }, - { KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , RESET } -} + [_RESET] = LAYOUT( + TO(_DEFAULT), KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , + KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , + KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , + KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , + KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , RESET + ) - -/* -[_TRNS] = { - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS } -}, -*/ + /* + [_TRNS] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + */ }; @@ -54,18 +53,17 @@ const uint16_t PROGMEM fn_actions[] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch (id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } - else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + // MACRODOWN only works in this function + switch (id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } + else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; }; diff --git a/keyboards/atreus62/keymaps/mfluid/keymap.c b/keyboards/atreus62/keymaps/mfluid/keymap.c index 26d1c5a608d8..f19c02d8e6de 100644 --- a/keyboards/atreus62/keymaps/mfluid/keymap.c +++ b/keyboards/atreus62/keymaps/mfluid/keymap.c @@ -1,41 +1,41 @@ -#include "atreus62.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #define OOOOOOO KC_TRNS const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = { - { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS }, - { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS }, - { KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT }, - { KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC }, - { KC_LCTL, KC_LGUI, KC_LALT, MO(3), MO(1), KC_BSPC, KC_ENT, KC_SPC, MO(2), KC_DEL, KC_EQL, KC_LBRC, KC_RBRC } -}, - -[1] = { - { _______, _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PSLS, _______ }, - { _______, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______ }, - { _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, KC_PGUP }, - { _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT, KC_PPLS, KC_PGDN }, - { _______, _______, _______, _______, OOOOOOO, _______, _______, _______, _______, _______, _______, _______, _______ } -}, - -[2] = { - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______ }, - { _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______ }, - { _______, _______, KC_MPLY, KC_MRWD, KC_MFFD, _______, _______, _______, KC_BTN1, KC_BTN2, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, OOOOOOO, _______, _______, _______, _______ } -}, - -[3] = { - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, KC_COPY, KC_PGUP, _______, _______, KC_PASTE, KC_DEL }, - { _______, _______, _______, KC_PGDN, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______ }, - { _______, _______, KC_CUT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, OOOOOOO, _______, _______, _______, _______, _______, _______, _______, _______, _______ } -} + [0] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_LCTL, KC_LGUI, KC_LALT, MO(3), MO(1), KC_BSPC, KC_RCTL, KC_ENT, KC_SPC, MO(2), KC_DEL, KC_EQL, KC_LBRC, KC_RBRC + ), + + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, + _______, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, + _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, KC_PGUP, + _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, KC_P0, KC_PDOT, KC_PENT, KC_PPLS, KC_PGDN, + _______, _______, _______, _______, OOOOOOO, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, + _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, + _______, _______, KC_MPLY, KC_MRWD, KC_MFFD, _______, _______, KC_BTN1, KC_BTN2, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, OOOOOOO, _______, _______, _______, _______ + ), + + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_COPY, KC_PGUP, _______, _______, KC_PASTE, KC_DEL, + _______, _______, _______, KC_PGDN, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, + _______, _______, KC_CUT, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, OOOOOOO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) }; @@ -44,19 +44,18 @@ const uint16_t PROGMEM fn_actions[] = { }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch (id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } - else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + // MACRODOWN only works in this function + switch (id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } + else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; }; diff --git a/keyboards/atreus62/keymaps/mneme/keymap.c b/keyboards/atreus62/keymaps/mneme/keymap.c index 2627e024f94e..299b0c96b1e1 100644 --- a/keyboards/atreus62/keymaps/mneme/keymap.c +++ b/keyboards/atreus62/keymaps/mneme/keymap.c @@ -1,5 +1,5 @@ #include -#include "atreus62.h" +#include QMK_KEYBOARD_H #include "led.h" #include "action_layer.h" #include "action_util.h" @@ -95,33 +95,29 @@ uint16_t kf_timers[12]; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [BASE] = { - - { M(KF_11) ,M(KF_1) ,M(KF_2) ,M(KF_3) ,M(KF_4) ,M(KF_5) ,KC_NO ,M(KF_6) ,M(KF_7) ,M(KF_8) ,M(KF_9) ,M(KF_10) ,M(KF_12) }, - { KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_NO ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KN_AO }, - { OSM_LCTL ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_NO ,KC_H ,KC_J ,KC_K ,KC_L ,KN_OE ,KN_AE }, - { OSM_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_DELT ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KN_MINS ,OSM_LSFT }, - { MO(NAV) ,OSM_LCTL ,OSM_LALT ,KC_LGUI ,MO(SYM) ,KC_BSPC ,KC_ENT ,KC_SPC ,MO(SYM) ,KC_LEAD ,KC_LALT ,KC_LCTRL ,KC_HYP } - - }, - [NAV] = { - - { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS }, - { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_NO ,KC_HOME ,KC_PGDN ,KC_PGUP ,KC_END ,KC_TRNS ,KC_TRNS }, - { KC_TRNS ,KC_LSFT ,KC_LCTL ,KC_LALT ,KC_L ,KC_TRNS ,KC_NO ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RIGHT ,KC_TRNS ,KC_TRNS }, - { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS }, - { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_VOLD ,KC_VOLU } - - }, - [SYM] = { - - { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,TD(TD_EQ) ,KC_NO ,TD(TD_FUN) ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS }, - { KC_TRNS ,KN_LABK ,KN_RABK ,KN_LCBR ,KN_RCBR ,KN_PLUS ,KC_NO ,KN_AT ,KN_DQT ,KN_QUOT ,KN_GRAV ,KN_SLSH ,KC_TRNS }, - { KC_TRNS ,KN_EXLM ,KN_EQL ,KN_LPRN ,KN_RPRN ,KN_MINS ,KC_NO ,KN_UNDS ,KN_CIRC ,KN_DLR ,KN_AMPR ,KN_PIPE ,KC_TRNS }, - { KC_TRNS ,KN_EUR ,KN_PERC ,KN_LBRC ,KN_RBRC ,KN_ASTR ,KC_TRNS ,KN_HASH ,KN_SCLN ,KN_COLN ,KN_QUES ,KN_BSLS ,KC_TRNS }, - { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS } - - } + [BASE] = LAYOUT( + M(KF_11), M(KF_1), M(KF_2), M(KF_3), M(KF_4), M(KF_5), M(KF_6), M(KF_7), M(KF_8), M(KF_9), M(KF_10), M(KF_12), + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KN_AO, + OSM_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KN_OE, KN_AE, + OSM_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KN_MINS, OSM_LSFT, + MO(NAV), OSM_LCTL, OSM_LALT, KC_LGUI, MO(SYM), KC_BSPC, KC_DELT, KC_ENT, KC_SPC, MO(SYM), KC_LEAD, KC_LALT, KC_LCTRL, KC_HYP + ), + + [NAV] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LSFT, KC_LCTL, KC_LALT, KC_L, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU + ), + + [SYM] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TD(TD_EQ), TD(TD_FUN), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KN_LABK, KN_RABK, KN_LCBR, KN_RCBR, KN_PLUS, KN_AT, KN_DQT, KN_QUOT, KN_GRAV, KN_SLSH, KC_TRNS, + KC_TRNS, KN_EXLM, KN_EQL, KN_LPRN, KN_RPRN, KN_MINS, KN_UNDS, KN_CIRC, KN_DLR, KN_AMPR, KN_PIPE, KC_TRNS, + KC_TRNS, KN_EUR, KN_PERC, KN_LBRC, KN_RBRC, KN_ASTR, KN_HASH, KN_SCLN, KN_COLN, KN_QUES, KN_BSLS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) }; #define TAP_ONCE(code) \ @@ -244,8 +240,8 @@ void dance_fun (qk_tap_dance_state_t *state, void *user_data) { } qk_tap_dance_action_t tap_dance_actions[] = { - [TD_FUN] = ACTION_TAP_DANCE_FN (dance_fun) - ,[TD_EQ] = ACTION_TAP_DANCE_FN (dance_eq) + [TD_FUN] = ACTION_TAP_DANCE_FN (dance_fun), + [TD_EQ] = ACTION_TAP_DANCE_FN (dance_eq) }; // Runs just one time when the keyboard initializes. diff --git a/keyboards/atreus62/keymaps/pcewing/keymap.c b/keyboards/atreus62/keymaps/pcewing/keymap.c index 7ad033eee4b8..49d3c9084285 100644 --- a/keyboards/atreus62/keymaps/pcewing/keymap.c +++ b/keyboards/atreus62/keymaps/pcewing/keymap.c @@ -1,4 +1,4 @@ -#include "atreus62.h" +#include QMK_KEYBOARD_H #define _______ KC_TRNS #define FN MO(_FN) @@ -12,68 +12,68 @@ enum atreus62_layers { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Default layer - * ,-----------------------------------------. ,-----------------------------------------. - * | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Esc | A | S | D | F | G |,------.,------.| H | J | K | L | ; | " | - * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| - * |Shift | Z | X | C | V | B ||Delete||Enter || N | M | , | . | / |Shift | - * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| - * | Ctrl | Win | Alt | ` | Fn | Bksp |`------'`------'|Space | Fn | | Alt | Win | Ctrl | - * `-----------------------------------------' `-----------------------------------------' - */ -[_DEFAULT] = { /* qwerty */ - { KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS }, - { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS }, - { KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT }, - { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DEL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT }, - { KC_LCTL, KC_LGUI, KC_LALT, KC_GRV, FN, KC_BSPC, KC_ENT, KC_SPC, FN, TODO, KC_RALT, KC_RGUI, KC_RCTL } -}, + /* Default layer + * ,-----------------------------------------. ,-----------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | A | S | D | F | G |,------.,------.| H | J | K | L | ; | " | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * |Shift | Z | X | C | V | B ||Delete||Enter || N | M | , | . | / |Shift | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * | Ctrl | Win | Alt | ` | Fn | Bksp |`------'`------'|Space | Fn | | Alt | Win | Ctrl | + * `-----------------------------------------' `-----------------------------------------' + */ + [_DEFAULT] = LAYOUT( /* qwerty */ + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_GRV, FN, KC_BSPC, KC_DEL, KC_ENT, KC_SPC, FN, TODO, KC_RALT, KC_RGUI, KC_RCTL + ), -/* Function layer - * ,-----------------------------------------. ,-----------------------------------------. - * | | | | | | | | | F10 | F11 | F12 | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | Home | Up | End | PgUp | | | PrSc | F7 | F8 | F9 | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Caps | Left | Down |Right | PgDn | |,------.,------.|Pause | F4 | F5 | F6 | | | - * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| - * | | { | } | [ | ] | || || ||Insert| F1 | F2 | F3 | | | - * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| - * | | | | | | |`------'`------'| | | | | | | - * `-----------------------------------------' `-----------------------------------------' - */ -[_FN] = { - { _______, _______, _______, _______, _______, _______, _______, _______, KC_F10, KC_F11, KC_F12, _______, TO(_RESET) }, - { _______, KC_HOME, KC_UP, KC_END, KC_PGDN, _______, _______, KC_PSCR, KC_F7, KC_F8, KC_F9, _______, _______ }, - { _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGUP, _______, _______, KC_PAUS, KC_F4, KC_F5, KC_F6, _______, _______ }, - { _______, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, _______, _______, KC_INS, KC_F1, KC_F2, KC_F3, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } -}, + /* Function layer + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | F10 | F11 | F12 | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Home | Up | End | PgUp | | | PrSc | F7 | F8 | F9 | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Caps | Left | Down |Right | PgDn | |,------.,------.|Pause | F4 | F5 | F6 | | | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * | | { | } | [ | ] | || || ||Insert| F1 | F2 | F3 | | | + * |------+------+------+------+------+------|| || ||------+------+------+------+------+------| + * | | | | | | |`------'`------'| | | | | | | + * `-----------------------------------------' `-----------------------------------------' + */ + [_FN] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, KC_F10, KC_F11, KC_F12, _______, TO(_RESET), + _______, KC_HOME, KC_UP, KC_END, KC_PGDN, _______, KC_PSCR, KC_F7, KC_F8, KC_F9, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGUP, _______, KC_PAUS, KC_F4, KC_F5, KC_F6, _______, _______, + _______, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, _______, KC_INS, KC_F1, KC_F2, KC_F3, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), -/* - * This layer makes it possible to reset the firmware; don't get rid of it and make sure there is a way to activate it. - */ -[_RESET] = { - { TO(_DEFAULT), KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO }, - { KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO }, - { KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO }, - { KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO }, - { KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , RESET } -} + /* + * This layer makes it possible to reset the firmware; don't get rid of it and make sure there is a way to activate it. + */ + [_RESET] = LAYOUT( + TO(_DEFAULT), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET + ) -/* -[_TRNS] = { - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }, - { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS } -}, -*/ + /* + [_TRNS] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + */ }; const uint16_t PROGMEM fn_actions[] = { diff --git a/keyboards/atreus62/keymaps/xyverz/keymap.c b/keyboards/atreus62/keymaps/xyverz/keymap.c index 67e66584a64f..378831737864 100644 --- a/keyboards/atreus62/keymaps/xyverz/keymap.c +++ b/keyboards/atreus62/keymaps/xyverz/keymap.c @@ -17,19 +17,28 @@ 0.2 - Converted to a more Planck/Preonic keymap style file with persistent layers enabled. Renamed layers to reflect OLKB maps. Added a TODO list. + 0.3 - Moved location of media & volume keys. Added Print Screen, + Scroll Lock and Pause keys. Added a WOW gaming layer that + changes the location of Ctrl & Alt to the thumb keys. Added + readme. + 0.4 - After more useage, I realized that the ESC key was in the way + of my muscle memory (gee, thanks, Planck!) so I moved it to + the normal Caps Lock position, and moved Caps Lock to the same + position on the RAISE and LOWER layers. Added code to turn off + the Pro Micro LEDs after flashing. + 0.5 - Converted keymap to LAYOUT standard. TODO: * Make the layout more efficient, even if it means changing the RAISE and LOWER functionality. * Add legends in comments for each layer. Maybe. - * Add a gaming layer. */ // this is the style you want to emulate. // This is the canonical layout file for the Quantum project. If you want to add another keyboard, -#include "atreus62.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #include "eeconfig.h" @@ -58,60 +67,63 @@ enum atreus52_keycodes { #define _______ KC_TRNS #define XXXXXXX KC_NO +// Aliases to make the keymap clearer. +#define CTL_ENT CTL_T(KC_ENT) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_DVORAK] = { /* dvorak */ - { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS }, - { KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, _______, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH }, - { KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, _______, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS }, - { KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LGUI, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT }, - { KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL } - }, - - [_QWERTY] = { /* qwerty */ - { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS }, - { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL }, - { KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT }, - { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LGUI, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT }, - { KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL } - }, - - [_COLEMAK] = { /* colemak */ - { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS }, - { KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL }, - { KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, _______, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT }, - { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LGUI, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT }, - { KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL} - }, - - [_WOW] = { /* Dvorak with minor modifications for playing World of Warcraft */ - { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS }, - { KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, _______, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH }, - { KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, _______, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS }, - { KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LALT, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT }, - { KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, CTL_T(KC_ENT), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } - }, - - [_LOWER] = { - { KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 }, - { KC_TILD, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PLUS, KC_LCBR, KC_RCBR, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______ }, - { _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ } - }, - [_RAISE] = { - { KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 }, - { KC_TILD, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSLS }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_EQL, KC_LBRC, KC_RBRC, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______ }, - { _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ } - }, - [_ADJUST] = { - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, WOW }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } - }, + [_DVORAK] = LAYOUT ( /* dvorak */ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL + ), + + [_QWERTY] = LAYOUT ( /* qwerty */ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL + ), + + [_COLEMAK] = LAYOUT ( /* colemak */ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL + ), + + [_WOW] = LAYOUT ( /* Dvorak with minor modifications for playing World of Warcraft */ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LALT, CTL_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT + ), + + [_LOWER] = LAYOUT ( + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, + KC_TILD, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_PLUS, KC_LCBR, KC_RCBR, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, + _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ + ), + [_RAISE] = LAYOUT ( + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, + KC_TILD, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSLS, + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, + _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ + ), + [_ADJUST] = LAYOUT ( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, WOW, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), }; diff --git a/keyboards/atreus62/keymaps/xyverz/readme.md b/keyboards/atreus62/keymaps/xyverz/readme.md new file mode 100644 index 000000000000..cf00b65e3a79 --- /dev/null +++ b/keyboards/atreus62/keymaps/xyverz/readme.md @@ -0,0 +1,131 @@ +# Xyverz's Atreus62 Keymap + +## About this keymap: + +This is the Atreus62 keyboard layout by Xyverz aka u/Zrevyx on r/mk. I've blatantly stolen what works for me from the Planck and Preonic layouts and modified this file to fit me. Initial credet goes to u/profet23 for the doing all the work and adding this keyboard to QMK in the first place. + +I've got Dvorak, Qwerty, and Colemak layouts at this time, with the possibility of adding more in the future. + +The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards have been my daily drivers for the last 17 years. I hope You can get some enjoyment out of this layout should you chose it! + +### CHANGELOG: + +#### 0.1 + * Initial commit. Based off of Profet's default keymap. +#### 0.2 + * Converted to a more Planck/Preonic keymap style file with persistent layers enabled. Renamed layers to reflect OLKB maps. + * Added a TODO list. +#### 0.3 + * Moved location of media & volume keys. Added Print Screen, Scroll Lock and Pause keys. + * Added a WOW gaming layer that changes the location of Ctrl & Alt to the thumb keys. Right thumb is Ctrl when held, Enter when tapped. + * Added readme. +#### 0.4 + * Moved location of Escape key to Caps Lock position. Moved Caps Lock to same position on Raise/Lower Layers. + * Put Tilde/Grave in the upper-left corner + * Added code to turn off the red LEDs on the Pro Micro after flashing. They were annoying me. + +### TODO: + + * Make the layout more efficient, even if it means changing the RAISE + and LOWER functionality. + * Add legends in comments for each layer. Maybe. + * Enjoy this revision; figure out new things later. + +### Layer 0: Dvorak layer + + ,-----------------------------------------. ,-----------------------------------------. + | Grv | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | \ | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Tab | ' | , | . | P | Y | | F | G | C | R | L | / | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Esc | A | O | E | U | I | | D | H | T | N | S | - | + |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| + | Shft | ; | Q | J | K | X | Gui ||Enter | B | M | W | V | Z | Shft | + |------+------+------+------+------+------| || |------+------+------+------+------+------| + | Ctrl | Alt | Left | Rght | LOWER| BkSp |------'`------| Spc | RAISE| Up | Down | Gui | Ctrl | + `-----------------------------------------' `-----------------------------------------' + +### Layer 1: QWERTY layer + + ,-----------------------------------------. ,-----------------------------------------. + | Grv | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Tab | Q | W | E | R | T | | Y | U | I | O | P | Del | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Esc | A | S | D | F | G | | D | H | T | N | S | ' | + |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| + | Shft | Z | X | C | V | B | Gui ||Enter | N | M | , | . | / | Shft | + |------+------+------+------+------+------| || |------+------+------+------+------+------| + | Ctrl | Alt | Left | Rght | LOWER| BkSp |------'`------| Spc | RAISE| Up | Down | Gui | Ctrl | + `-----------------------------------------' `-----------------------------------------' + +### Keymap 2: Colemak layer + + ,-----------------------------------------. ,-----------------------------------------. + | Grv | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Tab | Q | W | F | P | G | | J | U | U | Y | ; | Del | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Esc | A | R | S | T | D | | H | N | E | I | O | ' | + |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| + | Shft | Z | X | C | V | B | Gui ||Enter | K | M | , | . | / | Shft | + |------+------+------+------+------+------| || |------+------+------+------+------+------| + | Ctrl | Alt | Left | Rght | LOWER| BkSp |------'`------| Spc | RAISE| Up | Down | Gui | Ctrl | + `-----------------------------------------' `-----------------------------------------' + +### Keymap 3: WoW gaming layer + + ,-----------------------------------------. ,-----------------------------------------. + | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | \ | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Tab | ' | , | . | P | Y | | F | G | C | R | L | / | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Caps | A | O | E | U | I | | D | H | T | N | S | - | + |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| + | Shft | ; | Q | J | K | X | Alt ||Ctrl/ | B | M | W | V | Z | Shft | + |------+------+------+------+------+------| ||Enter |------+------+------+------+------+------| + | Ctrl | Alt | Left | Rght | LOWER| BkSp |------'`------| Spc | RAISE| Up | Down | Gui | Ctrl | + `-----------------------------------------' `-----------------------------------------' + +### Keymap 4: LOWER layer + + ,-----------------------------------------. ,-----------------------------------------. + | F11 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F12 | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | ~ | ` | | | | | | | | | | | | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Caps | | Mute | Vol- | Vol+ | | | | | + | { | } | | + |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| + | | | Prev | Play | Next | | || | | | PScr | ScLk | Pause| | + |------+------+------+------+------+------| || |------+------+------+------+------+------| + | | | Home | End | | Del |------'`------| Ins | | PgUp | PgDn | | | + `-----------------------------------------' `-----------------------------------------' + + +### Keymap 5: RAISE layer + + ,-----------------------------------------. ,-----------------------------------------. + | F11 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F12 | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | ~ | ` | | | | | | | | | | | \ | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Caps | | Mute | Vol- | Vol+ | | | | | = | [ | ] | | + |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| + | | | Prev | Play | Next | | || | | | PScr | ScLk | Pause| | + |------+------+------+------+------+------| || |------+------+------+------+------+------| + | | | Home | End | | Del |------'`------| Ins | | PgUp | PgDn | | | + `-----------------------------------------' `-----------------------------------------' + +### Keymap 6: ADJUST layer + + ,-----------------------------------------. ,-----------------------------------------. + | | | | | | | | | | | | | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | |RESET | | | | | | | | | | | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | | | | | | | |Qwerty|Colemk|Dvorak| | WoW | + |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| + | | | | | | | || | | | | | | | + |------+------+------+------+------+------| || |------+------+------+------+------+------| + | | | | | | |------'`------| | | | | | | + `-----------------------------------------' `-----------------------------------------' diff --git a/keyboards/bananasplit/bananasplit.h b/keyboards/bananasplit/bananasplit.h index f9b055c63997..8d545c1f99f8 100644 --- a/keyboards/bananasplit/bananasplit.h +++ b/keyboards/bananasplit/bananasplit.h @@ -32,7 +32,7 @@ along with this program. If not, see . | K40 | K41 | K42 | K44 | K45 | K46 | K48 | K49 | K4A | K4B | K4C | ------------------------------------------------------------------------------------------- */ -#define KEYMAP( \ +#define LAYOUT_base( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ @@ -55,7 +55,7 @@ KEYMAP( \ ) */ -#define KEYMAP_HHKBANANA( \ +#define LAYOUT_hhkbanana( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ @@ -69,7 +69,7 @@ KEYMAP( \ { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, K4A, K4B, K4C, KC_NO } \ } -#define KEYMAP_ANSI( \ +#define LAYOUT_60_ansi( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ @@ -83,7 +83,7 @@ KEYMAP( \ { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, K48, K49, KC_NO, K4B, K4C, KC_NO } \ } -#define KEYMAP_ISO( \ +#define LAYOUT_60_iso( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ @@ -110,7 +110,7 @@ KEYMAP( \ | K40 | K41 | K42 | K44 | K45 | K46 | K48 | K49 | K4A | K4B | K4C | ------------------------------------------------------------------------------------------- */ -#define KEYMAP_ALL( \ +#define LAYOUT_all( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ @@ -124,7 +124,7 @@ KEYMAP( \ { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, K4A, K4B, K4C, KC_NO } \ } -#define KEYMAP_HHKB_ARROW( \ +#define LAYOUT_hhkb_arrow( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ diff --git a/keyboards/bananasplit/info.json b/keyboards/bananasplit/info.json new file mode 100644 index 000000000000..6741c6cdb0ce --- /dev/null +++ b/keyboards/bananasplit/info.json @@ -0,0 +1,32 @@ +{ + "keyboard_name": "bananasplit", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_base": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"label":"Alt", "x":10, "y":4}, {"x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}] + }, + + "LAYOUT_hhkbanana": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}] + }, + + "LAYOUT_60_ansi": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_iso": { + "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_all": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"label":"Alt", "x":10, "y":4}, {"x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}] + }, + + "LAYOUT_hhkb_arrow": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"label":"Alt", "x":10, "y":4}, {"x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/bananasplit/keymaps/0010/keymap.c b/keyboards/bananasplit/keymaps/0010/keymap.c index a1795a1ef498..617812149c14 100644 --- a/keyboards/bananasplit/keymaps/0010/keymap.c +++ b/keyboards/bananasplit/keymaps/0010/keymap.c @@ -14,7 +14,7 @@ * along with this program. If not, see . */ -#include "bananasplit.h" +#include QMK_KEYBOARD_H #define ______ KC_TRNS @@ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | Ctrl | GUI | Alt | L1(Space) | LED | Space | Home | End | Left |Rght |Down | ------------------------------------------------------------------------------------------- */ -[0] = KEYMAP( \ +[0] = LAYOUT_base( \ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ @@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | | | | | Reset | | | | | | ------------------------------------------------------------------------------------------- */ -[1] = KEYMAP( \ +[1] = LAYOUT_base( \ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ ______, ______, KC_UP, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, \ ______, KC_LEFT, KC_DOWN, KC_RGHT, ______, ______, ______, ______, ______, ______, ______, ______, KC_SLEP, \ diff --git a/keyboards/bananasplit/keymaps/coloneljesus/keymap.c b/keyboards/bananasplit/keymaps/coloneljesus/keymap.c index b5889aa19cc4..275bfe32a142 100644 --- a/keyboards/bananasplit/keymaps/coloneljesus/keymap.c +++ b/keyboards/bananasplit/keymaps/coloneljesus/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "bananasplit.h" +#include QMK_KEYBOARD_H enum custom_keycodes { WIN_SWITCH_LAYOUT = SAFE_RANGE, @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | Ctrl | GUI | Alt | Space | Fn1 | Space | Alt | GUI | App | Ctrl | ------------------------------------------------------------------------------------------- */ -[0] = KEYMAP( \ +[0] = LAYOUT_base( \ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ @@ -53,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | | | | | TRNS | | | | | Reset | ------------------------------------------------------------------------------------------- */ -[1] = KEYMAP( \ +[1] = LAYOUT_base( \ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, \ KC_CAPS, KC_MPRV, KC_VOLU, KC_MNXT, KC_PGUP, KC_INS, KC_HOME, LCTL(KC_LEFT), LCTL(KC_RGHT), KC_END, _______, _______, _______, KC_PSCR, \ _______, KC_MUTE, KC_VOLD, KC_MPLY, KC_PGDN, KC_DEL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, \ @@ -78,7 +78,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case WIN_SWITCH_LAYOUT: { - // Sends Alt+Shift on both key down and key up. + // Sends Alt+Shift on both key down and key up. // Designed to switch between two keyboard layouts on Windows using a locking switch. // Does nothing if right shift is pressed for easy resync. if (!(get_mods() & MOD_BIT(KC_RSFT))) diff --git a/keyboards/bananasplit/keymaps/default/keymap.c b/keyboards/bananasplit/keymaps/default/keymap.c index f07278df9b05..dcef38bca15a 100644 --- a/keyboards/bananasplit/keymaps/default/keymap.c +++ b/keyboards/bananasplit/keymaps/default/keymap.c @@ -1,10 +1,10 @@ -#include "bananasplit.h" +#include QMK_KEYBOARD_H #define DEFAULT_LAYER 0 #define LAYER_1 1 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [DEFAULT_LAYER] = KEYMAP( + [DEFAULT_LAYER] = LAYOUT_base( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ @@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_ENT, MO(LAYER_1), KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT ), - [LAYER_1] = KEYMAP( \ + [LAYER_1] = LAYOUT_base( \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/bananasplit/keymaps/hhkbanana/keymap.c b/keyboards/bananasplit/keymaps/hhkbanana/keymap.c index 10593de8dba4..f2f829f93e39 100644 --- a/keyboards/bananasplit/keymaps/hhkbanana/keymap.c +++ b/keyboards/bananasplit/keymaps/hhkbanana/keymap.c @@ -1,10 +1,10 @@ -#include "bananasplit.h" +#include QMK_KEYBOARD_H #define DEFAULT_LAYER 0 #define LAYER_1 1 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [DEFAULT_LAYER] = KEYMAP_HHKBANANA( \ + [DEFAULT_LAYER] = LAYOUT_hhkbanana( \ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_PSCR, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ @@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_ENT, MO(LAYER_1), KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT \ ), - [LAYER_1] = KEYMAP_HHKBANANA( \ + [LAYER_1] = LAYOUT_hhkbanana( \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/bananasplit/keymaps/jockyxu1122_ansi/keymap.c b/keyboards/bananasplit/keymaps/jockyxu1122_ansi/keymap.c new file mode 100644 index 000000000000..89e275daf7be --- /dev/null +++ b/keyboards/bananasplit/keymaps/jockyxu1122_ansi/keymap.c @@ -0,0 +1,92 @@ +/* + Author: jockyxu1122 + + 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. +*/ + +#include QMK_KEYBOARD_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 | [ | ] | \ | + ------------------------------------------------------------- + | 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) + */ + [DEFAULT_LAYER] = LAYOUT_hhkb_arrow( + // row 1 + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, \ + KC_DEL, \ + // 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] = LAYOUT_hhkb_arrow( + // row 1 + BL_TOGG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \ + KC_F12, KC_TRNS, KC_INS, \ + // 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 000000000000..664a0a0483ca --- /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 000000000000..859944991b88 --- /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 QMK_KEYBOARD_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] = LAYOUT_hhkb_arrow( + // row 1 + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, \ + KC_DEL, \ + // 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] = LAYOUT_hhkb_arrow( + // row 1 + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \ + KC_F12, KC_TRNS, KC_INS, \ + // 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 000000000000..e135f73e3a78 --- /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/bananasplit/keymaps/kamon/config.h b/keyboards/bananasplit/keymaps/kamon/config.h new file mode 100644 index 000000000000..af6cf8ef1f1f --- /dev/null +++ b/keyboards/bananasplit/keymaps/kamon/config.h @@ -0,0 +1,25 @@ +/* Copyright 2017 Balz Guenat + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here +#define GRAVE_ESC_CTRL_OVERRIDE + +#endif diff --git a/keyboards/bananasplit/keymaps/kamon/keymap.c b/keyboards/bananasplit/keymaps/kamon/keymap.c new file mode 100644 index 000000000000..34306e183052 --- /dev/null +++ b/keyboards/bananasplit/keymaps/kamon/keymap.c @@ -0,0 +1,96 @@ +/* Copyright 2017 Balz Guenat + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +#define ______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* +------------------------------------------------------------------------------------------- +|GvEsc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | +------------------------------------------------------------------------------------------- +| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | +------------------------------------------------------------------------------------------- +| Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | +------------------------------------------------------------------------------------------- +| Shift | Z | X | C | V | B | N | M | , | . | / | Shift | | +------------------------------------------------------------------------------------------- +| Fn1 | GUI | Alt | Space | Space | Space | Alt | Fn1 | Fn1 | Ctrl | +------------------------------------------------------------------------------------------- +*/ +[0] = LAYOUT_base( \ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, M(0),\ + MO(1), KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_NO, MO(1), KC_RCTL \ +), +/* +------------------------------------------------------------------------------------------- +| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete | +------------------------------------------------------------------------------------------- +| TAB |Home | Up | End |PgUp | | | | | | | | | PrtSc | +------------------------------------------------------------------------------------------- +| Ctrl |Left |Down |Right |PgDn | | | | | | | | Enter | +------------------------------------------------------------------------------------------- +| Shift | | | | | | | | | | | Shift | | +------------------------------------------------------------------------------------------- +| Fn1 | GUI | Alt | Space | Space | Space | Alt | | | Ctrl | +------------------------------------------------------------------------------------------- +*/ +[1] = LAYOUT_base( \ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + KC_TAB, KC_HOME, KC_UP, KC_END, KC_PGUP, ______, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, \ + KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, ______, ______, ______, ______, ______, ______, ______, ______, \ + KC_LSFT, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_RSFT, ______, \ + ______, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, ______, ______, ______, KC_RCTL \ +), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch(id) { + case 0: + // Sends Alt+Shift on both key down and key up. + // Fesigned to switch between two keyboard layouts on Windows using a locking switch. + // Does nothing if right shift is pressed for easier resync. + if (!(get_mods() & MOD_BIT(KC_RSFT))) + return MACRO(D(LALT), T(LSFT), U(LALT), END); + else + return MACRO_NONE; + } + return MACRO_NONE; +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/bananasplit/keymaps/kamon/readme.md b/keyboards/bananasplit/keymaps/kamon/readme.md new file mode 100644 index 000000000000..a08bea519f7a --- /dev/null +++ b/keyboards/bananasplit/keymaps/kamon/readme.md @@ -0,0 +1,34 @@ +# Kamon's keymap for the Bananasplit +A simple layout to get you started with the BananaSplit60. + +Default layer: + +``` +------------------------------------------------------------------------------------------- +|GvEsc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | +------------------------------------------------------------------------------------------- +| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | +------------------------------------------------------------------------------------------- +| Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | +------------------------------------------------------------------------------------------- +| Shift | Z | X | C | V | B | N | M | , | . | / | Shift | | +------------------------------------------------------------------------------------------- +| Fn1 | GUI | Alt | Space | Space | Space | Alt | Fn1 | Fn1 | Ctrl | +------------------------------------------------------------------------------------------- +``` + +Fn1 layer: + +``` +------------------------------------------------------------------------------------------- +| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete | +------------------------------------------------------------------------------------------- +| TAB |Home | Up | End |PgUp | | | | | | | | | PrtSc | +------------------------------------------------------------------------------------------- +| Ctrl |Left |Down |Right |PgDn | | | | | | | | Enter | +------------------------------------------------------------------------------------------- +| Shift | | | | | | | | | | | Shift | | +------------------------------------------------------------------------------------------- +| Fn1 | GUI | Alt | Space | Space | Space | Alt | | | Ctrl | +------------------------------------------------------------------------------------------- +``` \ No newline at end of file diff --git a/keyboards/bananasplit/keymaps/kamon/rules.mk b/keyboards/bananasplit/keymaps/kamon/rules.mk new file mode 100644 index 000000000000..7d09c322e5e3 --- /dev/null +++ b/keyboards/bananasplit/keymaps/kamon/rules.mk @@ -0,0 +1,37 @@ +# Copyright 2017 Balz Guenat +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +# QMK Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +# BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +# MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +# EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +# CONSOLE_ENABLE = no # Console for debug(+400) +# COMMAND_ENABLE = yes # Commands for debug and configuration +# NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +# BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +# MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +# AUDIO_ENABLE = no # Audio output on port C6 +# UNICODE_ENABLE = no # Unicode +# BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +# RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +# SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/bananasplit/keymaps/nic/keymap.c b/keyboards/bananasplit/keymaps/nic/keymap.c index f9794b5b10cc..5ed1c65e9990 100644 --- a/keyboards/bananasplit/keymaps/nic/keymap.c +++ b/keyboards/bananasplit/keymaps/nic/keymap.c @@ -1,4 +1,4 @@ -#include "bananasplit.h" +#include QMK_KEYBOARD_H #define DEFAULT_LAYER 0 #define THUMB_LAYER 1 @@ -8,7 +8,7 @@ #define HYPER_TAB ALL_T(KC_TAB) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [DEFAULT_LAYER] = KEYMAP_HHKB_ARROW( \ + [DEFAULT_LAYER] = LAYOUT_hhkb_arrow( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, \ HYPER_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ @@ -16,7 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_CAPS, KC_LALT, KC_LGUI, KC_SPC, MO(THUMB_LAYER), KC_SPC, KC_LGUI, KC_LALT, KC_LEFT, KC_DOWN, KC_RIGHT \ ), - [THUMB_LAYER] = KEYMAP_HHKB_ARROW( \ + [THUMB_LAYER] = LAYOUT_hhkb_arrow( \ MO(MOD_LAYER), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, _______, \ @@ -24,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), - [NORMAN_LAYER] = KEYMAP_HHKB_ARROW( \ + [NORMAN_LAYER] = LAYOUT_hhkb_arrow( \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_SCLN, _______, _______, _______, \ _______, _______, _______, KC_E, KC_T, _______, KC_Y, KC_N, KC_I, KC_O, KC_H, _______, _______, \ @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), - [MOD_LAYER] = KEYMAP_HHKB_ARROW( \ + [MOD_LAYER] = LAYOUT_hhkb_arrow( \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/bananasplit/keymaps/rask/keymap.c b/keyboards/bananasplit/keymaps/rask/keymap.c index e4b8e1cc793f..6c7544cc8b52 100644 --- a/keyboards/bananasplit/keymaps/rask/keymap.c +++ b/keyboards/bananasplit/keymaps/rask/keymap.c @@ -1,4 +1,4 @@ -#include "bananasplit.h" +#include QMK_KEYBOARD_H // rask's BananaSplit60 layout @@ -29,7 +29,7 @@ // Lock the keyboard, release to unlock const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [L_BASE] = KEYMAP_HHKB_ARROW( \ + [L_BASE] = LAYOUT_hhkb_arrow( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ MO(L_ONE), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ @@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTRL, KC_LGUI, KC_LALT, KC_BSPC, MO(L_BASE_ALT), KC_SPACE, KC_RALT, MO(L_LOCK), KC_LEFT, KC_DOWN, KC_RIGHT \ ), - [L_BASE_ALT] = KEYMAP_HHKB_ARROW( \ + [L_BASE_ALT] = LAYOUT_hhkb_arrow( \ ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ______, ______, ______, KC_SPACE, ______, ______, ______, ______, ______, ______, ______ \ ), - [L_ONE] = KEYMAP_HHKB_ARROW( \ + [L_ONE] = LAYOUT_hhkb_arrow( \ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_INS, \ ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ @@ -54,7 +54,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), - [L_TWO] = KEYMAP_HHKB_ARROW( \ + [L_TWO] = LAYOUT_hhkb_arrow( \ ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MPRV, KC_MPLY, KC_MNXT, ______, ______, \ KC_CAPS, ______, ______, ______, ______, ______, ______, ______, ______, KC_VOLD, KC_VOLU, KC_MUTE, ______, \ @@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ______, KC_APP, ______, ______, ______, ______, ______, ______, ______, ______, ______ \ ), - [L_LOCK] = KEYMAP_HHKB_ARROW( \ + [L_LOCK] = LAYOUT_hhkb_arrow( \ XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, \ XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, \ XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, \ diff --git a/keyboards/bananasplit/keymaps/talljoe/config.h b/keyboards/bananasplit/keymaps/talljoe/config.h new file mode 100644 index 000000000000..bb2aadfa6999 --- /dev/null +++ b/keyboards/bananasplit/keymaps/talljoe/config.h @@ -0,0 +1,23 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include QMK_KEYBOARD_CONFIG_H + +#define PREVENT_STUCK_MODIFIERS +#define SPACE_COUNT 3 + +#define TEMPLATE( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K41, K42, K44, K45, K46, K48, K49, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, KC_NO, K4B, K4C, KC_NO }\ +} + +#endif diff --git a/keyboards/bananasplit/keymaps/talljoe/keymap.c b/keyboards/bananasplit/keymaps/talljoe/keymap.c new file mode 100644 index 000000000000..7812add812b3 --- /dev/null +++ b/keyboards/bananasplit/keymaps/talljoe/keymap.c @@ -0,0 +1 @@ +// This space intentionally left blank diff --git a/keyboards/bananasplit/rules.mk b/keyboards/bananasplit/rules.mk index 3e8f70690d79..81570c493a5a 100644 --- a/keyboards/bananasplit/rules.mk +++ b/keyboards/bananasplit/rules.mk @@ -62,3 +62,5 @@ BACKLIGHT_ENABLE = yes # Optimize size but this may cause error "relocation truncated to fit" #EXTRALDFLAGS = -Wl,--relax + +LAYOUTS = 60_ansi 60_iso diff --git a/keyboards/bantam44/bantam44.h b/keyboards/bantam44/bantam44.h index 3c01174348fa..38afbbdde701 100644 --- a/keyboards/bantam44/bantam44.h +++ b/keyboards/bantam44/bantam44.h @@ -7,17 +7,17 @@ // The following is an example using the Planck MIT layout // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array -#define KEYMAP( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38 \ +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38 \ ) \ { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, K2A }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ - { K30, K31, K32, KC_NO, K33, KC_NO, K34, KC_NO, K35, K36, K37, K38 }, \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, K2A }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, K31, K32, KC_NO, K33, KC_NO, K34, KC_NO, K35, K36, K37, K38 } \ } #endif diff --git a/keyboards/bantam44/info.json b/keyboards/bantam44/info.json new file mode 100644 index 000000000000..485d624f550a --- /dev/null +++ b/keyboards/bantam44/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Bantam-44", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT": { + "key_count": 44, + "layout": [{"label":"K00", "x":0, "y":0}, {"label":"K01", "x":1, "y":0}, {"label":"K02", "x":2, "y":0}, {"label":"K03", "x":3, "y":0}, {"label":"K04", "x":4, "y":0}, {"label":"K05", "x":5, "y":0}, {"label":"K06", "x":6, "y":0}, {"label":"K07", "x":7, "y":0}, {"label":"K08", "x":8, "y":0}, {"label":"K09", "x":9, "y":0}, {"label":"K0A", "x":10, "y":0}, {"label":"K0B", "x":11, "y":0}, {"label":"K10", "x":0, "y":1, "w":1.5}, {"label":"K11", "x":1.5, "y":1}, {"label":"K12", "x":2.5, "y":1}, {"label":"K13", "x":3.5, "y":1}, {"label":"K14", "x":4.5, "y":1}, {"label":"K15", "x":5.5, "y":1}, {"label":"K16", "x":6.5, "y":1}, {"label":"K17", "x":7.5, "y":1}, {"label":"K18", "x":8.5, "y":1}, {"label":"K19", "x":9.5, "y":1}, {"label":"K1A", "x":10.5, "y":1, "w":1.5}, {"label":"K20", "x":0, "y":2}, {"label":"K21", "x":1, "y":2}, {"label":"K22", "x":2, "y":2}, {"label":"K23", "x":3, "y":2}, {"label":"K24", "x":4, "y":2}, {"label":"K25", "x":5, "y":2}, {"label":"K26", "x":6, "y":2}, {"label":"K27", "x":7, "y":2}, {"label":"K28", "x":8, "y":2}, {"label":"K29", "x":9, "y":2}, {"label":"K2A", "x":10, "y":2}, {"label":"K2B", "x":11, "y":2}, {"label":"K30", "x":0, "y":3, "w":1.25}, {"label":"K31", "x":1.25, "y":3, "w":1.25}, {"label":"K32", "x":2.5, "y":3, "w":1.25}, {"label":"K33", "x":3.75, "y":3, "w":1.25}, {"label":"K34", "x":5, "y":3, "w":2.75}, {"label":"K35", "x":7.75, "y":3, "w":1.25}, {"label":"K36", "x":9, "y":3}, {"label":"K37", "x":10, "y":3}, {"label":"K38", "x":11, "y":3}] + } + } +} diff --git a/keyboards/bantam44/keymaps/default/keymap.c b/keyboards/bantam44/keymaps/default/keymap.c index ed795eee1bf5..0e15bebf86d3 100644 --- a/keyboards/bantam44/keymaps/default/keymap.c +++ b/keyboards/bantam44/keymaps/default/keymap.c @@ -1,30 +1,33 @@ -#include "bantam44.h" - +#include QMK_KEYBOARD_H + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = { /* Base */ - {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC }, - {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_NO, KC_ENT }, - {KC_CAPS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT }, - {KC_LCTL, KC_LGUI, KC_LALT, KC_NO, MO(1), KC_NO, KC_SPC, KC_NO, MO(2), KC_SCLN, KC_QUOT, KC_SLSH } - }, - [1] = { /* LOWER */ - {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELT }, - {KC_TAB, KC_MPRV, KC_MPLY, KC_MNXT, KC_GRV, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_NO, KC_ENT }, - {KC_CAPS, KC_LSFT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, KC_HOME, KC_PGUP, KC_RSFT }, - {KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_TRNS, KC_NO, KC_SPC, KC_NO, KC_TRNS, KC_END, KC_PGDN, KC_EXLM } - }, - [2] = { /* RAISE */ - {KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELT }, - {KC_TAB, KC_MUTE, KC_VOLD, KC_VOLU, KC_TILD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_NO, KC_ENT }, - {KC_CAPS, KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_UP, KC_RSFT }, - {KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_TRNS, KC_NO, KC_SPC, KC_NO, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT } - } + /* Base */ + [0] = LAYOUT( \ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, \ + KC_CAPS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, MO(2), KC_SCLN, KC_QUOT, KC_SLSH \ + ), + /* LOWER */ + [1] = LAYOUT( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELT, \ + KC_TAB, KC_MPRV, KC_MPLY, KC_MNXT, KC_GRV, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_ENT, \ + KC_CAPS, KC_LSFT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, KC_HOME, KC_PGUP, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_SPC, KC_TRNS, KC_END, KC_PGDN, KC_EXLM \ + ), + /* RAISE */ + [2] = LAYOUT( \ + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELT, \ + KC_TAB, KC_MUTE, KC_VOLD, KC_VOLU, KC_TILD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_ENT, \ + KC_CAPS, KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_UP, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_SPC, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT \ + ) }; - + const uint16_t PROGMEM fn_actions[] = { }; - + const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // MACRODOWN only works in this function { return MACRO_NONE; -}; \ No newline at end of file +}; diff --git a/keyboards/bfake/bfake.c b/keyboards/bfake/bfake.c index 33d0a60c21c2..2160706fea56 100644 --- a/keyboards/bfake/bfake.c +++ b/keyboards/bfake/bfake.c @@ -16,7 +16,12 @@ along with this program. If not, see . */ #include "bfake.h" +#ifdef BACKLIGHT_ENABLE +#include "backlight.h" +#endif +#ifdef RGBLIGHT_ENABLE #include "rgblight.h" +#endif #include @@ -24,6 +29,7 @@ along with this program. If not, see . #include "i2c.h" #include "quantum.h" +#ifdef RGBLIGHT_ENABLE extern rgblight_config_t rgblight_config; void rgblight_set(void) { @@ -38,8 +44,23 @@ void rgblight_set(void) { i2c_init(); i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); } +#endif __attribute__ ((weak)) void matrix_scan_user(void) { - rgblight_task(); +} + +void backlight_init_ports(void) { + DDRD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); + PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); +} + +void backlight_set(uint8_t level) { + if (level == 0) { + // Turn out the lights + PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); + } else { + // Turn on the lights + PORTD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); + } } diff --git a/keyboards/bfake/bfake.h b/keyboards/bfake/bfake.h index fa5c8ee29845..a5b2d8078a6e 100644 --- a/keyboards/bfake/bfake.h +++ b/keyboards/bfake/bfake.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT_all( \ K61, K71, K72, K73, K74, K64, K65, K75, K76, K77, K78, K68, K66, K10, K60,\ K11, K01, K02, K03, K04, K14, K15, K05, K06, K07, K08, K18, K16, K20, \ K12, K21, K22, K23, K24, K34, K35, K25, K26, K27, K28, K38, K40, \ diff --git a/keyboards/bfake/config.h b/keyboards/bfake/config.h index c0e0face5a2b..de8c4b5df54e 100644 --- a/keyboards/bfake/config.h +++ b/keyboards/bfake/config.h @@ -37,7 +37,8 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCING_DELAY 5 - +#define NO_BACKLIGHT_CLOCK +#define BACKLIGHT_LEVELS 1 #define RGBLIGHT_ANIMATIONS #define NO_UART 1 diff --git a/keyboards/bfake/info.json b/keyboards/bfake/info.json new file mode 100644 index 000000000000..541d1edaf196 --- /dev/null +++ b/keyboards/bfake/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "b.fake", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/bfake/keymaps/default/keymap.c b/keyboards/bfake/keymaps/default/keymap.c index 239fdf427f9f..a237f8489e76 100644 --- a/keyboards/bfake/keymaps/default/keymap.c +++ b/keyboards/bfake/keymaps/default/keymap.c @@ -15,24 +15,24 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "bfake.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( + [0] = LAYOUT_all( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL ), - [1] = KEYMAP( + [1] = LAYOUT_all( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_DEL, MO(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_TRNS, KC_TRNS, MO(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - [2] = KEYMAP( + [2] = LAYOUT_all( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/bfake/keymaps/mechmerlin/keymap.c b/keyboards/bfake/keymaps/mechmerlin/keymap.c new file mode 100644 index 000000000000..35b59e6a42f3 --- /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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, TG(2), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, MO(1), KC_RALT, KC_RGUI, KC_RCTL + ), + [1] = LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT + ), + + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + diff --git a/keyboards/bfake/keymaps/mechmerlin/readme.md b/keyboards/bfake/keymaps/mechmerlin/readme.md new file mode 100644 index 000000000000..b85b6537c1c6 --- /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/bfake/rules.mk b/keyboards/bfake/rules.mk index 9165de4248ec..6577ea193fd4 100644 --- a/keyboards/bfake/rules.mk +++ b/keyboards/bfake/rules.mk @@ -37,7 +37,7 @@ EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = no -RGBLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = no RGBLIGHT_CUSTOM_DRIVER = yes OPT_DEFS = -DDEBUG_LEVEL=0 @@ -47,4 +47,4 @@ CUSTOM_MATRIX = yes SRC = matrix.c i2c.c # programming options -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex \ No newline at end of file +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/bfo9000/bfo9000.c b/keyboards/bfo9000/bfo9000.c new file mode 100644 index 000000000000..2ae778e32b3b --- /dev/null +++ b/keyboards/bfo9000/bfo9000.c @@ -0,0 +1 @@ +#include "bfo9000.h" diff --git a/keyboards/bfo9000/bfo9000.h b/keyboards/bfo9000/bfo9000.h new file mode 100644 index 000000000000..c3bd2236cefd --- /dev/null +++ b/keyboards/bfo9000/bfo9000.h @@ -0,0 +1,37 @@ +#ifndef BFO9000_H +#define BFO9000_H + +#include "quantum.h" + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, L07, L08, R00, R01, R02, R03, R04, R05, R06, R07, R08, \ + L10, L11, L12, L13, L14, L15, L16, L17, L18, R10, R11, R12, R13, R14, R15, R16, R17, R18, \ + L20, L21, L22, L23, L24, L25, L26, L27, L28, R20, R21, R22, R23, R24, R25, R26, R27, R28, \ + L30, L31, L32, L33, L34, L35, L36, L37, L38, R30, R31, R32, R33, R34, R35, R36, R37, R38, \ + L40, L41, L42, L43, L44, L45, L46, L47, L48, R40, R41, R42, R43, R44, R45, R46, R47, R48, \ + L50, L51, L52, L53, L54, L55, L56, L57, L58, R50, R51, R52, R53, R54, R55, R56, R57, R58 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06, L07, L08 }, \ + { L10, L11, L12, L13, L14, L15, L16, L17, L18 }, \ + { L20, L21, L22, L23, L24, L25, L26, L27, L28 }, \ + { L30, L31, L32, L33, L34, L35, L36, L37, L38 }, \ + { L40, L41, L42, L43, L44, L45, L46, L47, L48 }, \ + { L50, L51, L52, L53, L54, L55, L56, L57, L58 }, \ + { R00, R01, R02, R03, R04, R05, R06, R07, R08 }, \ + { R10, R11, R12, R13, R14, R15, R16, R17, R18 }, \ + { R20, R21, R22, R23, R24, R25, R26, R27, R28 }, \ + { R30, R31, R32, R33, R34, R35, R36, R37, R38 }, \ + { R40, R41, R42, R43, R44, R45, R46, R47, R48 }, \ + { R50, R51, R52, R53, R54, R55, R56, R57, R58 } \ + } + +#endif diff --git a/keyboards/bfo9000/config.h b/keyboards/bfo9000/config.h new file mode 100644 index 000000000000..561d2d11468f --- /dev/null +++ b/keyboards/bfo9000/config.h @@ -0,0 +1,78 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCEEB +#define PRODUCT_ID 0x1169 +#define DEVICE_VER 0x0100 +#define MANUFACTURER Keebio +#define PRODUCT BFO-9000 +#define DESCRIPTION Really big split ortholinear keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 12 +#define MATRIX_COLS 9 + +// wiring of each half +#define MATRIX_ROW_PINS { D3, D2, D4, C6, D7, E6 } +#define MATRIX_COL_PINS { B5, B6, B2, B3, B1, F7, F6, F5, F4 } + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* ws2812 RGB LED */ +#define RGB_DI_PIN B4 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 20 // Number of LEDs + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + + +#endif diff --git a/keyboards/bfo9000/i2c.c b/keyboards/bfo9000/i2c.c new file mode 100644 index 000000000000..084c890c405f --- /dev/null +++ b/keyboards/bfo9000/i2c.c @@ -0,0 +1,162 @@ +#include +#include +#include +#include +#include +#include +#include "i2c.h" + +#ifdef USE_I2C + +// Limits the amount of we wait for any one i2c transaction. +// Since were running SCL line 100kHz (=> 10ÎŒs/bit), and each transactions is +// 9 bits, a single transaction will take around 90ÎŒs to complete. +// +// (F_CPU/SCL_CLOCK) => # of ÎŒC cycles to transfer a bit +// poll loop takes at least 8 clock cycles to execute +#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 + +#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) + +volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +static volatile uint8_t slave_buffer_pos; +static volatile bool slave_has_register_set = false; + +// Wait for an i2c operation to finish +inline static +void i2c_delay(void) { + uint16_t lim = 0; + while(!(TWCR & (1<10. + // Check datasheets for more info. + TWBR = ((F_CPU/SCL_CLOCK)-16)/2; +} + +// Start a transaction with the given i2c slave address. The direction of the +// transfer is set with I2C_READ and I2C_WRITE. +// returns: 0 => success +// 1 => error +uint8_t i2c_master_start(uint8_t address) { + TWCR = (1< slave ACK +// 1 => slave NACK +uint8_t i2c_master_write(uint8_t data) { + TWDR = data; + TWCR = (1<= SLAVE_BUFFER_SIZE ) { + ack = 0; + slave_buffer_pos = 0; + } + slave_has_register_set = true; + } else { + i2c_slave_buffer[slave_buffer_pos] = TWDR; + BUFFER_POS_INC(); + } + break; + + case TW_ST_SLA_ACK: + case TW_ST_DATA_ACK: + // master has addressed this device as a slave transmitter and is + // requesting data. + TWDR = i2c_slave_buffer[slave_buffer_pos]; + BUFFER_POS_INC(); + break; + + case TW_BUS_ERROR: // something went wrong, reset twi state + TWCR = 0; + default: + break; + } + // Reset everything, so we are ready for the next TWI interrupt + TWCR |= (1< + +#ifndef F_CPU +#define F_CPU 16000000UL +#endif + +#define I2C_READ 1 +#define I2C_WRITE 0 + +#define I2C_ACK 1 +#define I2C_NACK 0 + +#define SLAVE_BUFFER_SIZE 0x10 + +// i2c SCL clock frequency +#define SCL_CLOCK 400000L + +extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +void i2c_master_init(void); +uint8_t i2c_master_start(uint8_t address); +void i2c_master_stop(void); +uint8_t i2c_master_write(uint8_t data); +uint8_t i2c_master_read(int); +void i2c_reset_state(void); +void i2c_slave_init(uint8_t address); + + +static inline unsigned char i2c_start_read(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_READ); +} + +static inline unsigned char i2c_start_write(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_WRITE); +} + +// from SSD1306 scrips +extern unsigned char i2c_rep_start(unsigned char addr); +extern void i2c_start_wait(unsigned char addr); +extern unsigned char i2c_readAck(void); +extern unsigned char i2c_readNak(void); +extern unsigned char i2c_read(unsigned char ack); + +#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); + +#endif diff --git a/keyboards/lets_split/keymaps/dale/config.h b/keyboards/bfo9000/keymaps/default/config.h similarity index 100% rename from keyboards/lets_split/keymaps/dale/config.h rename to keyboards/bfo9000/keymaps/default/config.h diff --git a/keyboards/bfo9000/keymaps/default/keymap.c b/keyboards/bfo9000/keymaps/default/keymap.c new file mode 100644 index 000000000000..5de5e123e509 --- /dev/null +++ b/keyboards/bfo9000/keymaps/default/keymap.c @@ -0,0 +1,19 @@ +#include QMK_KEYBOARD_H + +#define _BASE 0 + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_BASE] = LAYOUT( \ + KC_ESC, KC_VOLU, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + KC_HOME, KC_VOLD, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_END, KC_TAB, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_PGUP, KC_CAPS, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, \ + KC_PGDN, KC_UP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, XXXXXXX, \ + KC_LEFT, KC_DOWN, KC_RGHT, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_ENT, KC_BSPC, KC_SPC, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ +) +}; diff --git a/keyboards/bfo9000/matrix.c b/keyboards/bfo9000/matrix.c new file mode 100644 index 000000000000..2ca5f4d87abc --- /dev/null +++ b/keyboards/bfo9000/matrix.c @@ -0,0 +1,342 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +/* + * scan matrix + */ +#include +#include +#ifdef USE_I2C +// provides memcpy for copying TWI slave buffer +// #include +#endif +#include +#include +#include +#include +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "split_util.h" +#include "pro_micro.h" +#include "config.h" + +#ifdef USE_I2C +# include "i2c.h" +#else // USE_SERIAL +# include "serial.h" +#endif + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +#define ERROR_DISCONNECT_COUNT 5 + +static uint8_t debouncing = DEBOUNCE; +static const int ROWS_PER_HAND = MATRIX_ROWS/2; +static uint8_t error_count = 0; + +static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +static matrix_row_t read_cols(void); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); + + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ + debug_enable = true; + debug_matrix = true; + debug_mouse = true; + // initialize row and col + unselect_rows(); + init_cols(); + + TX_RX_LED_INIT; + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + + matrix_init_quantum(); +} + +uint8_t _matrix_scan(void) +{ + // Right hand is stored after the left in the matrix so, we need to offset it + int offset = isLeftHand ? 0 : (ROWS_PER_HAND); + + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + select_row(i); + _delay_us(30); // without this wait read unstable value. + matrix_row_t cols = read_cols(); + if (matrix_debouncing[i+offset] != cols) { + matrix_debouncing[i+offset] = cols; + debouncing = DEBOUNCE; + } + unselect_rows(); + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + matrix[i+offset] = matrix_debouncing[i+offset]; + } + } + } + + return 1; +} + +#ifdef USE_I2C + +// Get rows from other half over i2c +int i2c_transaction(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + + int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); + if (err) goto i2c_error; + + // start of matrix stored at 0x00 + err = i2c_master_write(0x00); + if (err) goto i2c_error; + + // Start read + err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); + if (err) goto i2c_error; + + if (!err) { + /* + // read from TWI byte-by-byte into matrix_row_t memory space + size_t i; + for (i = 0; i < SLAVE_BUFFER_SIZE-1; ++i) { + *((uint8_t*)&matrix[slaveOffset]+i) = i2c_master_read(I2C_ACK); + } + // last byte to be read / end of chunk + *((uint8_t*)&matrix[slaveOffset]+i) = i2c_master_read(I2C_NACK); + */ + + // kludge for column #9: unpack bits for keys (2,9) and (3,9) from (1,7) and (1,8) + // i2c_master_read(I2C_ACK); + matrix[slaveOffset+0] = i2c_master_read(I2C_ACK); + // i2c_master_read(I2C_ACK); + matrix[slaveOffset+1] = (matrix_row_t)i2c_master_read(I2C_ACK)\ + | (matrix[slaveOffset+0]&0x40U)<<2; + // i2c_master_read(I2C_ACK); + matrix[slaveOffset+2] = (matrix_row_t)i2c_master_read(I2C_NACK)\ + | (matrix[slaveOffset+0]&0x80U)<<1; + // clear highest two bits on row 1, where the col9 bits were transported + matrix[slaveOffset+0] &= 0x3F; + + i2c_master_stop(); + } else { +i2c_error: // the cable is disconnected, or something else went wrong + i2c_reset_state(); + return err; + } + + return 0; +} + +#else // USE_SERIAL + +int serial_transaction(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + + if (serial_update_buffers()) { + return 1; + } + + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = serial_slave_buffer[i]; + } + return 0; +} +#endif + +uint8_t matrix_scan(void) +{ + int ret = _matrix_scan(); + + + +#ifdef USE_I2C + if( i2c_transaction() ) { +#else // USE_SERIAL + if( serial_transaction() ) { +#endif + // turn on the indicator led when halves are disconnected + TXLED1; + + error_count++; + + if (error_count > ERROR_DISCONNECT_COUNT) { + // reset other half if disconnected + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = 0; + } + } + } else { + // turn off the indicator led on no error + TXLED0; + error_count = 0; + } + matrix_scan_quantum(); + return ret; +} + +void matrix_slave_scan(void) { + _matrix_scan(); + + int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; + +#ifdef USE_I2C + // SLAVE_BUFFER_SIZE is from i2c.h + // (MATRIX_ROWS/2*sizeof(matrix_row_t)) + // memcpy((void*)i2c_slave_buffer, (const void*)&matrix[offset], (ROWS_PER_HAND*sizeof(matrix_row_t))); + + // kludge for column #9: put bits for keys (2,9) and (3,9) into (1,7) and (1,8) + i2c_slave_buffer[0] = (uint8_t)(matrix[offset+0])\ + | (matrix[offset+1]&0x100U)>>2\ + | (matrix[offset+2]&0x100U)>>1; + i2c_slave_buffer[1] = (uint8_t)(matrix[offset+1]); + i2c_slave_buffer[2] = (uint8_t)(matrix[offset+2]); + // note: looks like a possible operator-precedence bug here, in last version? + /* + i2c_slave_buffer[1] = (uint8_t)matrix[offset+0]; + i2c_slave_buffer[2] = (uint8_t)(matrix[offset+1]>>8); + i2c_slave_buffer[3] = (uint8_t)(matrix[offset+1]>>8); + i2c_slave_buffer[4] = (uint8_t)(matrix[offset+2]>>8); + i2c_slave_buffer[5] = (uint8_t)matrix[offset+2]; + */ +#else // USE_SERIAL + for (int i = 0; i < ROWS_PER_HAND; ++i) { + serial_slave_buffer[i] = matrix[offset+i]; + } +#endif +} + +bool matrix_is_modified(void) +{ + if (debouncing) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(col_pins[x] & 0xF); + _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); + } +} + +static matrix_row_t read_cols(void) +{ + matrix_row_t result = 0; + for(int x = 0; x < MATRIX_COLS; x++) { + result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); + } + return result; +} + +static void unselect_rows(void) +{ + for(int x = 0; x < ROWS_PER_HAND; x++) { + _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); + _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); + } +} + +static void select_row(uint8_t row) +{ + _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); + _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); +} diff --git a/keyboards/bfo9000/readme.md b/keyboards/bfo9000/readme.md new file mode 100644 index 000000000000..20c9b2ff7934 --- /dev/null +++ b/keyboards/bfo9000/readme.md @@ -0,0 +1,18 @@ +BFO-9000 +======== + +A split full-size ortholinear keyboard made and sold by Keebio. Each half is a 6x9 arrangement, with breakable pieces to allow the number of rows to be customized between 4 to 6, and the number of columns to be between 7 to 9. [More info at Keebio](https://keeb.io). + +Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) +Hardware Supported: Pro Micro +Hardware Availability: [Keebio](https://keeb.io) + +Make example for this keyboard (after setting up your build environment): + + make bfo9000:default + +Example of flashing this keyboard: + + make bfo9000:default:avrdude + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/bfo9000/rules.mk b/keyboards/bfo9000/rules.mk new file mode 100644 index 000000000000..8a7e56f462d3 --- /dev/null +++ b/keyboards/bfo9000/rules.mk @@ -0,0 +1,70 @@ +SRC += matrix.c \ + i2c.c \ + split_util.c \ + serial.c + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = caterina + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +CUSTOM_MATRIX = yes diff --git a/keyboards/bfo9000/serial.c b/keyboards/bfo9000/serial.c new file mode 100644 index 000000000000..fea57b651018 --- /dev/null +++ b/keyboards/bfo9000/serial.c @@ -0,0 +1,230 @@ +/* + * WARNING: be careful changing this code, it is very timing dependent + */ + +#ifndef F_CPU +#define F_CPU 16000000 +#endif + +#include +#include +#include +#include +#include "serial.h" + +#ifndef USE_I2C + +// Serial pulse period in microseconds. Its probably a bad idea to lower this +// value. +#define SERIAL_DELAY 24 + +matrix_row_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; +matrix_row_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; + +#define ROW_MASK (((matrix_row_t)0-1)>>(8*sizeof(matrix_row_t)-MATRIX_COLS)) + +#define SLAVE_DATA_CORRUPT (1<<0) +volatile uint8_t status = 0; + +inline static +void serial_delay(void) { + _delay_us(SERIAL_DELAY); +} + +inline static +void serial_output(void) { + SERIAL_PIN_DDR |= SERIAL_PIN_MASK; +} + +// make the serial pin an input with pull-up resistor +inline static +void serial_input(void) { + SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +inline static +matrix_row_t serial_read_pin(void) { + return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); +} + +inline static +void serial_low(void) { + SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; +} + +inline static +void serial_high(void) { + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +void serial_master_init(void) { + serial_output(); + serial_high(); +} + +void serial_slave_init(void) { + serial_input(); + + // Enable INT0 + EIMSK |= _BV(INT0); + // Trigger on falling edge of INT0 + EICRA &= ~(_BV(ISC00) | _BV(ISC01)); +} + +// Used by the master to synchronize timing with the slave. +static +void sync_recv(void) { + serial_input(); + // This shouldn't hang if the slave disconnects because the + // serial line will float to high if the slave does disconnect. + while (!serial_read_pin()); + serial_delay(); +} + +// Used by the slave to send a synchronization signal to the master. +static +void sync_send(void) { + serial_output(); + + serial_low(); + serial_delay(); + + serial_high(); +} + +// Reads a byte from the serial line +static +matrix_row_t serial_read_byte(void) { + matrix_row_t byte = 0; + serial_input(); + for ( uint8_t i = 0; i < MATRIX_COLS; ++i) { + byte = (byte << 1) | serial_read_pin(); + serial_delay(); + _delay_us(1); + } + + return byte; +} + +// Sends a byte with MSB ordering +static +void serial_write_byte(matrix_row_t data) { + matrix_row_t b = MATRIX_COLS; + serial_output(); + while( b-- ) { + if(data & (1UL << b)) { + serial_high(); + } else { + serial_low(); + } + serial_delay(); + } +} + +// interrupt handle to be used by the slave device +ISR(SERIAL_PIN_INTERRUPT) { + sync_send(); + + matrix_row_t checksum = 0; + for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { + serial_write_byte(serial_slave_buffer[i]); + sync_send(); + checksum += ROW_MASK & serial_slave_buffer[i]; + } + serial_write_byte(checksum); + sync_send(); + + // wait for the sync to finish sending + serial_delay(); + + // read the middle of pulses + _delay_us(SERIAL_DELAY/2); + + matrix_row_t checksum_computed = 0; + for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { + serial_master_buffer[i] = serial_read_byte(); + sync_send(); + checksum_computed += ROW_MASK & serial_master_buffer[i]; + } + matrix_row_t checksum_received = serial_read_byte(); + sync_send(); + + serial_input(); // end transaction + + if ( checksum_computed != checksum_received ) { + status |= SLAVE_DATA_CORRUPT; + } else { + status &= ~SLAVE_DATA_CORRUPT; + } +} + +inline +bool serial_slave_DATA_CORRUPT(void) { + return status & SLAVE_DATA_CORRUPT; +} + +// Copies the serial_slave_buffer to the master and sends the +// serial_master_buffer to the slave. +// +// Returns: +// 0 => no error +// 1 => slave did not respond +int serial_update_buffers(void) { + // this code is very time dependent, so we need to disable interrupts + cli(); + + // signal to the slave that we want to start a transaction + serial_output(); + serial_low(); + _delay_us(1); + + // wait for the slaves response + serial_input(); + serial_high(); + _delay_us(SERIAL_DELAY); + + // check if the slave is present + if (serial_read_pin()) { + // slave failed to pull the line low, assume not present + sei(); + return 1; + } + + // if the slave is present syncronize with it + sync_recv(); + + matrix_row_t checksum_computed = 0; + // receive data from the slave + for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { + serial_slave_buffer[i] = serial_read_byte(); + sync_recv(); + checksum_computed += ROW_MASK & serial_slave_buffer[i]; + } + matrix_row_t checksum_received = serial_read_byte(); + sync_recv(); + + if (checksum_computed != checksum_received) { + sei(); + return 1; + } + + matrix_row_t checksum = 0; + // send data to the slave + for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { + serial_write_byte(serial_master_buffer[i]); + sync_recv(); + checksum += ROW_MASK & serial_master_buffer[i]; + } + serial_write_byte(checksum); + sync_recv(); + + // always, release the line when not in use + serial_output(); + serial_high(); + + sei(); + return 0; +} + +#endif diff --git a/keyboards/bfo9000/serial.h b/keyboards/bfo9000/serial.h new file mode 100644 index 000000000000..62761945721b --- /dev/null +++ b/keyboards/bfo9000/serial.h @@ -0,0 +1,27 @@ +#ifndef MY_SERIAL_H +#define MY_SERIAL_H + +#include "config.h" +#include "matrix.h" +#include + +/* TODO: some defines for interrupt setup */ +#define SERIAL_PIN_DDR DDRD +#define SERIAL_PIN_PORT PORTD +#define SERIAL_PIN_INPUT PIND +#define SERIAL_PIN_MASK _BV(PD0) +#define SERIAL_PIN_INTERRUPT INT0_vect + +#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +#define SERIAL_MASTER_BUFFER_LENGTH 1 + +// Buffers for master - slave communication +extern volatile matrix_row_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; +extern volatile matrix_row_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; + +void serial_master_init(void); +void serial_slave_init(void); +int serial_update_buffers(void); +bool serial_slave_data_corrupt(void); + +#endif diff --git a/keyboards/bfo9000/split_util.c b/keyboards/bfo9000/split_util.c new file mode 100644 index 000000000000..7f200e6c9420 --- /dev/null +++ b/keyboards/bfo9000/split_util.c @@ -0,0 +1,86 @@ +#include +#include +#include +#include +#include +#include +#include "split_util.h" +#include "matrix.h" +#include "keyboard.h" +#include "config.h" +#include "timer.h" + +#ifdef USE_I2C +# include "i2c.h" +#else +# include "serial.h" +#endif + +volatile bool isLeftHand = true; + +static void setup_handedness(void) { + #ifdef EE_HANDS + isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); + #else + // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c + #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) + isLeftHand = !has_usb(); + #else + isLeftHand = has_usb(); + #endif + #endif +} + +static void keyboard_master_setup(void) { +#ifdef USE_I2C + i2c_master_init(); +#ifdef SSD1306OLED + matrix_master_OLED_init(); +#endif +#else + serial_master_init(); +#endif +} + +static void keyboard_slave_setup(void) { + timer_init(); +#ifdef USE_I2C + i2c_slave_init(SLAVE_I2C_ADDRESS); +#else + serial_slave_init(); +#endif +} + +bool has_usb(void) { + USBCON |= (1 << OTGPADE); //enables VBUS pad + _delay_us(5); + return (USBSTA & (1< +#include "eeconfig.h" + +#define SLAVE_I2C_ADDRESS 0x32 + +extern volatile bool isLeftHand; + +// slave version of matix scan, defined in matrix.c +void matrix_slave_scan(void); + +void split_keyboard_setup(void); +bool has_usb(void); +void keyboard_slave_loop(void); + +void matrix_master_OLED_init (void); + +#endif diff --git a/keyboards/bigseries/bigseries.c b/keyboards/bigseries/bigseries.c new file mode 100755 index 000000000000..0ef84478b31a --- /dev/null +++ b/keyboards/bigseries/bigseries.c @@ -0,0 +1,26 @@ +/* +Copyright 2018 Cole Markham + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include "bigseries.h" + +void matrix_scan_kb(void) { + // Looping keyboard code goes here + // This runs every cycle (a lot) + matrix_scan_user(); +#ifdef BACKLIGHT_ENABLE + backlight_task(); +#endif +}; diff --git a/keyboards/bigseries/bigseries.h b/keyboards/bigseries/bigseries.h new file mode 100755 index 000000000000..34414077986a --- /dev/null +++ b/keyboards/bigseries/bigseries.h @@ -0,0 +1,28 @@ +/* +Copyright 2018 Cole Markham + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#ifndef BIGSWITCH_H +#define BIGSWITCH_H + +#include "quantum.h" + +#define LAYOUT( \ + K00 \ +) { \ + { K00 } \ +} + +#endif diff --git a/keyboards/bigseries/config.h b/keyboards/bigseries/config.h new file mode 100755 index 000000000000..3c401f563ba8 --- /dev/null +++ b/keyboards/bigseries/config.h @@ -0,0 +1,59 @@ +/* +Copyright 2018 Cole Markham + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6071 +#define DEVICE_VER 0x0002 +#define MANUFACTURER WoodKeys.click +#define PRODUCT BigSeries Single Keyboard +#define DESCRIPTION Single key board for Novelkeys Big Series Switch + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 1 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B0 } +#define MATRIX_COL_PINS { B4 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 50 + +/* key combination for command */ +#define IS_COMMAND() ( \ + false \ +) + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + +#ifdef RGBLIGHT_ENABLE +#define RGB_DI_PIN D3 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 5 +#endif + +#endif diff --git a/keyboards/bigseries/info.json b/keyboards/bigseries/info.json new file mode 100644 index 000000000000..ff2fd54c575f --- /dev/null +++ b/keyboards/bigseries/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Big Series 1-Key", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0, "w":4, "h":4}] + } + } +} diff --git a/keyboards/bigseries/keymaps/8ball/keymap.c b/keyboards/bigseries/keymaps/8ball/keymap.c new file mode 100755 index 000000000000..1097eb94afa1 --- /dev/null +++ b/keyboards/bigseries/keymaps/8ball/keymap.c @@ -0,0 +1,144 @@ +/* +Copyright 2018 Cole Markham + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +static const char * const ANSWERS[] = { +// "Yes" answers +"It is certain\n", +"It is decidedly so\n", +"Without a doubt\n", +"Yes definitely\n", +"You may rely on it\n", +"As I see it, yes\n", +"Most likely\n", +"Outlook good\n", +"Yes\n", +"Signs point to yes\n", +// Uncertain answers, index 10 +"Reply hazy try again\n", +"Ask again later\n", +"Better not tell you now\n", +"Cannot predict now\n", +"Concentrate and ask again\n", +// "No" answers, index 15 +"Don't count on it\n", +"My reply is no\n", +"My sources say no\n", +"Outlook not so good\n", +"Very doubtful\n" +}; + +#define UNCERTAIN_BREAK 10 +#define NO_BREAK 15 +#define NUM_ANSWERS 20 +// Timeout of answer color in ms +#define ANSWER_TIMEOUT 3000 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +LAYOUT( + KC_A), +}; + + +void reset_rgb(void); + +bool initialized = 0; +uint32_t lastTime = 0; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + return MACRO_NONE ; +} + +void matrix_init_user(void) { + if (!initialized){ + dprintf("Initializing in matrix_scan_user"); + rgblight_enable(); + reset_rgb(); + initialized = 1; + } +} + +void matrix_scan_user(void) { + if (lastTime > 0 && timer_elapsed32(lastTime) > ANSWER_TIMEOUT) { + lastTime = 0; + reset_rgb(); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_A: + if (record->event.pressed) { + uint8_t num = rand() / (RAND_MAX / NUM_ANSWERS + 1); + rgblight_mode(1); + if (num < UNCERTAIN_BREAK) { + rgblight_setrgb_green(); + } else if (num < NO_BREAK) { + rgblight_setrgb_yellow(); + } else { + rgblight_setrgb_red(); + } + send_string(ANSWERS[num]); + lastTime = timer_read32(); + return false; + } + } + return true; +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} + +void reset_rgb(void) { + // This gets called on init and after the timeout for the answer color + // If you want to change the default color/mode, do it here + rgblight_sethsv_blue(); + rgblight_mode(7); +} diff --git a/keyboards/bigseries/keymaps/default/keymap.c b/keyboards/bigseries/keymaps/default/keymap.c new file mode 100755 index 000000000000..7ce837357f13 --- /dev/null +++ b/keyboards/bigseries/keymaps/default/keymap.c @@ -0,0 +1,93 @@ +/* +Copyright 2018 Cole Markham + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +LAYOUT( + KC_A), + + +}; + + +bool initialized = 0; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + return MACRO_NONE ; +} + +void matrix_init_user(void) { + if (!initialized){ + dprintf("Initializing in matrix_scan_user"); + rgblight_enable(); + rgblight_mode(7); + rgblight_sethsv(0,255,255); + rgblight_setrgb(0x00, 0x00, 0xFF); + initialized = 1; + } +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_A: + if (record->event.pressed) { + SEND_STRING("Howdy!!\n"); + rgblight_step(); + return false; + } + } + return true; +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} diff --git a/keyboards/bigseries/keymaps/leddance/config.h b/keyboards/bigseries/keymaps/leddance/config.h new file mode 100644 index 000000000000..57398fb996ba --- /dev/null +++ b/keyboards/bigseries/keymaps/leddance/config.h @@ -0,0 +1,23 @@ +/* +Copyright 2018 Cole Markham + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#define TAPPING_TERM 400 + +#endif diff --git a/keyboards/bigseries/keymaps/leddance/keymap.c b/keyboards/bigseries/keymaps/leddance/keymap.c new file mode 100755 index 000000000000..3cd8f1db7f12 --- /dev/null +++ b/keyboards/bigseries/keymaps/leddance/keymap.c @@ -0,0 +1,127 @@ +/* +Copyright 2018 Cole Markham + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + + +extern rgblight_config_t rgblight_config; + +enum custom_keycodes { + BL = SAFE_RANGE +}; + +enum custom_layers { + BASE = 0, + LED +}; + +//Tap Dance Declarations +enum { + TD_TOGGLE = 0 +}; + +void dance_toggle (qk_tap_dance_state_t *state, void *user_data) { + if (state->count >= 2) { + println("Double tapped, switching layers"); + if (layer_state_is(LED)) { + layer_off(LED); + } else { + layer_on(LED); + } + } else { + print("Single tapped: "); + if (layer_state_is(LED)) { +#ifdef RGBLIGHT_ENABLE + if (!rgblight_config.enable) { + rgblight_enable(); + } + rgblight_step(); +#endif + } else { + println("Base layer, sending string"); + SEND_STRING("This thing is BIG!!\n"); + } + } +} + +//Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_TOGGLE] = ACTION_TAP_DANCE_FN(dance_toggle) +// Other declarations would go here, separated by commas, if you have them +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[BASE] = LAYOUT( + TD(TD_TOGGLE)), +[LED] = LAYOUT( + TD(TD_TOGGLE) + ) + + +}; + + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + return MACRO_NONE ; +} + + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // Nothing here, see dance_toggle + return true; +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} diff --git a/keyboards/bigseries/keymaps/leddance/rules.mk b/keyboards/bigseries/keymaps/leddance/rules.mk new file mode 100644 index 000000000000..1ba2fa8fbefa --- /dev/null +++ b/keyboards/bigseries/keymaps/leddance/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes \ No newline at end of file diff --git a/keyboards/bigseries/readme.md b/keyboards/bigseries/readme.md new file mode 100644 index 000000000000..528df0de0922 --- /dev/null +++ b/keyboards/bigseries/readme.md @@ -0,0 +1,15 @@ +# Big Series Keyboard + +![Big Series 1-Key](https://woodkeys.click/wp-content/uploads/2017/12/woodkeys_419.jpg) + +A PCB for the Big Series Switch by [NovelKeys](https://novelkeys.xyz). Available in 1, 2, 3, and 4 switch versions from [Woodkeys.click](https://woodkeys.click/product-category/big-series/). + +Keyboard Maintainer: [Cole Markham](https://github.com/colemarkham) / [Woodkeys.click](https://woodkeys.click) +Hardware Supported: Big Series PCBs +Hardware Availability: [Woodkeys.click](https://woodkeys.click), [NovelKeys](https://novelkeys.xyz) + +Make example for this keyboard (after setting up your build environment): + + make bigseries:default + +See [build environment setup](https://docs.qmk.fm/install-build-tools) then the [make instructions](https://docs.qmk.fm/build-compile-instructions) for more information. diff --git a/keyboards/bigseries/rules.mk b/keyboards/bigseries/rules.mk new file mode 100755 index 000000000000..4cac07f72532 --- /dev/null +++ b/keyboards/bigseries/rules.mk @@ -0,0 +1,59 @@ +#SRC += rgb_backlight.c + +# MCU name +MCU = atmega32u2 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled +AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below +RGBLIGHT_ENABLE = yes # This can be enabled if a ws2812 strip is connected to the expansion port. + diff --git a/keyboards/bigswitch/README.md b/keyboards/bigswitch/README.md new file mode 100644 index 000000000000..2679a0aec5fa --- /dev/null +++ b/keyboards/bigswitch/README.md @@ -0,0 +1,10 @@ +Big Switch PCB by flehrad +========================= + +Designed by Don of the Board Podcast and sold as a kit by [keeb.io](https://keeb.io/collections/frontpage/products/big-switch-pcb?variant=7507922845726) + +### Technical Specifications + + * Uses a atmega32u4 pro micro or pin compatible MCU + * Pins B5 and B6 connect to the pins on the Big Switch + * Optionally you may add a RGB strip to pin D3 for data and take power from VCC and GND diff --git a/keyboards/bigswitch/bigswitch.c b/keyboards/bigswitch/bigswitch.c new file mode 100644 index 000000000000..dfd9710e2713 --- /dev/null +++ b/keyboards/bigswitch/bigswitch.c @@ -0,0 +1,33 @@ +/* +Copyright 2018 QMK Contributors + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include "bigswitch.h" + +volatile uint8_t runonce = true; +static uint16_t my_timer; + +void matrix_init_user(void) { + my_timer = timer_read(); +} + +void matrix_scan_user(void) { + if (runonce && timer_elapsed(my_timer) > 1000) { + runonce = false; + rgblight_sethsv_noeeprom(0x0, 0xff, 0x80); + rgblight_mode_noeeprom(9); + rgblight_enable_noeeprom(); + } +} diff --git a/keyboards/bigswitch/bigswitch.h b/keyboards/bigswitch/bigswitch.h new file mode 100755 index 000000000000..ea3d51a1f3b7 --- /dev/null +++ b/keyboards/bigswitch/bigswitch.h @@ -0,0 +1,28 @@ +/* +Copyright 2018 QMK Contributors + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#ifndef BIGSWITCH_H +#define BIGSWITCH_H + +#include "quantum.h" + +#define LAYOUT( \ + K00 \ +) { \ + { K00 } \ +} + +#endif diff --git a/keyboards/bigswitch/config.h b/keyboards/bigswitch/config.h new file mode 100755 index 000000000000..cc290fd79b1b --- /dev/null +++ b/keyboards/bigswitch/config.h @@ -0,0 +1,59 @@ +/* +Copyright 2018 QMK Contributors + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x1209 +#define PRODUCT_ID 0xB195 +#define DEVICE_VER 0x0001 +#define MANUFACTURER flehrad +#define PRODUCT BigSwitch PCB +#define DESCRIPTION A single key board for Novelkeys Big Switch + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 1 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B5 } +#define MATRIX_COL_PINS { B6 } +#define UNUSED_PINS { } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 50 + +/* key combination for command */ +#define IS_COMMAND() ( \ + false \ +) + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + +#ifdef RGBLIGHT_ENABLE +#define RGB_DI_PIN D3 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 8 +#endif + +#endif diff --git a/keyboards/bigswitch/info.json b/keyboards/bigswitch/info.json new file mode 100644 index 000000000000..8d3d746f5771 --- /dev/null +++ b/keyboards/bigswitch/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Bigswitch PCB", + "url": "", + "maintainer": "qmk", + "bootloader": "", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0, "w":4, "h":4}] + } + } +} diff --git a/keyboards/bigswitch/keymaps/default/keymap.c b/keyboards/bigswitch/keymaps/default/keymap.c new file mode 100755 index 000000000000..210d001236c7 --- /dev/null +++ b/keyboards/bigswitch/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* +Copyright 2018 QMK Contributors + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H +#define KC_OSX_EJECT 0x66 +#define LOCK_OSX LSFT(LCTL(KC_OSX_EJECT)) +#define SLEEP_OSX LALT(LGUI(KC_OSX_EJECT)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +LAYOUT(SLEEP_OSX), + +}; diff --git a/keyboards/bigswitch/rules.mk b/keyboards/bigswitch/rules.mk new file mode 100755 index 000000000000..e4e72f09a2ea --- /dev/null +++ b/keyboards/bigswitch/rules.mk @@ -0,0 +1,60 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Bootloader +BOOTLOADER = caterina + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled +AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below +RGBLIGHT_ENABLE = yes # This can be enabled if a ws2812 strip is connected to the expansion port. + diff --git a/keyboards/bmini/bmini.h b/keyboards/bmini/bmini.h index 65ffbe94797b..9a70f9204609 100644 --- a/keyboards/bmini/bmini.h +++ b/keyboards/bmini/bmini.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT( \ K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \ K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \ K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \ @@ -38,7 +38,7 @@ along with this program. If not, see . { K07, K17, K27, K37, K47, K57, K67, K77, KC_NO, KC_NO, KA7, KB7, KC7, KD7, KE7 } \ } -#define KC_KEYMAP( \ +#define LAYOUT_kc( \ K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \ K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \ K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \ diff --git a/keyboards/bmini/info.json b/keyboards/bmini/info.json new file mode 100644 index 000000000000..a047a3ef582c --- /dev/null +++ b/keyboards/bmini/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "B.mini", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT": { + "key_count": 84, + "layout": [{"label":"K05", "x":0, "y":0}, {"label":"K25", "x":1, "y":0}, {"label":"K35", "x":2, "y":0}, {"label":"K45", "x":3, "y":0}, {"label":"K55", "x":4, "y":0}, {"label":"K06", "x":5, "y":0}, {"label":"KA6", "x":6, "y":0}, {"label":"KA7", "x":7, "y":0}, {"label":"K07", "x":8, "y":0}, {"label":"KB5", "x":9, "y":0}, {"label":"KC5", "x":10, "y":0}, {"label":"KD5", "x":11, "y":0}, {"label":"KE5", "x":12, "y":0}, {"label":"KD1", "x":13, "y":0}, {"label":"KE1", "x":14, "y":0}, {"label":"KE2", "x":15, "y":0}, {"label":"K04", "x":0, "y":1}, {"label":"K14", "x":1, "y":1}, {"label":"K24", "x":2, "y":1}, {"label":"K34", "x":3, "y":1}, {"label":"K44", "x":4, "y":1}, {"label":"K54", "x":5, "y":1}, {"label":"K16", "x":6, "y":1}, {"label":"KB6", "x":7, "y":1}, {"label":"KB7", "x":8, "y":1}, {"label":"K17", "x":9, "y":1}, {"label":"KA4", "x":10, "y":1}, {"label":"KB4", "x":11, "y":1}, {"label":"KC4", "x":12, "y":1}, {"label":"KE4", "x":13, "y":1, "w":2}, {"label":"KD0", "x":15, "y":1}, {"label":"K03", "x":0, "y":2, "w":1.5}, {"label":"K13", "x":1.5, "y":2}, {"label":"K23", "x":2.5, "y":2}, {"label":"K33", "x":3.5, "y":2}, {"label":"K43", "x":4.5, "y":2}, {"label":"K53", "x":5.5, "y":2}, {"label":"K26", "x":6.5, "y":2}, {"label":"KC6", "x":7.5, "y":2}, {"label":"KC7", "x":8.5, "y":2}, {"label":"K27", "x":9.5, "y":2}, {"label":"KA3", "x":10.5, "y":2}, {"label":"KB3", "x":11.5, "y":2}, {"label":"KC3", "x":12.5, "y":2}, {"label":"KD3", "x":13.5, "y":2, "w":1.5}, {"label":"K67", "x":15, "y":2}, {"label":"K02", "x":0, "y":3, "w":1.75}, {"label":"K12", "x":1.75, "y":3}, {"label":"K22", "x":2.75, "y":3}, {"label":"K32", "x":3.75, "y":3}, {"label":"K42", "x":4.75, "y":3}, {"label":"K52", "x":5.75, "y":3}, {"label":"K36", "x":6.75, "y":3}, {"label":"KD6", "x":7.75, "y":3}, {"label":"KD7", "x":8.75, "y":3}, {"label":"K37", "x":9.75, "y":3}, {"label":"KA2", "x":10.75, "y":3}, {"label":"KB2", "x":11.75, "y":3}, {"label":"KD2", "x":12.75, "y":3, "w":2.25}, {"label":"KE0", "x":15, "y":3}, {"label":"K01", "x":0, "y":4, "w":2.25}, {"label":"K11", "x":2.25, "y":4}, {"label":"K21", "x":3.25, "y":4}, {"label":"K31", "x":4.25, "y":4}, {"label":"K41", "x":5.25, "y":4}, {"label":"K51", "x":6.25, "y":4}, {"label":"K46", "x":7.25, "y":4}, {"label":"KE6", "x":8.25, "y":4}, {"label":"KE7", "x":9.25, "y":4}, {"label":"K47", "x":10.25, "y":4}, {"label":"KA1", "x":11.25, "y":4}, {"label":"KB1", "x":12.25, "y":4, "w":1.75}, {"label":"K86", "x":14, "y":4}, {"label":"K77", "x":15, "y":4}, {"label":"K00", "x":0, "y":5, "w":1.25}, {"label":"K10", "x":1.25, "y":5, "w":1.25}, {"label":"K20", "x":2.5, "y":5, "w":1.25}, {"label":"K56", "x":3.75, "y":5, "w":6.25}, {"label":"K57", "x":10, "y":5}, {"label":"KB0", "x":11, "y":5}, {"label":"KC0", "x":12, "y":5}, {"label":"K66", "x":13, "y":5}, {"label":"K76", "x":14, "y":5}, {"label":"K96", "x":15, "y":5}] + } + } +} diff --git a/keyboards/bmini/keymaps/default/keymap.c b/keyboards/bmini/keymaps/default/keymap.c index 5c52e1d9b687..1f9e229812c0 100644 --- a/keyboards/bmini/keymaps/default/keymap.c +++ b/keyboards/bmini/keymaps/default/keymap.c @@ -15,10 +15,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "bmini.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( + [0] = LAYOUT( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_HOME,KC_END, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, KC_DEL, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, KC_INS, @@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, KC_PGDN, KC_LCTL,KC_LALT,KC_LGUI, KC_SPC, KC_RGUI,KC_RALT,KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT ), - [1] = KEYMAP( + [1] = LAYOUT( KC_TRNS,RGB_TOG,RGB_MOD,RGB_HUI,RGB_SAI,RGB_VAI,RGB_HUD,RGB_SAD,RGB_VAD,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_END, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_DEL, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_INS, diff --git a/keyboards/bmini/readme.md b/keyboards/bmini/readme.md index fc39e7c57b5b..01017e175c21 100644 --- a/keyboards/bmini/readme.md +++ b/keyboards/bmini/readme.md @@ -3,9 +3,9 @@ B.mini A 75% keyboard with RGB -Keyboard Maintainer: QMK Community -Hardware Supported: B.mini PCB -Hardware Availability: http://winkeyless.kr/product/b-mini-x2-pcb/ +Keyboard Maintainer: QMK Community +Hardware Supported: B.mini PCB +Hardware Availability: http://winkeyless.kr/product/b-mini-x2-pcb/ Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/ca66/ca66.c b/keyboards/ca66/ca66.c new file mode 100644 index 000000000000..6f24a895f5d3 --- /dev/null +++ b/keyboards/ca66/ca66.c @@ -0,0 +1,30 @@ +#include "ca66.h" +#include "config.h" + +void bootmagic_lite(void) +{ + // The lite version of TMK's bootmagic. + // 100% less potential for accidentally making the + // keyboard do stupid things. + + // We need multiple scans because debouncing can't be turned off. + matrix_scan(); + wait_ms(DEBOUNCING_DELAY); + matrix_scan(); + + // If the Esc (matrix 0,0) is held down on power up, + // reset the EEPROM valid state and jump to bootloader. + if ( matrix_get_row(0) & (1<<0) ) + { + // Set the TMK/QMK EEPROM state as invalid. + eeconfig_disable(); + // Jump to bootloader. + bootloader_jump(); + } +} + +void matrix_init_kb(void) +{ + bootmagic_lite(); + matrix_init_user(); +} diff --git a/keyboards/ca66/ca66.h b/keyboards/ca66/ca66.h new file mode 100644 index 000000000000..0f91a1238df5 --- /dev/null +++ b/keyboards/ca66/ca66.h @@ -0,0 +1,20 @@ +#ifndef KB_H +#define KB_H + +#include "quantum.h" + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K114, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K214, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K314, \ + 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 000000000000..f00b5109d750 --- /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/info.json b/keyboards/ca66/info.json new file mode 100644 index 000000000000..906709ef1b88 --- /dev/null +++ b/keyboards/ca66/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "CA66", + "url": "", + "maintainer": "qmk", + "width": 16.5, + "height": 5.25, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.5, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15.5, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15.5, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":15.5, "y":3}, {"x":14.25, "y":3.25}, {"x":0, "y":4, "w":1.25}, {"x":2.25, "y":4}, {"x":3.25, "y":4, "w":1.25}, {"x":4.5, "y":4, "w":2.25}, {"x":6.75, "y":4, "w":2.75}, {"x":9.5, "y":4, "w":1.25}, {"x":10.75, "y":4}, {"x":11.75, "y":4, "w":1.25}, {"x":13.25, "y":4.25}, {"x":14.25, "y":4.25}, {"x":15.25, "y":4.25}] + } + } +} diff --git a/keyboards/ca66/keymaps/default/keymap.c b/keyboards/ca66/keymaps/default/keymap.c new file mode 100644 index 000000000000..5a3c4c86231b --- /dev/null +++ b/keyboards/ca66/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_PSCR, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_GRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, LT(1, KC_SPC), KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, RGB_TOG, + KC_CAPS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, RGB_MOD, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, KC_INS, KC_HOME, + 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/keymaps/olivia/keymap.c b/keyboards/ca66/keymaps/olivia/keymap.c new file mode 100644 index 000000000000..f27824e57aa0 --- /dev/null +++ b/keyboards/ca66/keymaps/olivia/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGDN, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_DEL, + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1), + KC_NO, KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_NO, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT), + + LAYOUT( + KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, RESET, + KC_CAPS, RGB_RMOD,RGB_SMOD,RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_TOG, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRD |= (1 << 1); PORTD &= ~(1 << 1); + } else { + DDRD &= ~(1 << 1); PORTD &= ~(1 << 1); + } +} diff --git a/keyboards/ca66/readme.md b/keyboards/ca66/readme.md new file mode 100644 index 000000000000..f8464fdd19d3 --- /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 000000000000..d3ad3d20c633 --- /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/canoe/canoe.c b/keyboards/canoe/canoe.c new file mode 100644 index 000000000000..bc69df2e5ee2 --- /dev/null +++ b/keyboards/canoe/canoe.c @@ -0,0 +1,65 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "canoe.h" +#ifdef BACKLIGHT_ENABLE +#include "backlight.h" +#endif +#ifdef RGBLIGHT_ENABLE +#include "i2c.h" +#include "rgblight.h" +#endif + +#ifdef BACKLIGHT_ENABLE +void backlight_set(uint8_t level) { + if (level == 0) { + // Turn out the lights + PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); + } else { + // Turn on the lights + PORTD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); + } +} + +void backlight_init_ports(void) { + DDRD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); + PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); +} + +#endif + +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; + +void rgblight_set(void) { + if (!rgblight_config.enable) { + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; + } + } + + i2c_init(); + i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { + rgblight_task(); +} +#endif diff --git a/keyboards/canoe/canoe.h b/keyboards/canoe/canoe.h new file mode 100644 index 000000000000..5658eb1b4ade --- /dev/null +++ b/keyboards/canoe/canoe.h @@ -0,0 +1,54 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CANOE_H +#define CANOE_H + +#include "quantum.h" + +#define LAYOUT_iso( \ + K0D, K0C, K0B, K0A, K09, K08, K07, K06, K05, K04, K03, K02, K01, K00, K0E, \ + K1D, K1C, K1B, K1A, K19, K18, K17, K16, K15, K14, K13, K12, K11, K1E, \ + K2D, K2C, K2B, K2A, K29, K28, K27, K26, K25, K24, K23, K22, K10, K21, K2E, \ + K3D, K4A, K3C, K3B, K3A, K39, K38, K37, K36, K35, K34, K33, K32, K30, K3E, \ + K4D, K4C, K4B, K48, K44, K43, K42, K40, K4E \ +){ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { KC_NO, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, K43, K44, KC_NO, KC_NO, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D, K4E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ +} + +#define LAYOUT( \ + KD0, KC0, KB0, KA0, K90, K80, K70, K60, K50, K40, K30, K20, K10, K00, KE0, \ + KD1, KC1, KB1, KA1, K91, K81, K71, K61, K51, K41, K31, K21, K11, K01, KE1, \ + KD2, KC2, KB2, KA2, K92, K82, K72, K62, K52, K42, K32, K22, K12, KE2, \ + KD3, KC3, KB3, KA3, K93, K83, K73, K63, K53, K43, K33, K23, K03, KE3, \ + KD4, KC4, KB4, K84, K44, K34, K24, K04, KE4 \ +){ \ + { K00, K10, K20, K30, K40, K50, K60, K70, K80, K90, KA0, KB0, KC0, KD0, KE0 }, \ + { K01, K11, K21, K31, K41, K51, K61, K71, K81, K91, KA1, KB1, KC1, KD1, KE1 }, \ + { KC_NO, K12, K22, K32, K42, K52, K62, K72, K82, K92, KA2, KB2, KC2, KD2, KE2 }, \ + { K03, KC_NO, K23, K33, K43, K53, K63, K73, K83, K93, KA3, KB3, KC3, KD3, KE3 }, \ + { K04, KC_NO, K24, K34, K44, KC_NO, KC_NO, KC_NO, K84, KC_NO, KC_NO, KB4, KC4, KD4, KE4 } \ +} + +#endif diff --git a/keyboards/canoe/config.h b/keyboards/canoe/config.h new file mode 100644 index 000000000000..0e70094ae8b2 --- /dev/null +++ b/keyboards/canoe/config.h @@ -0,0 +1,49 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CANOE_CONFIG_H +#define CANOE_CONFIG_H + +#include "config_common.h" + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +#define MANUFACTURER NotActuallyPercent +#define PRODUCT CANOE + +#define RGBLED_NUM 2 + +#define MATRIX_ROWS 8 +#define MATRIX_COLS 15 + +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, C1 } +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCING_DELAY 5 + +#define NO_BACKLIGHT_CLOCK +#define BACKLIGHT_LEVELS 1 +#define RGBLIGHT_ANIMATIONS + +#define NO_UART 1 + +/* key combination for command */ +#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +#endif diff --git a/keyboards/canoe/i2c.c b/keyboards/canoe/i2c.c new file mode 100644 index 000000000000..a4f95213524f --- /dev/null +++ b/keyboards/canoe/i2c.c @@ -0,0 +1,106 @@ +/* +Copyright 2016 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +// Please do not modify this file + +#include +#include + +#include "i2c.h" + +void i2c_set_bitrate(uint16_t bitrate_khz) { + uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); + if (bitrate_div >= 16) { + bitrate_div = (bitrate_div - 16) / 2; + } + TWBR = bitrate_div; +} + +void i2c_init(void) { + // set pull-up resistors on I2C bus pins + PORTC |= 0b11; + + i2c_set_bitrate(400); + + // enable TWI (two-wire interface) + TWCR |= (1 << TWEN); + + // enable TWI interrupt and slave address ACK + TWCR |= (1 << TWIE); + TWCR |= (1 << TWEA); +} + +uint8_t i2c_start(uint8_t address) { + // reset TWI control register + TWCR = 0; + + // begin transmission and wait for it to end + TWCR = (1< + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +// Please do not modify this file + +#ifndef __I2C_H__ +#define __I2C_H__ + +void i2c_init(void); +void i2c_set_bitrate(uint16_t bitrate_khz); +uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); + +#endif diff --git a/keyboards/canoe/info.json b/keyboards/canoe/info.json new file mode 100644 index 000000000000..ddabae88c43d --- /dev/null +++ b/keyboards/canoe/info.json @@ -0,0 +1,394 @@ +{ + "keyboard_name": "canoe", + "maintainer": "qmk", + "url": "", + "height": 8, + "width": 15, + "layouts": { + "LAYOUT_iso": { + "key_count": 68, + "layout": [ + { + "label": "Esc", + "x": 0, + "y": 0 + }, + { + "label": "!", + "x": 1, + "y": 0 + }, + { + "label": "@", + "x": 2, + "y": 0 + }, + { + "label": "#", + "x": 3, + "y": 0 + }, + { + "label": "$", + "x": 4, + "y": 0 + }, + { + "label": "%", + "x": 5, + "y": 0 + }, + { + "label": "^", + "x": 6, + "y": 0 + }, + { + "label": "&", + "x": 7, + "y": 0 + }, + { + "label": "*", + "x": 8, + "y": 0 + }, + { + "label": "(", + "x": 9, + "y": 0 + }, + { + "label": ")", + "x": 10, + "y": 0 + }, + { + "label": "_", + "x": 11, + "y": 0 + }, + { + "label": "+", + "x": 12, + "y": 0 + }, + { + "label": "Backspace", + "w": 2, + "x": 13, + "y": 0 + }, + { + "label": "Insert", + "x": 15, + "y": 0 + }, + { + "label": "Tab", + "w": 1.5, + "x": 0, + "y": 1 + }, + { + "label": "Q", + "x": 1.5, + "y": 1 + }, + { + "label": "W", + "x": 2.5, + "y": 1 + }, + { + "label": "E", + "x": 3.5, + "y": 1 + }, + { + "label": "R", + "x": 4.5, + "y": 1 + }, + { + "label": "T", + "x": 5.5, + "y": 1 + }, + { + "label": "Y", + "x": 6.5, + "y": 1 + }, + { + "label": "U", + "x": 7.5, + "y": 1 + }, + { + "label": "I", + "x": 8.5, + "y": 1 + }, + { + "label": "O", + "x": 9.5, + "y": 1 + }, + { + "label": "P", + "x": 10.5, + "y": 1 + }, + { + "label": "{", + "x": 11.5, + "y": 1 + }, + { + "label": "}", + "x": 12.5, + "y": 1 + }, + { + "ks": [ + [ + 0, + 0 + ], + [ + 1.5, + 0 + ], + [ + 1.5, + 2 + ], + [ + 0.25, + 2 + ], + [ + 0.25, + 1 + ], + [ + 0, + 1 + ], + [ + 0, + 0 + ] + ], + "label": "Enter", + "x": 13.5, + "y": 1 + }, + { + "label": "Delete", + "x": 15, + "y": 1 + }, + { + "label": "Caps Lock", + "w": 1.75, + "x": 0, + "y": 2 + }, + { + "label": "A", + "x": 1.75, + "y": 2 + }, + { + "label": "S", + "x": 2.75, + "y": 2 + }, + { + "label": "D", + "x": 3.75, + "y": 2 + }, + { + "label": "F", + "x": 4.75, + "y": 2 + }, + { + "label": "G", + "x": 5.75, + "y": 2 + }, + { + "label": "H", + "x": 6.75, + "y": 2 + }, + { + "label": "J", + "x": 7.75, + "y": 2 + }, + { + "label": "K", + "x": 8.75, + "y": 2 + }, + { + "label": "l", + "x": 9.75, + "y": 2 + }, + { + "label": ":", + "x": 10.75, + "y": 2 + }, + { + "label": "\"", + "x": 11.75, + "y": 2 + }, + { + "label": "\\", + "x": 12.75, + "y": 2 + }, + { + "label": "Home", + "x": 15, + "y": 2 + }, + { + "label": "Shift", + "w": 1.25, + "x": 0, + "y": 3 + }, + { + "label": "~", + "x": 1.25, + "y": 3 + }, + { + "label": "Z", + "x": 2.25, + "y": 3 + }, + { + "label": "X", + "x": 3.25, + "y": 3 + }, + { + "label": "C", + "x": 4.25, + "y": 3 + }, + { + "label": "V", + "x": 5.25, + "y": 3 + }, + { + "label": "B", + "x": 6.25, + "y": 3 + }, + { + "label": "N", + "x": 7.25, + "y": 3 + }, + { + "label": "M", + "x": 8.25, + "y": 3 + }, + { + "label": "<", + "x": 9.25, + "y": 3 + }, + { + "label": ">", + "x": 10.25, + "y": 3 + }, + { + "label": "?", + "x": 11.25, + "y": 3 + }, + { + "label": "Shift", + "w": 1.75, + "x": 12.25, + "y": 3 + }, + { + "label": "Up", + "x": 14, + "y": 3 + }, + { + "label": "Page Down", + "x": 14, + "y": 3 + }, + { + "label": "Control", + "w": 1.25, + "x": 0, + "y": 4 + }, + { + "label": "Win", + "w": 1.25, + "x": 1.25, + "y": 4 + }, + { + "label": "Alt", + "w": 1.25, + "x": 2.5, + "y": 4 + }, + { + "w": 6.25, + "x": 3.75, + "y": 4 + }, + { + "label": "Alt", + "w": 1.25, + "x": 10, + "y": 4 + }, + { + "label": "Fn0", + "w": 1.25, + "x": 11.25, + "y": 4 + }, + { + "label": "Left", + "x": 13, + "y": 4 + }, + { + "label": "Down", + "x": 14, + "y": 4 + }, + { + "label": "Right", + "x": 15, + "y": 4 + } + ] + } + } +} diff --git a/keyboards/canoe/keymaps/default/keymap.c b/keyboards/canoe/keymaps/default/keymap.c new file mode 100644 index 000000000000..fc6730847651 --- /dev/null +++ b/keyboards/canoe/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FL 1 + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BL] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PSCR, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_LEFT, KC_DOWN, KC_RIGHT), + + [_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_PAUS, \ + KC_TRNS, KC_NO, KC_UP, KC_NO, RGB_TOG,RGB_VAI,RGB_HUI,RGB_SAI,KC_INS, RESET, KC_PSCR, KC_SLCK, KC_PAUS, KC_BSLS, KC_SLCK, \ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,RGB_MOD,RGB_VAD,RGB_HUD,RGB_SAD,KC_NO, KC_NO, KC_F14, KC_F15, KC_INS, KC_HOME, \ + KC_LSFT, KC_MPRV, KC_MPLY, KC_MNXT,KC_NO, KC_NO, KC_NO, KC_MUTE,KC_VOLD, KC_VOLU, KC_NO, KC_RSFT, KC_PGUP, KC_END, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_HOME, KC_PGDOWN,KC_END) + +}; diff --git a/keyboards/canoe/keymaps/iso/keymap.c b/keyboards/canoe/keymaps/iso/keymap.c new file mode 100644 index 000000000000..89af719d1281 --- /dev/null +++ b/keyboards/canoe/keymaps/iso/keymap.c @@ -0,0 +1,29 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_iso( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUBS, KC_ENT, KC_END, + KC_LSFT, KC_NUHS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPACE, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT + ), +}; + diff --git a/keyboards/canoe/matrix.c b/keyboards/canoe/matrix.c new file mode 100644 index 000000000000..57aa36b5ff74 --- /dev/null +++ b/keyboards/canoe/matrix.c @@ -0,0 +1,106 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include +#include + +#include "matrix.h" + +#ifndef DEBOUNCE +#define DEBOUNCE 5 +#endif + +static uint8_t debouncing = DEBOUNCE; + +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +void matrix_init(void) { + // all outputs for rows high + DDRB = 0xFF; + PORTB = 0xFF; + // all inputs for columns + DDRA = 0x00; + DDRC &= ~(0x111111<<2); + DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); + x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); + x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); + return x; +} + +uint8_t matrix_scan(void) { + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + matrix_set_row_status(row); + _delay_us(5); + + matrix_row_t cols = ( + // cols 0..7, PORTA 0 -> 7 + (~PINA) & 0xFF + ) | ( + // cols 8..13, PORTC 7 -> 0 + bit_reverse((~PINC) & 0xFF) << 8 + ) | ( + // col 14, PORTD 7 + ((~PIND) & (1 << PIND7)) << 7 + ); + + if (matrix_debouncing[row] != cols) { + matrix_debouncing[row] = cols; + debouncing = DEBOUNCE; + } + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = matrix_debouncing[i]; + } + } + } + + matrix_scan_user(); + + return 1; +} + +inline matrix_row_t matrix_get_row(uint8_t row) { + return matrix[row]; +} + +void matrix_print(void) { +} diff --git a/keyboards/canoe/readme.md b/keyboards/canoe/readme.md new file mode 100644 index 000000000000..fa2bfbb3321b --- /dev/null +++ b/keyboards/canoe/readme.md @@ -0,0 +1,16 @@ +CANOE +======== + +A 65% keyboard with some RGB + +Keyboard Maintainer: QMK Community + +Hardware Supported: Canoe + +Hardware Availability: https://geekhack.org/index.php?topic=92418.0 + +Make example for this keyboard (after setting up your build environment): + + make canoe:default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/canoe/rules.mk b/keyboards/canoe/rules.mk new file mode 100644 index 000000000000..73c361e2a826 --- /dev/null +++ b/keyboards/canoe/rules.mk @@ -0,0 +1,50 @@ +# Copyright 2017 Luiz Ribeiro +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# MCU name +MCU = atmega32a +PROTOCOL = VUSB + +# unsupported features for now +NO_UART = yes +NO_SUSPEND_POWER_DOWN = yes + +# processor frequency +F_CPU = 12000000 + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = bootloadHID + +# build options +BOOTMAGIC_ENABLE = yes +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = yes +RGBLIGHT_CUSTOM_DRIVER = yes + +OPT_DEFS = -DDEBUG_LEVEL=0 + +# custom matrix setup +CUSTOM_MATRIX = yes +SRC = matrix.c i2c.c + +# programming options +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/canoe/usbconfig.h b/keyboards/canoe/usbconfig.h new file mode 100644 index 000000000000..d2d848fcdc8f --- /dev/null +++ b/keyboards/canoe/usbconfig.h @@ -0,0 +1,396 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#ifndef __usbconfig_h_included__ +#define __usbconfig_h_included__ + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 1 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_MAX_BUS_POWER 500 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' +#define USB_CFG_VENDOR_NAME_LEN 13 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B' +#define USB_CFG_DEVICE_NAME_LEN 8 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect + +#endif /* __usbconfig_h_included__ */ diff --git a/keyboards/chibios_test/chibios_test.h b/keyboards/chibios_test/chibios_test.h index 25b031771061..9fc996ff7554 100644 --- a/keyboards/chibios_test/chibios_test.h +++ b/keyboards/chibios_test/chibios_test.h @@ -3,4 +3,6 @@ #include "quantum.h" +#define LAYOUT(k00) {{ k00 }} + #endif /* KEYBOARDS_CHIBIOS_TEST_CHIBIOS_TEST_H_ */ diff --git a/keyboards/chibios_test/config.h b/keyboards/chibios_test/config.h index c32a77b37f72..89eb1f33b4d5 100644 --- a/keyboards/chibios_test/config.h +++ b/keyboards/chibios_test/config.h @@ -24,11 +24,9 @@ along with this program. If not, see . #define DEVICE_VER 0x0001 /* in python2: list(u"whatever".encode('utf-16-le')) */ /* at most 32 characters or the ugly hack in usb_main.c borks */ -#define MANUFACTURER "QMK" -#define USBSTR_MANUFACTURER 'T', '\x00', 'M', '\x00', 'K', '\x00', ' ', '\x00', '\xc6', '\x00' -#define PRODUCT "ChibiOS QMK test" -#define USBSTR_PRODUCT 'C', '\x00', 'h', '\x00', 'i', '\x00', 'b', '\x00', 'i', '\x00', 'O', '\x00', 'S', '\x00', ' ', '\x00', 'Q', '\x00', 'M', '\x00', 'K', '\x00', ' ', '\x00', 't', '\x00', 'e', '\x00', 's', '\x00', 't', '\x00' -#define DESCRIPTION "QMK keyboard firmware test for ChibiOS" +#define MANUFACTURER QMK +#define PRODUCT ChibiOS QMK test +#define DESCRIPTION QMK keyboard firmware test for ChibiOS /* key matrix size */ #define MATRIX_ROWS 1 diff --git a/keyboards/chibios_test/readme.md b/keyboards/chibios_test/readme.md new file mode 100644 index 000000000000..096ecd6aea47 --- /dev/null +++ b/keyboards/chibios_test/readme.md @@ -0,0 +1,3 @@ +# ChibiOS Test Keyboards + +Test code for several ARM based ChibiOS boards \ No newline at end of file diff --git a/keyboards/chibios_test/stm32_f072_onekey/halconf.h b/keyboards/chibios_test/stm32_f072_onekey/halconf.h index 1a450d632733..8b9724b1a30e 100644 --- a/keyboards/chibios_test/stm32_f072_onekey/halconf.h +++ b/keyboards/chibios_test/stm32_f072_onekey/halconf.h @@ -313,7 +313,7 @@ * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 256 +#define SERIAL_USB_BUFFERS_SIZE 1 #endif /*===========================================================================*/ diff --git a/keyboards/chibios_test/stm32_f072_onekey/readme.md b/keyboards/chibios_test/stm32_f072_onekey/readme.md new file mode 100644 index 000000000000..c5e504e49c7a --- /dev/null +++ b/keyboards/chibios_test/stm32_f072_onekey/readme.md @@ -0,0 +1,3 @@ +# ChibiOS Test + +Test code for the stm32_f072 one key keyboard \ No newline at end of file diff --git a/keyboards/chibios_test/stm32_f072_onekey/stm32_f072_onekey.h b/keyboards/chibios_test/stm32_f072_onekey/stm32_f072_onekey.h index 0455ad342fa1..345bf3bede31 100644 --- a/keyboards/chibios_test/stm32_f072_onekey/stm32_f072_onekey.h +++ b/keyboards/chibios_test/stm32_f072_onekey/stm32_f072_onekey.h @@ -1,5 +1,7 @@ #ifndef STM32_F072_ONEKEY_H #define STM32_F072_ONEKEY_H #include "chibios_test.h" -#endif +#define LAYOUT(k00) {{ k00 }} + +#endif diff --git a/keyboards/chibios_test/stm32_f103_onekey/halconf.h b/keyboards/chibios_test/stm32_f103_onekey/halconf.h index 1a450d632733..8b9724b1a30e 100644 --- a/keyboards/chibios_test/stm32_f103_onekey/halconf.h +++ b/keyboards/chibios_test/stm32_f103_onekey/halconf.h @@ -313,7 +313,7 @@ * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 256 +#define SERIAL_USB_BUFFERS_SIZE 1 #endif /*===========================================================================*/ diff --git a/keyboards/chibios_test/stm32_f103_onekey/readme.md b/keyboards/chibios_test/stm32_f103_onekey/readme.md new file mode 100644 index 000000000000..d375ef7d84bf --- /dev/null +++ b/keyboards/chibios_test/stm32_f103_onekey/readme.md @@ -0,0 +1,3 @@ +# ChibiOS Test + +Test code for the stm32_f103 one key keyboard \ No newline at end of file diff --git a/keyboards/chibios_test/stm32_f103_onekey/stm32_f103_onekey.h b/keyboards/chibios_test/stm32_f103_onekey/stm32_f103_onekey.h index 89a62b2bbe0f..b9ba65a9e99f 100644 --- a/keyboards/chibios_test/stm32_f103_onekey/stm32_f103_onekey.h +++ b/keyboards/chibios_test/stm32_f103_onekey/stm32_f103_onekey.h @@ -1,4 +1,7 @@ #ifndef STM32_F103_ONEKEY_H #define STM32_F103_ONEKEY_H #include "chibios_test.h" + +#define LAYOUT(k00) {{ k00 }} + #endif diff --git a/keyboards/chibios_test/teensy_lc_onekey/halconf.h b/keyboards/chibios_test/teensy_lc_onekey/halconf.h index 0436408b09c6..1b6f2adc2069 100644 --- a/keyboards/chibios_test/teensy_lc_onekey/halconf.h +++ b/keyboards/chibios_test/teensy_lc_onekey/halconf.h @@ -170,6 +170,172 @@ #define HAL_USE_WDG FALSE #endif +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + /*===========================================================================*/ /* USB driver related settings. */ /*===========================================================================*/ @@ -185,3 +351,4 @@ #endif /* _HALCONF_H_ */ /** @} */ + diff --git a/keyboards/chibios_test/teensy_lc_onekey/instructions.md b/keyboards/chibios_test/teensy_lc_onekey/instructions.md index 85698bd84181..66f73bf14b82 100644 --- a/keyboards/chibios_test/teensy_lc_onekey/instructions.md +++ b/keyboards/chibios_test/teensy_lc_onekey/instructions.md @@ -15,7 +15,7 @@ Next, you'll need ChibiOS. For Teensies, you'll need code from two repositories: ### If you’re using git -Run `git submodule sync —recursive && git submodule update --init —recursive`. This will install ChibiOS and ChibiOS-Contrib in the `/lib/` directory. +Run `git submodule sync --recursive && git submodule update --init --recursive`. This will install ChibiOS and ChibiOS-Contrib in the `/lib/` directory. ### If you’re not using Git diff --git a/keyboards/chibios_test/teensy_lc_onekey/readme.md b/keyboards/chibios_test/teensy_lc_onekey/readme.md new file mode 100644 index 000000000000..4f99113870d6 --- /dev/null +++ b/keyboards/chibios_test/teensy_lc_onekey/readme.md @@ -0,0 +1,3 @@ +# ChibiOS Test + +Test code for the teensy lc one key keyboard \ No newline at end of file diff --git a/keyboards/chibios_test/teensy_lc_onekey/teensy_lc_onekey.h b/keyboards/chibios_test/teensy_lc_onekey/teensy_lc_onekey.h index ea1c84e2f5a6..e94c13b663c6 100644 --- a/keyboards/chibios_test/teensy_lc_onekey/teensy_lc_onekey.h +++ b/keyboards/chibios_test/teensy_lc_onekey/teensy_lc_onekey.h @@ -1,4 +1,7 @@ #ifndef TEENSY_LC_ONEKEY_H #define TEENSY_LC_ONEKEY_H #include "chibios_test.h" + +#define LAYOUT(k00) {{ k00 }} + #endif diff --git a/keyboards/chimera_ergo/chimera_ergo.c b/keyboards/chimera_ergo/chimera_ergo.c new file mode 100644 index 000000000000..29470f90805b --- /dev/null +++ b/keyboards/chimera_ergo/chimera_ergo.c @@ -0,0 +1,31 @@ +#include "chimera_ergo.h" + +void uart_init(void) { + SERIAL_UART_INIT(); +} + +void led_init(void) { + DDRD |= (1<<1); + PORTD |= (1<<1); + DDRF |= (1<<4) | (1<<5); + PORTF |= (1<<4) | (1<<5); +} + + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + uart_init(); + led_init(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + matrix_scan_user(); +} + +void led_set_kb(uint8_t usb_led) { + +} diff --git a/keyboards/chimera_ergo/chimera_ergo.h b/keyboards/chimera_ergo/chimera_ergo.h new file mode 100644 index 000000000000..36525ac0006c --- /dev/null +++ b/keyboards/chimera_ergo/chimera_ergo.h @@ -0,0 +1,82 @@ +#ifndef CHIMERA_ERGO_H +#define CHIMERA_ERGO_H + +#include "quantum.h" +#include "matrix.h" +#include "backlight.h" +#include + +#define red_led_off PORTF |= (1<<5) +#define red_led_on PORTF &= ~(1<<5) +#define blu_led_off PORTF |= (1<<4) +#define blu_led_on PORTF &= ~(1<<4) +#define grn_led_off PORTD |= (1<<1) +#define grn_led_on PORTD &= ~(1<<1) + +#define set_led_off red_led_off; grn_led_off; blu_led_off +#define set_led_red red_led_on; grn_led_off; blu_led_off +#define set_led_blue red_led_off; grn_led_off; blu_led_on +#define set_led_green red_led_off; grn_led_on; blu_led_off +#define set_led_yellow red_led_on; grn_led_on; blu_led_off +#define set_led_magenta red_led_on; grn_led_off; blu_led_on +#define set_led_cyan red_led_off; grn_led_on; blu_led_on +#define set_led_white red_led_on; grn_led_on; blu_led_on + +/* +#define LED_B 5 +#define LED_R 6 +#define LED_G 7 + +#define all_leds_off PORTF &= ~(1< + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ + +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER unknown +#define PRODUCT Chimera Ergo +#define DESCRIPTION q.m.k. keyboard firmware for Chimera Ergo + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 12 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +//#define BACKLIGHT_LEVELS 3 + +#define ONESHOT_TIMEOUT 500 + + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +#define PREVENT_STUCK_MODIFIERS + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +//UART settings for communication with the RF microcontroller +#define SERIAL_UART_BAUD 1000000 +#define SERIAL_UART_DATA UDR1 +#define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1) +#define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1)) +#define SERIAL_UART_RXD_PRESENT (UCSR1A & _BV(RXC1)) +#define SERIAL_UART_INIT() do { \ + /* baud rate */ \ + UBRR1L = SERIAL_UART_UBRR; \ + /* baud rate */ \ + UBRR1H = SERIAL_UART_UBRR >> 8; \ + /* enable TX and RX */ \ + UCSR1B = _BV(TXEN1) | _BV(RXEN1); \ + /* 8-bit data */ \ + UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \ + } while(0) + +#endif diff --git a/keyboards/chimera_ergo/keymaps/default/keymap.c b/keyboards/chimera_ergo/keymaps/default/keymap.c new file mode 100644 index 000000000000..0479fa41996b --- /dev/null +++ b/keyboards/chimera_ergo/keymaps/default/keymap.c @@ -0,0 +1,206 @@ +// this is the style you want to emulate. +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, + +#include "chimera_ergo.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum chimera_ergo_layers +{ + _QWERTY, + _CAPS, + _NUMPAD, + _SYMBOLS, + _MACROS, + _NAV +}; + +#define KC_NMPD TG(_NUMPAD) +#define KC_SYMB TG(_SYMBOLS) +#define KC_SPFN LT(_NAV,KC_EQL) +#define KC_SCTL MT(MOD_LCTL, KC_LBRC) +#define KC_SCTR MT(MOD_LCTL, KC_RBRC) +#define KC_SPLT MT(MOD_LALT, KC_MINS) +#define KC_SPRT MT(MOD_LALT, KC_1) +#define KC_GBRC MT(MOD_RGUI, KC_RBRC) +#define KC_GQOT MT(MOD_LGUI, KC_QUOT) +#define KC_MESC LT(_MACROS, KC_ESC) +#define KC_INCL M(0) +#define KC_PULL M(1) +#define KC_PUSH M(2) +#define KC_SCAP M(3) +#define KC_SCOF M(4) +#define KC_CAD LALT(LCTL(KC_DEL)) + +#define LONGPRESS_DELAY 150 +//#define LAYER_TOGGLE_DELAY 300 + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define KC_ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + LBRC, 1 ,SCTL,SPLT,SPFN, 5 , 6 ,GBRC,SPRT,SCTR, 0 ,RBRC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + MESC, Q , W , E , R , T , Y , U , I , O , P ,QUOT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + TAB , A , S , D , F , G , H , J , K , L ,SCLN,ENT , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LSPO, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,RSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + NMPD,BSPC, SPC ,SYMB + // \------------------+----+----/ \---+----+----+--------------/ + ), + + [_CAPS] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + ,UNDS, , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , , , ,COLN, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + SCOF, , , , , , , , , , ,SCOF, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , + // \------------------+----+----/ \---+----+----+--------------/ + ), + + [_NUMPAD] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , , , , , , ,MINS, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , ,COLN, , , , , 7 , 8 , 9 ,ASTR, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , ,DOT , , , , , 4 , 5 , 6 ,PLUS, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , 1 , 2 , 3 ,SLSH, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , 0 + // \------------------+----+----/ \---+----+----+--------------/ + ), + + [_SYMBOLS] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSLS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + F1 , F2 , F3 , F4 , F5 , F6 , TILD,EQL ,UNDS,LCBR,RCBR, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + F7 , F8 , F9 ,F10 ,F11 ,F12 , GRV ,PLUS,MINS,LBRC,RBRC, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + PIPE, , , + // \------------------+----+----/ \---+----+----+--------------/ + ), + + [_MACROS] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , ,INCL, , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , ,CAD , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + SCAP, , , , , , , ,PULL,PUSH, , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , + // \------------------+----+----/ \---+----+----+--------------/ + ), + + [_NAV] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , ,PGUP, UP ,PGDN,PSCR, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , ,LEFT,DOWN,RGHT, , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,DEL , , + // \------------------+----+----/ \---+----+----+--------------/ + ), + + +}; + + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + /* include some kind of library or header */ + case 0: + if (record->event.pressed) { + SEND_STRING("#include <>"); + return MACRO( T(LEFT), END); + } + break; + case 1: + if (record->event.pressed) { + SEND_STRING("git pull"); + return MACRO( T(ENT), END ); + } + break; + case 2: + if (record->event.pressed){ + SEND_STRING("git push"); + return MACRO( T(ENT), END ); + } + break; + case 3: + if (record->event.pressed){ + layer_on(_CAPS); + register_code(KC_CAPSLOCK); + unregister_code(KC_CAPSLOCK); + } + break; + case 4: + if (record->event.pressed){ + layer_off(_CAPS); + register_code(KC_CAPSLOCK); + unregister_code(KC_CAPSLOCK); + } + break; + } + return MACRO_NONE; +}; + + +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + switch (layer) { + case _QWERTY: + set_led_green; + break; + case _CAPS: + set_led_white; + break; + case _NUMPAD: + set_led_blue; + break; + case _SYMBOLS: + set_led_red; + break; + case _NAV: + set_led_magenta; + break; + case _MACROS: + set_led_cyan; + break; + default: + set_led_green; + break; + } +}; diff --git a/keyboards/chimera_ergo/matrix.c b/keyboards/chimera_ergo/matrix.c new file mode 100644 index 000000000000..21d46ef9b478 --- /dev/null +++ b/keyboards/chimera_ergo/matrix.c @@ -0,0 +1,164 @@ +/* +Copyright 2012 Jun Wako +Copyright 2014 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include +#include +#if defined(__AVR__) +#include +#endif +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "timer.h" + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; + +__attribute__ ((weak)) +void matrix_init_quantum(void) { + matrix_init_kb(); +} + +__attribute__ ((weak)) +void matrix_scan_quantum(void) { + matrix_scan_kb(); +} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +void matrix_init(void) { + + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) +{ + SERIAL_UART_INIT(); + + uint32_t timeout = 0; + + //the s character requests the RF slave to send the matrix + SERIAL_UART_DATA = 's'; + + //trust the external keystates entirely, erase the last data + uint8_t uart_data[14] = {0}; + + //there are 10 bytes corresponding to 10 columns, and an end byte + for (uint8_t i = 0; i < 14; i++) { + //wait for the serial data, timeout if it's been too long + //this only happened in testing with a loose wire, but does no + //harm to leave it in here + while(!SERIAL_UART_RXD_PRESENT){ + timeout++; + if (timeout > 10000){ + break; + } + } + uart_data[i] = SERIAL_UART_DATA; + } + + //check for the end packet, the key state bytes use the LSBs, so 0xE0 + //will only show up here if the correct bytes were recieved + if (uart_data[10] == 0xE0) + { + //shifting and transferring the keystates to the QMK matrix variable + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = (uint16_t) uart_data[i*2] | (uint16_t) uart_data[i*2+1] << 6; + } + } + + + matrix_scan_quantum(); + return 1; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1 + +#define red_led_off PORTF |= (1<<5) +#define red_led_on PORTF &= ~(1<<5) +#define blu_led_off PORTF |= (1<<4) +#define blu_led_on PORTF &= ~(1<<4) +#define grn_led_off PORTD |= (1<<1) +#define grn_led_on PORTD &= ~(1<<1) + +#define set_led_off red_led_off; grn_led_off; blu_led_off +#define set_led_red red_led_on; grn_led_off; blu_led_off +#define set_led_blue red_led_off; grn_led_off; blu_led_on +#define set_led_green red_led_off; grn_led_on; blu_led_off +#define set_led_yellow red_led_on; grn_led_on; blu_led_off +#define set_led_magenta red_led_on; grn_led_off; blu_led_on +#define set_led_cyan red_led_off; grn_led_on; blu_led_on +#define set_led_white red_led_on; grn_led_on; blu_led_on + +/* +#define LED_B 5 +#define LED_R 6 +#define LED_G 7 + +#define all_leds_off PORTF &= ~(1< + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ + +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER unknown +#define PRODUCT Chimera Lets Split +#define DESCRIPTION q.m.k. keyboard firmware for Chimera Lets Split + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 12 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +//#define BACKLIGHT_LEVELS 3 + +#define ONESHOT_TIMEOUT 500 + + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +#define PREVENT_STUCK_MODIFIERS + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +//UART settings for communication with the RF microcontroller +#define SERIAL_UART_BAUD 1000000 +#define SERIAL_UART_DATA UDR1 +#define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1) +#define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1)) +#define SERIAL_UART_RXD_PRESENT (UCSR1A & _BV(RXC1)) +#define SERIAL_UART_INIT() do { \ + /* baud rate */ \ + UBRR1L = SERIAL_UART_UBRR; \ + /* baud rate */ \ + UBRR1H = SERIAL_UART_UBRR >> 8; \ + /* enable TX and RX */ \ + UCSR1B = _BV(TXEN1) | _BV(RXEN1); \ + /* 8-bit data */ \ + UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \ + } while(0) + +#endif diff --git a/keyboards/chimera_ls/keymaps/default/keymap.c b/keyboards/chimera_ls/keymaps/default/keymap.c new file mode 100644 index 000000000000..493b8eee15c8 --- /dev/null +++ b/keyboards/chimera_ls/keymaps/default/keymap.c @@ -0,0 +1,191 @@ +// this is the style you want to emulate. +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, + +#include "chimera_ls.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum chimera_lets_split_layers +{ + _QWERTY, + _CAPS, + _NUMPAD, + _SYMBOLS, + _MACROS, + _NAV +}; + +#define KC_NMPD TG(_NUMPAD) +#define KC_SYMB TG(_SYMBOLS) +#define KC_SPFN LT(_NAV,KC_EQL) +#define KC_SCTL MT(MOD_LCTL, KC_BSLS) +#define KC_SCTR MT(MOD_LCTL, KC_RBRC) +#define KC_SPLT MT(MOD_LALT, KC_MINS) +#define KC_MESC LT(_MACROS, KC_ESC) +#define KC_INCL M(0) +#define KC_PULL M(1) +#define KC_PUSH M(2) +#define KC_SCAP M(3) +#define KC_SCOF M(4) +#define KC_CAD LALT(LCTL(KC_DEL)) + +#define LONGPRESS_DELAY 150 +//#define LAYER_TOGGLE_DELAY 300 + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define KC_ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + MESC, Q , W , E , R , T , Y , U , I , O , P ,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + TAB , A , S , D , F , G , H , J , K , L ,SCLN, ENT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LSPO, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,RSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + SCTL,SPFN,SPLT,AMPR,NMPD,SPC , SPC ,SYMB,ASTR,EXLM,LBRC,SCTR + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + + [_CAPS] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , , , ,COLN, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , ,UNDS, , , , , , , , , + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + + + [_NUMPAD] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , , , , 7 , 8 , 9 ,MINS,QUOT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , 4 , 5 , 6 ,PLUS, ENT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LSFT, , , , , , , 1 , 2 , 3 ,ASTR, EQL, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , ,BSPC, SPC , 0 , 0 , DOT,SLSH, + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + + [_SYMBOLS] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,QUOT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + F1 , F2 , F3 , F4 , F5 , F6 , TILD,EQL ,UNDS,LCBR,RCBR,PIPE, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + F7 , F8 , F9 , F10, F11, F12, GRV ,PLUS,MINS,LBRC,RBRC,BSLS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , NO ,BSPC, SPC , , , , , + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + + [_NAV] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , DEL,BSPC, ,HOME, UP , END, INS,PSCR, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , ,LSFT,LCTL, ENT, ,LEFT,DOWN,RGHT, DEL, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , ,PGUP,PGDN, , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , ,DEL , , , , , , + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + + [_MACROS] = KC_KEYMAP( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , , , , ,INCL, , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , ,CAD , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + SCAP, , , , , , , ,PULL,PUSH, ,SCAP, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , , , , , + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + +}; + + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + /* include some kind of library or header */ + case 0: + if (record->event.pressed) { + SEND_STRING("#include <>"); + return MACRO( T(LEFT), END); + } + break; + case 1: + if (record->event.pressed) { + SEND_STRING("git pull"); + return MACRO( T(ENT), END ); + } + break; + case 2: + if (record->event.pressed){ + SEND_STRING("git push"); + return MACRO( T(ENT), END ); + } + break; + case 3: + if (record->event.pressed){ + layer_on(_CAPS); + register_code(KC_CAPSLOCK); + unregister_code(KC_CAPSLOCK); + } + break; + case 4: + if (record->event.pressed){ + layer_off(_CAPS); + register_code(KC_CAPSLOCK); + unregister_code(KC_CAPSLOCK); + } + break; + } + return MACRO_NONE; +}; + + +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + switch (layer) { + case _QWERTY: + set_led_green; + break; + case _CAPS: + set_led_white; + break; + case _NUMPAD: + set_led_blue; + break; + case _SYMBOLS: + set_led_red; + break; + case _NAV: + set_led_magenta; + break; + case _MACROS: + set_led_cyan; + break; + default: + set_led_green; + break; + } +}; diff --git a/keyboards/chimera_ls/matrix.c b/keyboards/chimera_ls/matrix.c new file mode 100644 index 000000000000..665d0d357330 --- /dev/null +++ b/keyboards/chimera_ls/matrix.c @@ -0,0 +1,168 @@ +/* +Copyright 2012 Jun Wako +Copyright 2014 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include +#include +#if defined(__AVR__) +#include +#endif +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "timer.h" + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#elif (MATRIX_COLS <= 64) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse64(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop64(matrix[i]) +# define ROW_SHIFTER ((uint64_t)1) +#endif + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; + +__attribute__ ((weak)) +void matrix_init_quantum(void) { + matrix_init_kb(); +} + +__attribute__ ((weak)) +void matrix_scan_quantum(void) { + matrix_scan_kb(); +} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +void matrix_init(void) { + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) +{ + SERIAL_UART_INIT(); + + uint32_t timeout = 0; + + //the s character requests the RF slave to send the matrix + SERIAL_UART_DATA = 's'; + + //trust the external keystates entirely, erase the last data + uint8_t uart_data[11] = {0}; + + //there are 10 bytes corresponding to 10 columns, and an end byte + for (uint8_t i = 0; i < 11; i++) { + //wait for the serial data, timeout if it's been too long + //this only happened in testing with a loose wire, but does no + //harm to leave it in here + while(!SERIAL_UART_RXD_PRESENT){ + timeout++; + if (timeout > 10000){ + break; + } + } + uart_data[i] = SERIAL_UART_DATA; + } + + //check for the end packet, the key state bytes use the LSBs, so 0xE0 + //will only show up here if the correct bytes were recieved + if (uart_data[10] == 0xE0) + { + //shifting and transferring the keystates to the QMK matrix variable + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = (uint16_t) uart_data[i*2] | (uint16_t) uart_data[i*2+1] << 5; + } + } + + + matrix_scan_quantum(); + return 1; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1count == 1) { + if (state->interrupted) { + return SINGLE_TAP; + } + else { + if (!state->pressed) return SINGLE_TAP; + else return SINGLE_HOLD; + } + } + //If count = 2, and it has been interrupted - assume that user is trying to type the letter associated + //with single tap. + else if (state->count == 2) { + if (state->interrupted) return DOUBLE_SINGLE_TAP; + else if (state->pressed) return DOUBLE_HOLD; + else return DOUBLE_TAP; + } + else if ((state->count == 3) && ((state->interrupted) || (!state->pressed))) return TRIPLE_TAP; + else if (state->count == 3) return TRIPLE_HOLD; + else return 8; //magic number. At some point this method will expand to work for more presses +}*/ + +/* "Super tap toggle" + * Basically, TT but for two or more layers for a single key. + * This particular dance: + * Single tap/hold - TT for Function layer + * Double tap/hold - TT for Numpad layer + * Triple tap/hold - TT for Mouse layer + * +*/ +void TTT_finished (qk_tap_dance_state_t *state, void *user_data) { + ttt_state.state = cur_dance(state); + switch (ttt_state.state) { + case SINGLE_TAP: layer_invert(_FUNCTION); break; + case SINGLE_HOLD: layer_on(_FUNCTION); break; + case DOUBLE_TAP: layer_invert(_NUMPAD); break; + case DOUBLE_HOLD: layer_on(_NUMPAD); break; + case DOUBLE_SINGLE_TAP: layer_invert(_NUMPAD); break; + case TRIPLE_TAP: layer_invert(_MOUSE); break; + case TRIPLE_HOLD: layer_on(_MOUSE); break; + } +} + +void TTT_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (ttt_state.state) { + case SINGLE_TAP: break; + case SINGLE_HOLD: layer_off(_FUNCTION); break; + case DOUBLE_TAP: break; + case DOUBLE_HOLD: layer_off(_NUMPAD); break; + case DOUBLE_SINGLE_TAP: break; + case TRIPLE_TAP: break; + case TRIPLE_HOLD: layer_off(_MOUSE); break; + } + ttt_state.state = 0; +} + +qk_tap_dance_action_t tap_dance_actions[] = { + // simple tap dance + [F12ETAPS] = ACTION_TAP_DANCE_DOUBLE(KC_F12,LSFT(LCTL(KC_F10))), + [CALCCOMP] = ACTION_TAP_DANCE_DOUBLE(KC_CALCULATOR, KC_MY_COMPUTER), + [CALC_PRINTSCREEN] = ACTION_TAP_DANCE_DOUBLE(KC_CALCULATOR, KC_PSCR), + [ALTF4] = ACTION_TAP_DANCE_DOUBLE(KC_F4,LALT(KC_F4)), + [F6F7] = ACTION_TAP_DANCE_DOUBLE(LSFT(KC_F6), LALT(KC_F7)), + [HOME_END] = ACTION_TAP_DANCE_DOUBLE(KC_END, KC_HOME), + [TTT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL,TTT_finished, TTT_reset), +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = KC_KEYMAP( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + MESC, Q ,CSHW,ENAV, R , T ,SPC , CLPS, Y , U ,INAV, O , P ,TTT, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + TAB , A , MEHS,DNUM,FCTL,GWIN,GRAVE, TILD, H ,JCTL, K ,MEHL,CLNMAUS,ENHM, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + MINUS,ZCTL,MEHX, C ,ALTV, B ,DELETE, INS ,ALTN, M ,COMM,DOT ,SLSH,UNDS, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + LSHIFT,BSPSYM, SPC ,ENTSYM + // \------------------+----+----+---/ \---+----+----+-------------------/ + ), + + [_NUMPAD] = KC_KEYMAP( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + , , , ,ASTR, , , , , 7 , 8 , 9 ,ASTR,/**/, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + ,MINS,PLUS,/**/,EQUAL, , , , , 4 , 5 , 6 ,PLUS, , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , ,SLSH, , , , , 1 , 2 , 3 ,SLSH, , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , 0 + // \------------------+----+----+---/ \---+----+----+-------------------/ + ), + + [_SYMBOLS] = KC_KEYMAP( + //,----+----+-----+----+----+----+----. ,----+----+----+----+----+----+----. + ,EXLM, AT ,LCBR,RCBR,HASH, , ,CIRC,AMPR,ASTR,LPRN,RPRN,/**/, + //|----+----+-----+----+----+----+----| |----+----+----+----+----+----+----| + ,EXLM,EXLM,LPRN,RPRN , , , , ,DQUO,EQUAL,QUOTE,RCBR, , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + ,DOLLAR, PERC,LBRACKET,RBRACKET, , , ,PIPE,BSLASH,PLUS, , , , + //|----+----+-----+----+----+----+----| |----+----+----+----+----+----+----| + UNDS,/**/, ,/**/ + // \-------------------+----+----+---/ \---+----+----+-------------------/ + ), + + [_FUNCTION] = KC_KEYMAP( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + F6F7 ,F1 ,F2 ,F3 ,ALF4,F5 ,F6 , F7 ,F8 ,F9 ,F10 ,F11 ,F12 ,/**/, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , + // \------------------+----+----+---/ \---+----+----+-------------------/ + ), + + [_NAV] = KC_KEYMAP( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + , ,SNAPLEFT,/**/,SNAPRIGHT,, , , , , UP , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + ,SNAPUP,PREVTAB, ,NEXTTAB,SNAPDOWN,, , ,LEFT,DOWN,RGHT, , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , ,WORKLEFT, ,WORKRIGHT,, , , ,PGUP,PGDN, , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + CDEL ,DEL, , + // \------------------+----+----+---/ \---+----+----+-------------------/ + ), + + [_TEXTNAV] = KC_KEYMAP( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + , , , , , , , , , ,/**/, , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , + // \------------------+----+----+---/ \---+----+----+-------------------/ + ), + + [_MOUSE] = KC_KEYMAP( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + , , ,MS_UP, , , , , , , UP , , , ,/**/ + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , ,MS_LEFT,MS_DOWN,MS_RIGHT, , , , ,LEFT,DOWN,RGHT,/**/, , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + ,MS_BTN1 ,MS_BTN2 , + // \------------------+----+----+---/ \---+----+----+-------------------/ + ), + + + [_MACROS] = KC_KEYMAP( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + /**/,RESET,SECRET_2,SECRET_3, , , ,SYSTEM_SLEEP, , ,INCL, , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + CAD ,SECRET_1, , , , , , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + SCAP, , , , , , , , , , , , ,SCAP, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , + // \------------------+----+----+---/ \---+----+----+-------------------/ + ) + +}; + + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + /* include some kind of library or header */ + case 0: + if (record->event.pressed) { + SEND_STRING("#include <>"); + return MACRO( T(LEFT), END); + } + break; + case 1: + if (record->event.pressed) { + SEND_STRING("git pull"); + return MACRO( T(ENT), END ); + } + break; + case 2: + if (record->event.pressed){ + SEND_STRING("git push"); + return MACRO( T(ENT), END ); + } + break; + case 3: + if (record->event.pressed){ + // layer_on(_CAPS); + // register_code(KC_CAPSLOCK); + // unregister_code(KC_CAPSLOCK); + } + break; + case 4: + if (record->event.pressed){ + // layer_off(_CAPS); + // register_code(KC_CAPSLOCK); + // unregister_code(KC_CAPSLOCK); + } + break; + } + return MACRO_NONE; +}; + + +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + switch (layer) { + case _QWERTY: + set_led_green; + break; + case _MOUSE: + set_led_yellow; + break; + case _NUMPAD: + set_led_blue; + break; + case _SYMBOLS: + set_led_red; + break; + case _NAV: + set_led_magenta; + break; + case _MACROS: + set_led_green; + _delay_ms(45); + set_led_red; + _delay_ms(45); + break; + case _FUNCTION: + set_led_green; + _delay_ms(45); + set_led_blue; + _delay_ms(45); + break; + default: + set_led_green; + break; + } +}; diff --git a/keyboards/chimera_ortho/matrix.c b/keyboards/chimera_ortho/matrix.c index 0d046339ea44..66d29f8b38f0 100644 --- a/keyboards/chimera_ortho/matrix.c +++ b/keyboards/chimera_ortho/matrix.c @@ -47,16 +47,6 @@ along with this program. If not, see . /* matrix state(1:on, 0:off) */ static matrix_row_t matrix[MATRIX_ROWS]; -__attribute__ ((weak)) -void matrix_init_quantum(void) { - matrix_init_kb(); -} - -__attribute__ ((weak)) -void matrix_scan_quantum(void) { - matrix_scan_kb(); -} - __attribute__ ((weak)) void matrix_init_kb(void) { matrix_init_user(); diff --git a/keyboards/chocopad/README.md b/keyboards/chocopad/README.md new file mode 100644 index 000000000000..ad0f6b35602c --- /dev/null +++ b/keyboards/chocopad/README.md @@ -0,0 +1,14 @@ +Chocopad +======== + +A 4x4 macropad keyboard using Kailh PG1350 Lower Profile Choc switches. + +Keyboard Maintainer: Keebio +Hardware Supported: Chocopad PCB, Arduino Pro Micro +Hardware Availability: [Keebio](https://keeb.io) + +Make example for this keyboard (after setting up your build environment): + + make chocopad:default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/chocopad/chocopad.c b/keyboards/chocopad/chocopad.c new file mode 100644 index 000000000000..f54753af506b --- /dev/null +++ b/keyboards/chocopad/chocopad.c @@ -0,0 +1 @@ +#include "chocopad.h" diff --git a/keyboards/chocopad/chocopad.h b/keyboards/chocopad/chocopad.h new file mode 100644 index 000000000000..329e2d56f672 --- /dev/null +++ b/keyboards/chocopad/chocopad.h @@ -0,0 +1,32 @@ +#ifndef CHOCOPAD_H +#define CHOCOPAD_H + +#include "quantum.h" + +#define KEYMAP( \ + A1, A2, A3, A4, \ + B1, B2, B3, B4, \ + C1, C2, C3, C4, \ + D1, D2, D3, D4 \ +) { \ + { A1, A2, A3, A4 }, \ + { B1, B2, B3, B4 }, \ + { C1, C2, C3, C4 }, \ + { D1, D2, D3, D4 } \ +} + +// Used to create a keymap using only KC_ prefixed keys +#define KC_KEYMAP( \ + A1, A2, A3, A4, \ + B1, B2, B3, B4, \ + C1, C2, C3, C4, \ + D1, D2, D3, D4 \ +) \ + KEYMAP( \ + KC_##A1, KC_##A2, KC_##A3, KC_##A4, \ + KC_##B1, KC_##B2, KC_##B3, KC_##B4, \ + KC_##C1, KC_##C2, KC_##C3, KC_##C4, \ + KC_##D1, KC_##D2, KC_##D3, KC_##D4 \ + ) + +#endif diff --git a/keyboards/chocopad/config.h b/keyboards/chocopad/config.h new file mode 100644 index 000000000000..bf861ccda41b --- /dev/null +++ b/keyboards/chocopad/config.h @@ -0,0 +1,59 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCEEB +#define PRODUCT_ID 0x1144 +#define DEVICE_VER 0x0100 +#define MANUFACTURER Keebio +#define PRODUCT Chocopad +#define DESCRIPTION 4x4 macropad using Kailh Choc low-profile switches + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 4 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D7, E6, B3, B2 } +#define MATRIX_COL_PINS { D2, D4, F6, F5 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_LEVELS 6 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif +#define RGB_DI_PIN D3 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 4 +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + +#endif \ No newline at end of file diff --git a/keyboards/chocopad/keymaps/default/config.h b/keyboards/chocopad/keymaps/default/config.h new file mode 100644 index 000000000000..7fa3bf328ec9 --- /dev/null +++ b/keyboards/chocopad/keymaps/default/config.h @@ -0,0 +1,6 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#endif diff --git a/keyboards/chocopad/keymaps/default/keymap.c b/keyboards/chocopad/keymaps/default/keymap.c new file mode 100644 index 000000000000..c4536a1b4148 --- /dev/null +++ b/keyboards/chocopad/keymaps/default/keymap.c @@ -0,0 +1,61 @@ +#include "chocopad.h" + +#define _BASE 0 +#define _FN1 1 +#define _FN2 2 + +#define KC_ KC_TRNS +#define _______ KC_TRNS + +#define KC_X1 MO(_FN1) +#define KC_X2 MO(_FN2) +#define KC_RST RESET +#define KC_BSTP BL_STEP +#define KC_RTOG RGB_TOG +#define KC_RMOD RGB_MOD +#define KC_RHUI RGB_HUI +#define KC_RHUD RGB_HUD +#define KC_RSAI RGB_SAI +#define KC_RSAD RGB_SAD +#define KC_RVAI RGB_VAI +#define KC_RVAD RGB_VAD + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = KC_KEYMAP( + //,----+----+----+----. + PGUP,HOME, UP ,END , + //|----+----+----+----| + PGDN,LEFT,DOWN,RGHT, + //|----+----+----+----| + X2 ,VOLU,MPLY,MPRV, + //|----+----+----+----| + X1 ,VOLD,MUTE,MNXT + //`----+----+----+----' + ), + + [_FN1] = KC_KEYMAP( + //,----+----+----+----. + ESC , P7 , P8 , P9 , + //|----+----+----+----| + TAB , P4 , P5 , P6 , + //|----+----+----+----| + ENT , P1 , P2 , P3 , + //|----+----+----+----| + , P0 , P0 ,DOT + //`----+----+----+----' + ), + + [_FN2] = KC_KEYMAP( + //,----+----+----+----. + RTOG,RHUI,RSAI,RVAI, + //|----+----+----+----| + RMOD,RHUD,RSAD,RVAD, + //|----+----+----+----| + , , ,RST , + //|----+----+----+----| + BSTP, , , + //`----+----+----+----' + ) + +}; diff --git a/keyboards/lets_split/keymaps/hexwire/rules.mk b/keyboards/chocopad/keymaps/default/rules.mk similarity index 100% rename from keyboards/lets_split/keymaps/hexwire/rules.mk rename to keyboards/chocopad/keymaps/default/rules.mk diff --git a/keyboards/chocopad/rules.mk b/keyboards/chocopad/rules.mk new file mode 100644 index 000000000000..cd9222a1544b --- /dev/null +++ b/keyboards/chocopad/rules.mk @@ -0,0 +1,56 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes diff --git a/keyboards/christmas_tree/V2017/info.json b/keyboards/christmas_tree/V2017/info.json deleted file mode 100644 index 6f47bdb3b529..000000000000 --- a/keyboards/christmas_tree/V2017/info.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "identifier": "FEED:3070:2017" -} \ No newline at end of file diff --git a/keyboards/christmas_tree/info.json b/keyboards/christmas_tree/info.json index fde41acc2b52..d33f9cc46cc7 100644 --- a/keyboards/christmas_tree/info.json +++ b/keyboards/christmas_tree/info.json @@ -1,11 +1,7 @@ { "keyboard_name": "Christmas Tree", "keyboard_folder": "christmas_tree", - "manufacturer": "Maple Computing", - "identifier": "FEED:3070:2017", "url": "https://www.reddit.com/r/MechanicalKeyboards/comments/7cqxpf/gb_christmas_tree_pcb_gb_now_live/", - "processor": "atmega32u4", - "bootloader": "catarina", "maintainer": "That-Canadian", "width": 3, "height": 3, @@ -14,4 +10,4 @@ "key_count": 6 } } -} \ No newline at end of file +} diff --git a/keyboards/ckeys/nakey/config.h b/keyboards/ckeys/nakey/config.h new file mode 100644 index 000000000000..38fed297efb5 --- /dev/null +++ b/keyboards/ckeys/nakey/config.h @@ -0,0 +1,190 @@ +/* +Copyright 2018 James Underwood + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER cKeys +#define PRODUCT naKey +#define DESCRIPTION The cKeys through hole ten key pad + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F1, F4, F5, F6, F7 } +#define MATRIX_COL_PINS { B0, B1, B2, B3 } +#define UNUSED_PINS { D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, B4, B5, B6, B7 } + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +#endif diff --git a/keyboards/ckeys/nakey/info.json b/keyboards/ckeys/nakey/info.json new file mode 100644 index 000000000000..b44d0daf741b --- /dev/null +++ b/keyboards/ckeys/nakey/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "naKey", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Num Lock", "x":0, "y":0}, {"label":"/", "x":1, "y":0}, {"label":"*", "x":2, "y":0}, {"label":"-", "x":3, "y":0}, {"label":"7", "x":0, "y":1}, {"label":"8", "x":1, "y":1}, {"label":"9", "x":2, "y":1}, {"label":"+", "x":3, "y":1, "h":2}, {"label":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"Enter", "x":3, "y":3, "h":2}, {"label":"0", "x":0, "y":4, "w":2}, {"label":".", "x":2, "y":4}] + } + } +} diff --git a/keyboards/ckeys/nakey/keymaps/default/keymap.c b/keyboards/ckeys/nakey/keymaps/default/keymap.c new file mode 100644 index 000000000000..ebbb128bd271 --- /dev/null +++ b/keyboards/ckeys/nakey/keymaps/default/keymap.c @@ -0,0 +1,62 @@ +/* Copyright 2018 James Underwood + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT( /* Base */ + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + KC_P7, KC_P8, KC_P9, KC_PPLS, \ + KC_P4, KC_P5, KC_P6, \ + KC_P1, KC_P2, KC_P3, KC_PENT, \ + KC_P0, KC_PDOT \ +), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/ckeys/nakey/keymaps/default/readme.md b/keyboards/ckeys/nakey/keymaps/default/readme.md new file mode 100644 index 000000000000..c842dc99a76d --- /dev/null +++ b/keyboards/ckeys/nakey/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for naKey diff --git a/keyboards/ckeys/nakey/nakey.c b/keyboards/ckeys/nakey/nakey.c new file mode 100644 index 000000000000..ba2fb90ebe40 --- /dev/null +++ b/keyboards/ckeys/nakey/nakey.c @@ -0,0 +1,42 @@ +/* Copyright 2018 James Underwood + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "nakey.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/ckeys/nakey/nakey.h b/keyboards/ckeys/nakey/nakey.h new file mode 100644 index 000000000000..3cbfda844deb --- /dev/null +++ b/keyboards/ckeys/nakey/nakey.h @@ -0,0 +1,40 @@ +/* Copyright 2018 James Underwood + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef NAKEY_H +#define NAKEY_H + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The following is an example using the Planck MIT layout +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, k33, \ + k40, k41 \ +) \ +{ \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, KC_NO }, \ + { k30, k31, k32, k33 }, \ + { k40, KC_NO, k41, KC_NO }, \ +} + +#endif diff --git a/keyboards/ckeys/nakey/readme.md b/keyboards/ckeys/nakey/readme.md new file mode 100644 index 000000000000..c7250cf50643 --- /dev/null +++ b/keyboards/ckeys/nakey/readme.md @@ -0,0 +1,49 @@ +# naKey + +Firmware for custom keyboard + +Keyboard Maintainer: [James Underwood](https://github.com/ju0) +Hardware Supported: naKey +Hardware Availability: [ckeys.org](https://ckeys.org) + +To build this keyboard, follow the [build guide](https://ckeys.org/tutorials/nakey-numpad-build-guide/). + +Make example for this keyboard (after setting up your build environment): + + make ckeys/nakey:default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme](/). + +## Building + +Download or clone the whole firmware and navigate to the root folder. Once your dev env is setup, you'll be able to type `make ckeys/nakey:default` to generate your .hex - you can then use the Teensy Loader to program your .hex file. + +(Note: replace naKey with the name of your keyboard.) + +Depending on which keymap you would like to use, you will have to compile slightly differently. + +### Default + +To build with the default keymap, simply run `make ckeys/nakey:default`. + +### Other Keymaps + +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder. Create a `readme.md` and a `keymap.c` file to complete your new keymap. When you are done your file tree should look like this: + +* `qmk_firmware/` + * `keyboard/` + * `keymaps/` + * `config.h` (optional) + * `keymap.c` + * `readme.md` + * `rules.mk` (optional) + +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: + +``` +$ make naKey-[default|jack|] +``` diff --git a/keyboards/ckeys/nakey/rules.mk b/keyboards/ckeys/nakey/rules.mk new file mode 100644 index 000000000000..a3571e8deb0e --- /dev/null +++ b/keyboards/ckeys/nakey/rules.mk @@ -0,0 +1,68 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=512 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 +FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches diff --git a/keyboards/obelus/config.h b/keyboards/ckeys/obelus/config.h similarity index 100% rename from keyboards/obelus/config.h rename to keyboards/ckeys/obelus/config.h diff --git a/keyboards/obelus/keymaps/default/config.h b/keyboards/ckeys/obelus/keymaps/default/config.h similarity index 100% rename from keyboards/obelus/keymaps/default/config.h rename to keyboards/ckeys/obelus/keymaps/default/config.h diff --git a/keyboards/obelus/keymaps/default/keymap.c b/keyboards/ckeys/obelus/keymaps/default/keymap.c similarity index 100% rename from keyboards/obelus/keymaps/default/keymap.c rename to keyboards/ckeys/obelus/keymaps/default/keymap.c diff --git a/keyboards/obelus/keymaps/default/readme.md b/keyboards/ckeys/obelus/keymaps/default/readme.md similarity index 100% rename from keyboards/obelus/keymaps/default/readme.md rename to keyboards/ckeys/obelus/keymaps/default/readme.md diff --git a/keyboards/obelus/obelus.c b/keyboards/ckeys/obelus/obelus.c similarity index 100% rename from keyboards/obelus/obelus.c rename to keyboards/ckeys/obelus/obelus.c diff --git a/keyboards/obelus/obelus.h b/keyboards/ckeys/obelus/obelus.h similarity index 100% rename from keyboards/obelus/obelus.h rename to keyboards/ckeys/obelus/obelus.h diff --git a/keyboards/obelus/readme.md b/keyboards/ckeys/obelus/readme.md similarity index 78% rename from keyboards/obelus/readme.md rename to keyboards/ckeys/obelus/readme.md index a9d67b00e866..6767956bf9bc 100644 --- a/keyboards/obelus/readme.md +++ b/keyboards/ckeys/obelus/readme.md @@ -5,15 +5,15 @@ Obelus Keyboard Maintaintainers: [Ethan Madden](https://github.com/jetpacktuxedo), [James Underwood](https://github.com/ju0) Hardware Supported: Obelus -Hardware Availability: C-Keys soldering workshops, /u/MonkeyPlusPlus +Hardware Availability: [C-Keys soldering workshops](https://ckeys.org/workshops/), [/u/MonkeyPlusPlus](https://www.reddit.com/user/monkeyplusplus) Make example for this keyboard (after setting up your build environment): - make obelus:default + make ckeys/obelus:default Or to make and flash: - make obelus:default:dfu + make ckeys/obelus:default:dfu See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) and [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/obelus/rules.mk b/keyboards/ckeys/obelus/rules.mk similarity index 100% rename from keyboards/obelus/rules.mk rename to keyboards/ckeys/obelus/rules.mk diff --git a/keyboards/ckeys/readme.md b/keyboards/ckeys/readme.md new file mode 100644 index 000000000000..01991d9e3fe6 --- /dev/null +++ b/keyboards/ckeys/readme.md @@ -0,0 +1,9 @@ +# Ckeys.org + +[ckeys](https://ckeys.org/) is a mechanical keyboard based non profit, located in Seattle, Washington. + +In addition, to hosting the [Seattle Mechanical Keyboard Meetups](https://ckeys.org/events/), they have [soldering workshops](https://ckeys.org/workshops/) featuring hardware hosted in this repository. + +* Supported Hardware + * The Obelus - 4x4 Macropad + * naKey - Through hole numpad \ No newline at end of file diff --git a/keyboards/clueboard/2x1800/2x1800.c b/keyboards/clueboard/2x1800/2x1800.c new file mode 100644 index 000000000000..4ad78899fc32 --- /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 000000000000..ea3c7a6e975f --- /dev/null +++ b/keyboards/clueboard/2x1800/config.h @@ -0,0 +1,199 @@ +/* +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 + +#define RGB_DI_PIN C6 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 16 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #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 000000000000..81ff138d9307 --- /dev/null +++ b/keyboards/clueboard/2x1800/info.json @@ -0,0 +1,1928 @@ +{ + "keyboard_name": "CB 2x1800", + "url": "", + "maintainer": "skullydazed", + "width": 24, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [ + { + "label": "Home", + "x": 0, + "y": 0 + }, + { + "label": "End", + "x": 1, + "y": 0 + }, + { + "label": "PgUp", + "x": 2, + "y": 0 + }, + { + "label": "PgDn", + "x": 3, + "y": 0 + }, + { + "label": "Esc", + "x": 4.75, + "y": 0 + }, + { + "label": "F1", + "x": 6.25, + "y": 0 + }, + { + "label": "F2", + "x": 7.25, + "y": 0 + }, + { + "label": "F3", + "x": 8.25, + "y": 0 + }, + { + "label": "F4", + "x": 9.25, + "y": 0 + }, + { + "label": "F5", + "x": 10.75, + "y": 0 + }, + { + "label": "F6", + "x": 11.75, + "y": 0 + }, + { + "label": "F7", + "x": 12.75, + "y": 0 + }, + { + "label": "F8", + "x": 13.75, + "y": 0 + }, + { + "label": "F9", + "x": 15.25, + "y": 0 + }, + { + "label": "F10", + "x": 16.25, + "y": 0 + }, + { + "label": "F11", + "x": 17.25, + "y": 0 + }, + { + "label": "F12", + "x": 18.25, + "y": 0 + }, + { + "label": "PrtSc", + "x": 20, + "y": 0 + }, + { + "label": "Scroll Lock", + "x": 21, + "y": 0 + }, + { + "label": "Pause", + "x": 22, + "y": 0 + }, + { + "label": "Insert", + "x": 23, + "y": 0 + }, + { + "label": "-", + "x": 0, + "y": 1.25 + }, + { + "label": "Num Lock", + "x": 1, + "y": 1.25 + }, + { + "label": "/", + "x": 2, + "y": 1.25 + }, + { + "label": "*", + "x": 3, + "y": 1.25 + }, + { + "label": "~", + "x": 4.5, + "y": 1.25 + }, + { + "label": "!", + "x": 5.5, + "y": 1.25 + }, + { + "label": "@", + "x": 6.5, + "y": 1.25 + }, + { + "label": "#", + "x": 7.5, + "y": 1.25 + }, + { + "label": "$", + "x": 8.5, + "y": 1.25 + }, + { + "label": "%", + "x": 9.5, + "y": 1.25 + }, + { + "label": "^", + "x": 10.5, + "y": 1.25 + }, + { + "label": "&", + "x": 11.5, + "y": 1.25 + }, + { + "label": "*", + "x": 12.5, + "y": 1.25 + }, + { + "label": "(", + "x": 13.5, + "y": 1.25 + }, + { + "label": ")", + "x": 14.5, + "y": 1.25 + }, + { + "label": "_", + "x": 15.5, + "y": 1.25 + }, + { + "label": "+", + "x": 16.5, + "y": 1.25 + }, + { + "label": "Backspace", + "x": 17.5, + "y": 1.25, + "w": 2 + }, + { + "label": "Num Lock", + "x": 20, + "y": 1.25 + }, + { + "label": "/", + "x": 21, + "y": 1.25 + }, + { + "label": "*", + "x": 22, + "y": 1.25 + }, + { + "label": "-", + "x": 23, + "y": 1.25 + }, + { + "label": "+", + "x": 0, + "y": 2.25, + "h": 2 + }, + { + "label": "7", + "x": 1, + "y": 2.25 + }, + { + "label": "8", + "x": 2, + "y": 2.25 + }, + { + "label": "9", + "x": 3, + "y": 2.25 + }, + { + "label": "Tab", + "x": 4.5, + "y": 2.25, + "w": 1.5 + }, + { + "label": "Q", + "x": 6, + "y": 2.25 + }, + { + "label": "W", + "x": 7, + "y": 2.25 + }, + { + "label": "E", + "x": 8, + "y": 2.25 + }, + { + "label": "R", + "x": 9, + "y": 2.25 + }, + { + "label": "T", + "x": 10, + "y": 2.25 + }, + { + "label": "Y", + "x": 11, + "y": 2.25 + }, + { + "label": "U", + "x": 12, + "y": 2.25 + }, + { + "label": "I", + "x": 13, + "y": 2.25 + }, + { + "label": "O", + "x": 14, + "y": 2.25 + }, + { + "label": "P", + "x": 15, + "y": 2.25 + }, + { + "label": "{", + "x": 16, + "y": 2.25 + }, + { + "label": "}", + "x": 17, + "y": 2.25 + }, + { + "label": "|", + "x": 18, + "y": 2.25, + "w": 1.5 + }, + { + "label": "7", + "x": 20, + "y": 2.25 + }, + { + "label": "8", + "x": 21, + "y": 2.25 + }, + { + "label": "9", + "x": 22, + "y": 2.25 + }, + { + "label": "+", + "x": 23, + "y": 2.25, + "h": 2 + }, + { + "label": "4", + "x": 1, + "y": 3.25 + }, + { + "label": "5", + "x": 2, + "y": 3.25 + }, + { + "label": "6", + "x": 3, + "y": 3.25 + }, + { + "label": "Caps Lock", + "x": 4.5, + "y": 3.25, + "w": 1.75 + }, + { + "label": "A", + "x": 6.25, + "y": 3.25 + }, + { + "label": "S", + "x": 7.25, + "y": 3.25 + }, + { + "label": "D", + "x": 8.25, + "y": 3.25 + }, + { + "label": "F", + "x": 9.25, + "y": 3.25 + }, + { + "label": "G", + "x": 10.25, + "y": 3.25 + }, + { + "label": "H", + "x": 11.25, + "y": 3.25 + }, + { + "label": "J", + "x": 12.25, + "y": 3.25 + }, + { + "label": "K", + "x": 13.25, + "y": 3.25 + }, + { + "label": "L", + "x": 14.25, + "y": 3.25 + }, + { + "label": ":", + "x": 15.25, + "y": 3.25 + }, + { + "label": "\"", + "x": 16.25, + "y": 3.25 + }, + { + "label": "Enter", + "x": 17.25, + "y": 3.25, + "w": 2.25 + }, + { + "label": "4", + "x": 20, + "y": 3.25 + }, + { + "label": "5", + "x": 21, + "y": 3.25 + }, + { + "label": "6", + "x": 22, + "y": 3.25 + }, + { + "label": "Enter", + "x": 0, + "y": 4.25, + "h": 2 + }, + { + "label": "1", + "x": 1, + "y": 4.25 + }, + { + "label": "2", + "x": 2, + "y": 4.25 + }, + { + "label": "3", + "x": 3, + "y": 4.25 + }, + { + "label": "\\u2191", + "x": 4.25, + "y": 4.5 + }, + { + "label": "Shift", + "x": 5.5, + "y": 4.25, + "w": 1.25 + }, + { + "label": "Z", + "x": 6.75, + "y": 4.25 + }, + { + "label": "X", + "x": 7.75, + "y": 4.25 + }, + { + "label": "C", + "x": 8.75, + "y": 4.25 + }, + { + "label": "V", + "x": 9.75, + "y": 4.25 + }, + { + "label": "B", + "x": 10.75, + "y": 4.25 + }, + { + "label": "N", + "x": 11.75, + "y": 4.25 + }, + { + "label": "M", + "x": 12.75, + "y": 4.25 + }, + { + "label": "<", + "x": 13.75, + "y": 4.25 + }, + { + "label": ">", + "x": 14.75, + "y": 4.25 + }, + { + "label": "?", + "x": 15.75, + "y": 4.25 + }, + { + "label": "Shift", + "x": 16.75, + "y": 4.25, + "w": 1.75 + }, + { + "label": "\\u2191", + "x": 18.75, + "y": 4.5 + }, + { + "label": "1", + "x": 20, + "y": 4.25 + }, + { + "label": "2", + "x": 21, + "y": 4.25 + }, + { + "label": "3", + "x": 22, + "y": 4.25 + }, + { + "label": "Enter", + "x": 23, + "y": 4.25, + "h": 2 + }, + { + "label": "0", + "x": 1, + "y": 5.25 + }, + { + "label": ".", + "x": 2, + "y": 5.25 + }, + { + "label": "\\u2190", + "x": 3.25, + "y": 5.5 + }, + { + "label": "\\u2193", + "x": 4.25, + "y": 5.5 + }, + { + "label": "\\u2192", + "x": 5.25, + "y": 5.5 + }, + { + "label": "Ctrl", + "x": 6.5, + "y": 5.25 + }, + { + "label": "Win", + "x": 7.5, + "y": 5.25 + }, + { + "label": "Alt", + "x": 8.5, + "y": 5.25 + }, + { + "label": "7u", + "x": 8.5, + "y": 5.25, + "w": 7 + }, + { + "label": "1u", + "x": 9.5, + "y": 5.25 + }, + { + "label": "4u", + "x": 9.5, + "y": 5.25, + "w": 4 + }, + { + "label": "1u", + "x": 10.5, + "y": 5.25 + }, + { + "label": "1u", + "x": 11.5, + "y": 5.25 + }, + { + "label": "1u", + "x": 12.5, + "y": 5.25 + }, + { + "label": "Alt", + "x": 13.5, + "y": 5.25 + }, + { + "label": "Win", + "x": 14.5, + "y": 5.25 + }, + { + "label": "Menu", + "x": 15.5, + "y": 5.25 + }, + { + "label": "Ctrl", + "x": 16.5, + "y": 5.25 + }, + { + "label": "\\u2190", + "x": 17.75, + "y": 5.5 + }, + { + "label": "\\u2193", + "x": 18.75, + "y": 5.5 + }, + { + "label": "\\u2192", + "x": 19.75, + "y": 5.5 + }, + { + "label": "0", + "x": 21, + "y": 5.25 + }, + { + "label": ".", + "x": 22, + "y": 5.25 + } + ] + }, + "LAYOUT_7U_SPACE": { + "layout": [ + { + "label": "k00", + "x": 0, + "y": 0 + }, + { + "label": "k01", + "x": 1, + "y": 0 + }, + { + "label": "k02", + "x": 2, + "y": 0 + }, + { + "label": "k03", + "x": 3, + "y": 0 + }, + { + "label": "k04", + "x": 4.75, + "y": 0 + }, + { + "label": "k06", + "x": 6.25, + "y": 0 + }, + { + "label": "k07", + "x": 7.25, + "y": 0 + }, + { + "label": "k08", + "x": 8.25, + "y": 0 + }, + { + "label": "k09", + "x": 9.25, + "y": 0 + }, + { + "label": "k0a", + "x": 10.75, + "y": 0 + }, + { + "label": "k60", + "x": 11.75, + "y": 0 + }, + { + "label": "k61", + "x": 12.75, + "y": 0 + }, + { + "label": "k62", + "x": 13.75, + "y": 0 + }, + { + "label": "k63", + "x": 15.25, + "y": 0 + }, + { + "label": "k64", + "x": 16.25, + "y": 0 + }, + { + "label": "k65", + "x": 17.25, + "y": 0 + }, + { + "label": "k66", + "x": 18.25, + "y": 0 + }, + { + "label": "k67", + "x": 20, + "y": 0 + }, + { + "label": "k68", + "x": 21, + "y": 0 + }, + { + "label": "k69", + "x": 22, + "y": 0 + }, + { + "label": "k6a", + "x": 23, + "y": 0 + }, + { + "label": "k10", + "x": 0, + "y": 1.25 + }, + { + "label": "k11", + "x": 1, + "y": 1.25 + }, + { + "label": "k12", + "x": 2, + "y": 1.25 + }, + { + "label": "k13", + "x": 3, + "y": 1.25 + }, + { + "label": "k14", + "x": 4.5, + "y": 1.25 + }, + { + "label": "k15", + "x": 5.5, + "y": 1.25 + }, + { + "label": "k16", + "x": 6.5, + "y": 1.25 + }, + { + "label": "k17", + "x": 7.5, + "y": 1.25 + }, + { + "label": "k18", + "x": 8.5, + "y": 1.25 + }, + { + "label": "k19", + "x": 9.5, + "y": 1.25 + }, + { + "label": "k0a", + "x": 10.5, + "y": 1.25 + }, + { + "label": "k70", + "x": 11.5, + "y": 1.25 + }, + { + "label": "k71", + "x": 12.5, + "y": 1.25 + }, + { + "label": "k72", + "x": 13.5, + "y": 1.25 + }, + { + "label": "k73", + "x": 14.5, + "y": 1.25 + }, + { + "label": "k74", + "x": 15.5, + "y": 1.25 + }, + { + "label": "k75", + "x": 16.5, + "y": 1.25 + }, + { + "label": "k76", + "x": 17.5, + "y": 1.25, + "w": 2 + }, + { + "label": "k77", + "x": 20, + "y": 1.25 + }, + { + "label": "k78", + "x": 21, + "y": 1.25 + }, + { + "label": "k79", + "x": 22, + "y": 1.25 + }, + { + "label": "k7a", + "x": 23, + "y": 1.25 + }, + { + "label": "k20", + "x": 0, + "y": 2.25, + "h": 2 + }, + { + "label": "k21", + "x": 1, + "y": 2.25 + }, + { + "label": "k22", + "x": 2, + "y": 2.25 + }, + { + "label": "k23", + "x": 3, + "y": 2.25 + }, + { + "label": "k24", + "x": 4.5, + "y": 2.25, + "w": 1.5 + }, + { + "label": "k25", + "x": 6, + "y": 2.25 + }, + { + "label": "k26", + "x": 7, + "y": 2.25 + }, + { + "label": "k27", + "x": 8, + "y": 2.25 + }, + { + "label": "k28", + "x": 9, + "y": 2.25 + }, + { + "label": "k29", + "x": 10, + "y": 2.25 + }, + { + "label": "k2a", + "x": 11, + "y": 2.25 + }, + { + "label": "k80", + "x": 12, + "y": 2.25 + }, + { + "label": "k81", + "x": 13, + "y": 2.25 + }, + { + "label": "k82", + "x": 14, + "y": 2.25 + }, + { + "label": "k83", + "x": 15, + "y": 2.25 + }, + { + "label": "k84", + "x": 16, + "y": 2.25 + }, + { + "label": "k85", + "x": 17, + "y": 2.25 + }, + { + "label": "k86", + "x": 18, + "y": 2.25, + "w": 1.5 + }, + { + "label": "k87", + "x": 20, + "y": 2.25 + }, + { + "label": "k88", + "x": 21, + "y": 2.25 + }, + { + "label": "k89", + "x": 22, + "y": 2.25 + }, + { + "label": "k8a", + "x": 23, + "y": 2.25, + "h": 2 + }, + { + "label": "k31", + "x": 1, + "y": 3.25 + }, + { + "label": "k32", + "x": 2, + "y": 3.25 + }, + { + "label": "k33", + "x": 3, + "y": 3.25 + }, + { + "label": "k34", + "x": 4.5, + "y": 3.25, + "w": 1.75 + }, + { + "label": "k35", + "x": 6.25, + "y": 3.25 + }, + { + "label": "k36", + "x": 7.25, + "y": 3.25 + }, + { + "label": "k37", + "x": 8.25, + "y": 3.25 + }, + { + "label": "k38", + "x": 9.25, + "y": 3.25 + }, + { + "label": "k39", + "x": 10.25, + "y": 3.25 + }, + { + "label": "k3a", + "x": 11.25, + "y": 3.25 + }, + { + "label": "k90", + "x": 12.25, + "y": 3.25 + }, + { + "label": "k91", + "x": 13.25, + "y": 3.25 + }, + { + "label": "k92", + "x": 14.25, + "y": 3.25 + }, + { + "label": "k93", + "x": 15.25, + "y": 3.25 + }, + { + "label": "k94", + "x": 16.25, + "y": 3.25 + }, + { + "label": "k95", + "x": 17.25, + "y": 3.25, + "w": 2.25 + }, + { + "label": "k97", + "x": 20, + "y": 3.25 + }, + { + "label": "k98", + "x": 21, + "y": 3.25 + }, + { + "label": "k99", + "x": 22, + "y": 3.25 + }, + { + "label": "k40", + "x": 0, + "y": 4.25, + "h": 2 + }, + { + "label": "k41", + "x": 1, + "y": 4.25 + }, + { + "label": "k42", + "x": 2, + "y": 4.25 + }, + { + "label": "k43", + "x": 3, + "y": 4.25 + }, + { + "label": "k45", + "x": 5.5, + "y": 4.25, + "w": 1.25 + }, + { + "label": "k46", + "x": 6.75, + "y": 4.25 + }, + { + "label": "k47", + "x": 7.75, + "y": 4.25 + }, + { + "label": "k48", + "x": 8.75, + "y": 4.25 + }, + { + "label": "k49", + "x": 9.75, + "y": 4.25 + }, + { + "label": "k4a", + "x": 10.75, + "y": 4.25 + }, + { + "label": "ka0", + "x": 11.75, + "y": 4.25 + }, + { + "label": "ka1", + "x": 12.75, + "y": 4.25 + }, + { + "label": "ka2", + "x": 13.75, + "y": 4.25 + }, + { + "label": "ka3", + "x": 14.75, + "y": 4.25 + }, + { + "label": "ka4", + "x": 15.75, + "y": 4.25 + }, + { + "label": "ka5", + "x": 16.75, + "y": 4.25, + "w": 1.75 + }, + { + "label": "ka7", + "x": 20, + "y": 4.25 + }, + { + "label": "ka8", + "x": 21, + "y": 4.25 + }, + { + "label": "ka9", + "x": 22, + "y": 4.25 + }, + { + "label": "kaa", + "x": 23, + "y": 4.25, + "h": 2 + }, + { + "label": "k44", + "x": 4.25, + "y": 4.5 + }, + { + "label": "k96", + "x": 18.75, + "y": 4.5 + }, + { + "label": "k51", + "x": 1, + "y": 5.25 + }, + { + "label": "k52", + "x": 2, + "y": 5.25 + }, + { + "label": "k56", + "x": 6.5, + "y": 5.25 + }, + { + "label": "k57", + "x": 7.5, + "y": 5.25 + }, + { + "label": "kb0", + "x": 8.5, + "y": 5.25, + "w": 7 + }, + { + "label": "kb4", + "x": 15.5, + "y": 5.25 + }, + { + "label": "kb5", + "x": 16.5, + "y": 5.25 + }, + { + "label": "kb8", + "x": 21, + "y": 5.25 + }, + { + "label": "kb9", + "x": 22, + "y": 5.25 + }, + { + "label": "k53", + "x": 3.25, + "y": 5.5 + }, + { + "label": "k54", + "x": 4.25, + "y": 5.5 + }, + { + "label": "k55", + "x": 5.25, + "y": 5.5 + }, + { + "label": "ka6", + "x": 17.75, + "y": 5.5 + }, + { + "label": "kb6", + "x": 18.75, + "y": 5.5 + }, + { + "label": "kb7", + "x": 19.75, + "y": 5.5 + } + ] + }, + "LAYOUT_4U_SPACE": { + "layout": [ + { + "label": "k00", + "x": 0, + "y": 0 + }, + { + "label": "k01", + "x": 1, + "y": 0 + }, + { + "label": "k02", + "x": 2, + "y": 0 + }, + { + "label": "k03", + "x": 3, + "y": 0 + }, + { + "label": "k04", + "x": 4.75, + "y": 0 + }, + { + "label": "k06", + "x": 6.25, + "y": 0 + }, + { + "label": "k07", + "x": 7.25, + "y": 0 + }, + { + "label": "k08", + "x": 8.25, + "y": 0 + }, + { + "label": "k09", + "x": 9.25, + "y": 0 + }, + { + "label": "k0a", + "x": 10.75, + "y": 0 + }, + { + "label": "k60", + "x": 11.75, + "y": 0 + }, + { + "label": "k61", + "x": 12.75, + "y": 0 + }, + { + "label": "k62", + "x": 13.75, + "y": 0 + }, + { + "label": "k63", + "x": 15.25, + "y": 0 + }, + { + "label": "k64", + "x": 16.25, + "y": 0 + }, + { + "label": "k65", + "x": 17.25, + "y": 0 + }, + { + "label": "k66", + "x": 18.25, + "y": 0 + }, + { + "label": "k67", + "x": 20, + "y": 0 + }, + { + "label": "k68", + "x": 21, + "y": 0 + }, + { + "label": "k69", + "x": 22, + "y": 0 + }, + { + "label": "k6a", + "x": 23, + "y": 0 + }, + { + "label": "k10", + "x": 0, + "y": 1.25 + }, + { + "label": "k11", + "x": 1, + "y": 1.25 + }, + { + "label": "k12", + "x": 2, + "y": 1.25 + }, + { + "label": "k13", + "x": 3, + "y": 1.25 + }, + { + "label": "k14", + "x": 4.5, + "y": 1.25 + }, + { + "label": "k15", + "x": 5.5, + "y": 1.25 + }, + { + "label": "k16", + "x": 6.5, + "y": 1.25 + }, + { + "label": "k17", + "x": 7.5, + "y": 1.25 + }, + { + "label": "k18", + "x": 8.5, + "y": 1.25 + }, + { + "label": "k19", + "x": 9.5, + "y": 1.25 + }, + { + "label": "k0a", + "x": 10.5, + "y": 1.25 + }, + { + "label": "k70", + "x": 11.5, + "y": 1.25 + }, + { + "label": "k71", + "x": 12.5, + "y": 1.25 + }, + { + "label": "k72", + "x": 13.5, + "y": 1.25 + }, + { + "label": "k73", + "x": 14.5, + "y": 1.25 + }, + { + "label": "k74", + "x": 15.5, + "y": 1.25 + }, + { + "label": "k75", + "x": 16.5, + "y": 1.25 + }, + { + "label": "k76", + "x": 17.5, + "y": 1.25, + "w": 2 + }, + { + "label": "k77", + "x": 20, + "y": 1.25 + }, + { + "label": "k78", + "x": 21, + "y": 1.25 + }, + { + "label": "k79", + "x": 22, + "y": 1.25 + }, + { + "label": "k7a", + "x": 23, + "y": 1.25 + }, + { + "label": "k20", + "x": 0, + "y": 2.25, + "h": 2 + }, + { + "label": "k21", + "x": 1, + "y": 2.25 + }, + { + "label": "k22", + "x": 2, + "y": 2.25 + }, + { + "label": "k23", + "x": 3, + "y": 2.25 + }, + { + "label": "k24", + "x": 4.5, + "y": 2.25, + "w": 1.5 + }, + { + "label": "k25", + "x": 6, + "y": 2.25 + }, + { + "label": "k26", + "x": 7, + "y": 2.25 + }, + { + "label": "k27", + "x": 8, + "y": 2.25 + }, + { + "label": "k28", + "x": 9, + "y": 2.25 + }, + { + "label": "k29", + "x": 10, + "y": 2.25 + }, + { + "label": "k2a", + "x": 11, + "y": 2.25 + }, + { + "label": "k80", + "x": 12, + "y": 2.25 + }, + { + "label": "k81", + "x": 13, + "y": 2.25 + }, + { + "label": "k82", + "x": 14, + "y": 2.25 + }, + { + "label": "k83", + "x": 15, + "y": 2.25 + }, + { + "label": "k84", + "x": 16, + "y": 2.25 + }, + { + "label": "k85", + "x": 17, + "y": 2.25 + }, + { + "label": "k86", + "x": 18, + "y": 2.25, + "w": 1.5 + }, + { + "label": "k87", + "x": 20, + "y": 2.25 + }, + { + "label": "k88", + "x": 21, + "y": 2.25 + }, + { + "label": "k89", + "x": 22, + "y": 2.25 + }, + { + "label": "k8a", + "x": 23, + "y": 2.25, + "h": 2 + }, + { + "label": "k31", + "x": 1, + "y": 3.25 + }, + { + "label": "k32", + "x": 2, + "y": 3.25 + }, + { + "label": "k33", + "x": 3, + "y": 3.25 + }, + { + "label": "k34", + "x": 4.5, + "y": 3.25, + "w": 1.75 + }, + { + "label": "k35", + "x": 6.25, + "y": 3.25 + }, + { + "label": "k36", + "x": 7.25, + "y": 3.25 + }, + { + "label": "k37", + "x": 8.25, + "y": 3.25 + }, + { + "label": "k38", + "x": 9.25, + "y": 3.25 + }, + { + "label": "k39", + "x": 10.25, + "y": 3.25 + }, + { + "label": "k3a", + "x": 11.25, + "y": 3.25 + }, + { + "label": "k90", + "x": 12.25, + "y": 3.25 + }, + { + "label": "k91", + "x": 13.25, + "y": 3.25 + }, + { + "label": "k92", + "x": 14.25, + "y": 3.25 + }, + { + "label": "k93", + "x": 15.25, + "y": 3.25 + }, + { + "label": "k94", + "x": 16.25, + "y": 3.25 + }, + { + "label": "k95", + "x": 17.25, + "y": 3.25, + "w": 2.25 + }, + { + "label": "k97", + "x": 20, + "y": 3.25 + }, + { + "label": "k98", + "x": 21, + "y": 3.25 + }, + { + "label": "k99", + "x": 22, + "y": 3.25 + }, + { + "label": "k40", + "x": 0, + "y": 4.25, + "h": 2 + }, + { + "label": "k41", + "x": 1, + "y": 4.25 + }, + { + "label": "k42", + "x": 2, + "y": 4.25 + }, + { + "label": "k43", + "x": 3, + "y": 4.25 + }, + { + "label": "k45", + "x": 5.5, + "y": 4.25, + "w": 1.25 + }, + { + "label": "k46", + "x": 6.75, + "y": 4.25 + }, + { + "label": "k47", + "x": 7.75, + "y": 4.25 + }, + { + "label": "k48", + "x": 8.75, + "y": 4.25 + }, + { + "label": "k49", + "x": 9.75, + "y": 4.25 + }, + { + "label": "k4a", + "x": 10.75, + "y": 4.25 + }, + { + "label": "ka0", + "x": 11.75, + "y": 4.25 + }, + { + "label": "ka1", + "x": 12.75, + "y": 4.25 + }, + { + "label": "ka2", + "x": 13.75, + "y": 4.25 + }, + { + "label": "ka3", + "x": 14.75, + "y": 4.25 + }, + { + "label": "ka4", + "x": 15.75, + "y": 4.25 + }, + { + "label": "ka5", + "x": 16.75, + "y": 4.25, + "w": 1.75 + }, + { + "label": "ka7", + "x": 20, + "y": 4.25 + }, + { + "label": "ka8", + "x": 21, + "y": 4.25 + }, + { + "label": "ka9", + "x": 22, + "y": 4.25 + }, + { + "label": "kaa", + "x": 23, + "y": 4.25, + "h": 2 + }, + { + "label": "k44", + "x": 4.25, + "y": 4.5 + }, + { + "label": "k96", + "x": 18.75, + "y": 4.5 + }, + { + "label": "k51", + "x": 1, + "y": 5.25 + }, + { + "label": "k52", + "x": 2, + "y": 5.25 + }, + { + "label": "k56", + "x": 6.5, + "y": 5.25 + }, + { + "label": "k57", + "x": 7.5, + "y": 5.25 + }, + { + "label": "k58", + "x": 8.5, + "y": 5.25 + }, + { + "label": "kb0", + "x": 9.5, + "y": 5.25, + "w": 4 + }, + { + "label": "kb2", + "x": 13.5, + "y": 5.25 + }, + { + "label": "kb3", + "x": 14.5, + "y": 5.25 + }, + { + "label": "kb4", + "x": 15.5, + "y": 5.25 + }, + { + "label": "kb5", + "x": 16.5, + "y": 5.25 + }, + { + "label": "kb8", + "x": 21, + "y": 5.25 + }, + { + "label": "kb9", + "x": 22, + "y": 5.25 + }, + { + "label": "k53", + "x": 3.25, + "y": 5.5 + }, + { + "label": "k54", + "x": 4.25, + "y": 5.5 + }, + { + "label": "k55", + "x": 5.25, + "y": 5.5 + }, + { + "label": "ka6", + "x": 17.75, + "y": 5.5 + }, + { + "label": "kb6", + "x": 18.75, + "y": 5.5 + }, + { + "label": "kb7", + "x": 19.75, + "y": 5.5 + } + ] + } + } +} diff --git a/keyboards/clueboard/2x1800/keymaps/default/config.h b/keyboards/clueboard/2x1800/keymaps/default/config.h new file mode 100644 index 000000000000..f5eccb225297 --- /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 000000000000..f0b7184e0fbb --- /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 000000000000..4e3457efce62 --- /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 000000000000..f5eccb225297 --- /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 000000000000..d12a3fc8f307 --- /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 000000000000..a696972e8c4b --- /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 000000000000..f5eccb225297 --- /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 000000000000..74a35c27b5ba --- /dev/null +++ b/keyboards/clueboard/2x1800/keymaps/default_7u/keymap.c @@ -0,0 +1,49 @@ +/* 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_DEL, \ + \ + KC_PMNS, KC_NLCK, KC_PSLS, KC_PAST, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + KC_PPLS, KC_P7, KC_P8, KC_P9, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PSLS, \ + KC_P4, KC_P5, KC_P6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \ + KC_PENT, KC_P1, KC_P2, KC_P3, KC_UP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \ + KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_RGHT, KC_LCTL, KC_LALT, KC_SPC, KC_LGUI, KC_APP, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT \ +) +}; + + +#ifdef AUDIO_ENABLE + float song_one_up[][2] = SONG(ONE_UP_SOUND); +#endif + +volatile uint8_t runonce = true; +static uint16_t my_timer; + +void matrix_init_user(void) { + my_timer = timer_read(); +} + +void matrix_scan_user(void) { + if (runonce && timer_elapsed(my_timer) > 500) { + runonce = false; +#ifdef AUDIO_ENABLE + PLAY_SONG(song_one_up); +#endif + } +} diff --git a/keyboards/clueboard/2x1800/keymaps/default_7u/readme.md b/keyboards/clueboard/2x1800/keymaps/default_7u/readme.md new file mode 100644 index 000000000000..f5718e842dc2 --- /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 000000000000..f5eccb225297 --- /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 000000000000..2d8ef349edd7 --- /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 000000000000..61c9468e7dc1 --- /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 000000000000..f5eccb225297 --- /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 000000000000..d4108a779f4c --- /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 000000000000..41304eca5e91 --- /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 000000000000..6c605daecf53 --- /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 000000000000..f5eccb225297 --- /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 000000000000..ee255e239203 --- /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 000000000000..51939d6347fc --- /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 000000000000..6c605daecf53 --- /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 000000000000..a820852c1e85 --- /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 000000000000..516a536f6b1d --- /dev/null +++ b/keyboards/clueboard/2x1800/rules.mk @@ -0,0 +1,64 @@ +# 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 +RGBLIGHT_ENABLE = no # RGB on port C6 +AUDIO_ENABLE = no # Audio output on port C4 and B7 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.c b/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.c index 897f20a88737..4331155df4b6 100644 --- a/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.c +++ b/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.c @@ -62,13 +62,15 @@ const PALConfig pal_default_config = { }; #endif +void enter_bootloader_mode_if_requested(void); + /** * @brief Early initialization code. * @details This initialization must be performed just after stack setup * and before any other initialization. */ void __early_init(void) { - + enter_bootloader_mode_if_requested(); stm32_clock_init(); } diff --git a/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.h b/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.h index 7405c0ea905e..e09112eb982a 100644 --- a/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.h +++ b/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.h @@ -1164,14 +1164,14 @@ /* * USB bus activation macro, required by the USB driver. */ -// #define usb_lld_connect_bus(usbp) +// #define usb_lld_connect_bus(usbp) #define usb_lld_connect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_ALTERNATE(14))) // #define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT) /* * USB bus de-activation macro, required by the USB driver. */ // #define usb_lld_disconnect_bus(usbp) -#define usb_lld_disconnect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_OUTPUT_PUSHPULL)) +#define usb_lld_disconnect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_OUTPUT_PUSHPULL)); palClearPad(GPIOA, GPIOA_USB_DP) // #define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12) #if !defined(_FROM_ASM_) diff --git a/keyboards/clueboard/60/config.h b/keyboards/clueboard/60/config.h index 333698a0877b..5c5a86296f95 100644 --- a/keyboards/clueboard/60/config.h +++ b/keyboards/clueboard/60/config.h @@ -22,11 +22,9 @@ #define VENDOR_ID 0xC1ED #define PRODUCT_ID 0x2350 #define DEVICE_VER 0x0001 -#define MANUFACTURER "Clueboard" -#define USBSTR_MANUFACTURER 'C', '\x00', 'l', '\x00', 'u', '\x00', 'e', '\x00', 'b', '\x00', 'o', '\x00', 'a', '\x00', 'r', '\x00', 'd', '\x00' -#define PRODUCT "Clueboard60" -#define USBSTR_PRODUCT 'C', '\x00', 'l', '\x00', 'u', '\x00', 'e', '\x00', 'b', '\x00', 'o', '\x00', 'a', '\x00', 'r', '\x00', 'd', '\x00', ' ', '\x00', '6', '\x00', '0', '\x00', '%', '\x00' -#define DESCRIPTION "Clueboard 60%" +#define MANUFACTURER Clueboard +#define PRODUCT Clueboard 60% +#define DESCRIPTION Clueboard 60% /* key matrix size */ #define MATRIX_ROWS 5 diff --git a/keyboards/clueboard/60/halconf.h b/keyboards/clueboard/60/halconf.h index 254470cbd032..e617fdffc790 100644 --- a/keyboards/clueboard/60/halconf.h +++ b/keyboards/clueboard/60/halconf.h @@ -146,7 +146,7 @@ * @brief Enables the SERIAL over USB subsystem. */ #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL_USB TRUE +#define HAL_USE_SERIAL_USB FALSE #endif /** @@ -320,7 +320,7 @@ * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 256 +#define SERIAL_USB_BUFFERS_SIZE 1 #endif /** diff --git a/keyboards/clueboard/60/info.json b/keyboards/clueboard/60/info.json new file mode 100644 index 000000000000..abafb69f99e7 --- /dev/null +++ b/keyboards/clueboard/60/info.json @@ -0,0 +1,1650 @@ +{ + "keyboard_name": "clueboard/60", + "maintainer": "skullydazed", + "url": "", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_ansi": { + "key_count": 61, + "layout": [ + { + "label": "~", + "x": 0, + "y": 0 + }, + { + "label": "!", + "x": 1, + "y": 0 + }, + { + "label": "@", + "x": 2, + "y": 0 + }, + { + "label": "#", + "x": 3, + "y": 0 + }, + { + "label": "$", + "x": 4, + "y": 0 + }, + { + "label": "%", + "x": 5, + "y": 0 + }, + { + "label": "^", + "x": 6, + "y": 0 + }, + { + "label": "&", + "x": 7, + "y": 0 + }, + { + "label": "*", + "x": 8, + "y": 0 + }, + { + "label": "(", + "x": 9, + "y": 0 + }, + { + "label": ")", + "x": 10, + "y": 0 + }, + { + "label": "_", + "x": 11, + "y": 0 + }, + { + "label": "+", + "x": 12, + "y": 0 + }, + { + "label": "Backspace", + "x": 13, + "y": 0, + "w": 2 + }, + { + "label": "Tab", + "x": 0, + "y": 1, + "w": 1.5 + }, + { + "label": "Q", + "x": 1.5, + "y": 1 + }, + { + "label": "W", + "x": 2.5, + "y": 1 + }, + { + "label": "E", + "x": 3.5, + "y": 1 + }, + { + "label": "R", + "x": 4.5, + "y": 1 + }, + { + "label": "T", + "x": 5.5, + "y": 1 + }, + { + "label": "Y", + "x": 6.5, + "y": 1 + }, + { + "label": "U", + "x": 7.5, + "y": 1 + }, + { + "label": "I", + "x": 8.5, + "y": 1 + }, + { + "label": "O", + "x": 9.5, + "y": 1 + }, + { + "label": "P", + "x": 10.5, + "y": 1 + }, + { + "label": "{", + "x": 11.5, + "y": 1 + }, + { + "label": "}", + "x": 12.5, + "y": 1 + }, + { + "label": "|", + "x": 13.5, + "y": 1, + "w": 1.5 + }, + { + "label": "Caps Lock", + "x": 0, + "y": 2, + "w": 1.75 + }, + { + "label": "A", + "x": 1.75, + "y": 2 + }, + { + "label": "S", + "x": 2.75, + "y": 2 + }, + { + "label": "D", + "x": 3.75, + "y": 2 + }, + { + "label": "F", + "x": 4.75, + "y": 2 + }, + { + "label": "G", + "x": 5.75, + "y": 2 + }, + { + "label": "H", + "x": 6.75, + "y": 2 + }, + { + "label": "J", + "x": 7.75, + "y": 2 + }, + { + "label": "K", + "x": 8.75, + "y": 2 + }, + { + "label": "L", + "x": 9.75, + "y": 2 + }, + { + "label": ":", + "x": 10.75, + "y": 2 + }, + { + "label": "\"", + "x": 11.75, + "y": 2 + }, + { + "label": "Enter", + "x": 12.75, + "y": 2, + "w": 2.25 + }, + { + "label": "Shift", + "x": 0, + "y": 3, + "w": 2.25 + }, + { + "label": "Z", + "x": 2.25, + "y": 3 + }, + { + "label": "X", + "x": 3.25, + "y": 3 + }, + { + "label": "C", + "x": 4.25, + "y": 3 + }, + { + "label": "V", + "x": 5.25, + "y": 3 + }, + { + "label": "B", + "x": 6.25, + "y": 3 + }, + { + "label": "N", + "x": 7.25, + "y": 3 + }, + { + "label": "M", + "x": 8.25, + "y": 3 + }, + { + "label": "<", + "x": 9.25, + "y": 3 + }, + { + "label": ">", + "x": 10.25, + "y": 3 + }, + { + "label": "?", + "x": 11.25, + "y": 3 + }, + { + "label": "Shift", + "x": 12.25, + "y": 3, + "w": 2.75 + }, + { + "label": "Ctrl", + "x": 0, + "y": 4, + "w": 1.25 + }, + { + "label": "Win", + "x": 1.25, + "y": 4, + "w": 1.25 + }, + { + "label": "Alt", + "x": 2.5, + "y": 4, + "w": 1.25 + }, + { + "x": 3.75, + "y": 4, + "w": 6.25 + }, + { + "label": "Alt", + "x": 10, + "y": 4, + "w": 1.25 + }, + { + "label": "Win", + "x": 11.25, + "y": 4, + "w": 1.25 + }, + { + "label": "Menu", + "x": 12.5, + "y": 4, + "w": 1.25 + }, + { + "label": "Ctrl", + "x": 13.75, + "y": 4, + "w": 1.25 + } + ] + }, + "LAYOUT_60_iso": { + "key_count": 62, + "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 + } + ] + }, + "KEYMAP_AEK": { + "key_count": 60, + "layout": [ + { + "label": "~", + "x": 0, + "y": 0 + }, + { + "label": "!", + "x": 1, + "y": 0 + }, + { + "label": "@", + "x": 2, + "y": 0 + }, + { + "label": "#", + "x": 3, + "y": 0 + }, + { + "label": "$", + "x": 4, + "y": 0 + }, + { + "label": "%", + "x": 5, + "y": 0 + }, + { + "label": "^", + "x": 6, + "y": 0 + }, + { + "label": "&", + "x": 7, + "y": 0 + }, + { + "label": "*", + "x": 8, + "y": 0 + }, + { + "label": "(", + "x": 9, + "y": 0 + }, + { + "label": ")", + "x": 10, + "y": 0 + }, + { + "label": "_", + "x": 11, + "y": 0 + }, + { + "label": "+", + "x": 12, + "y": 0 + }, + { + "label": "Backspace", + "x": 13, + "y": 0, + "w": 2 + }, + { + "label": "Tab", + "x": 0, + "y": 1, + "w": 1.5 + }, + { + "label": "Q", + "x": 1.5, + "y": 1 + }, + { + "label": "W", + "x": 2.5, + "y": 1 + }, + { + "label": "E", + "x": 3.5, + "y": 1 + }, + { + "label": "R", + "x": 4.5, + "y": 1 + }, + { + "label": "T", + "x": 5.5, + "y": 1 + }, + { + "label": "Y", + "x": 6.5, + "y": 1 + }, + { + "label": "U", + "x": 7.5, + "y": 1 + }, + { + "label": "I", + "x": 8.5, + "y": 1 + }, + { + "label": "O", + "x": 9.5, + "y": 1 + }, + { + "label": "P", + "x": 10.5, + "y": 1 + }, + { + "label": "{", + "x": 11.5, + "y": 1 + }, + { + "label": "}", + "x": 12.5, + "y": 1 + }, + { + "label": "|", + "x": 13.5, + "y": 1, + "w": 1.5 + }, + { + "label": "Caps Lock", + "x": 0, + "y": 2, + "w": 1.75 + }, + { + "label": "A", + "x": 1.75, + "y": 2 + }, + { + "label": "S", + "x": 2.75, + "y": 2 + }, + { + "label": "D", + "x": 3.75, + "y": 2 + }, + { + "label": "F", + "x": 4.75, + "y": 2 + }, + { + "label": "G", + "x": 5.75, + "y": 2 + }, + { + "label": "H", + "x": 6.75, + "y": 2 + }, + { + "label": "J", + "x": 7.75, + "y": 2 + }, + { + "label": "K", + "x": 8.75, + "y": 2 + }, + { + "label": "L", + "x": 9.75, + "y": 2 + }, + { + "label": ":", + "x": 10.75, + "y": 2 + }, + { + "label": "\"", + "x": 11.75, + "y": 2 + }, + { + "label": "Enter", + "x": 12.75, + "y": 2, + "w": 2.25 + }, + { + "label": "Shift", + "x": 0, + "y": 3, + "w": 2.25 + }, + { + "label": "Z", + "x": 2.25, + "y": 3 + }, + { + "label": "X", + "x": 3.25, + "y": 3 + }, + { + "label": "C", + "x": 4.25, + "y": 3 + }, + { + "label": "V", + "x": 5.25, + "y": 3 + }, + { + "label": "B", + "x": 6.25, + "y": 3 + }, + { + "label": "N", + "x": 7.25, + "y": 3 + }, + { + "label": "M", + "x": 8.25, + "y": 3 + }, + { + "label": "<", + "x": 9.25, + "y": 3 + }, + { + "label": ">", + "x": 10.25, + "y": 3 + }, + { + "label": "?", + "x": 11.25, + "y": 3 + }, + { + "label": "Shift", + "x": 12.25, + "y": 3, + "w": 2.75 + }, + { + "label": "Ctrl", + "x": 0, + "y": 4, + "w": 1.5 + }, + { + "label": "Win", + "x": 1.5, + "y": 4, + "w": 1.25 + }, + { + "label": "Alt", + "x": 2.75, + "y": 4, + "w": 1.5 + }, + { + "x": 4.25, + "y": 4, + "w": 6.5 + }, + { + "label": "AltGr", + "x": 10.75, + "y": 4, + "w": 1.5 + }, + { + "label": "Win", + "x": 12.25, + "y": 4, + "w": 1.25 + }, + { + "label": "Ctrl", + "x": 13.5, + "y": 4, + "w": 1.5 + } + ] + }, + "KEYMAP": { + "key_count": 65, + "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 + }, + { + "label": "Back", + "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 + }, + { + "x": 0, + "y": 3 + }, + { + "label": "Shift", + "x": 1, + "y": 3, + "w": 1.25 + }, + { + "label": "Z", + "x": 2.25, + "y": 3 + }, + { + "label": "X", + "x": 3.25, + "y": 3 + }, + { + "label": "C", + "x": 4.25, + "y": 3 + }, + { + "label": "V", + "x": 5.25, + "y": 3 + }, + { + "label": "B", + "x": 6.25, + "y": 3 + }, + { + "label": "N", + "x": 7.25, + "y": 3 + }, + { + "label": "M", + "x": 8.25, + "y": 3 + }, + { + "label": "<", + "x": 9.25, + "y": 3 + }, + { + "label": ">", + "x": 10.25, + "y": 3 + }, + { + "label": "?", + "x": 11.25, + "y": 3 + }, + { + "label": "Shift", + "x": 12.25, + "y": 3, + "w": 1.75 + }, + { + "x": 14, + "y": 3 + }, + { + "label": "Ctrl", + "x": 0, + "y": 4, + "w": 1.25 + }, + { + "label": "Win", + "x": 1.25, + "y": 4, + "w": 1.25 + }, + { + "label": "Alt", + "x": 2.5, + "y": 4, + "w": 1.25 + }, + { + "x": 3.75, + "y": 4, + "w": 6.25 + }, + { + "label": "Alt", + "x": 10, + "y": 4, + "w": 1.25 + }, + { + "label": "Win", + "x": 11.25, + "y": 4, + "w": 1.25 + }, + { + "label": "Menu", + "x": 12.5, + "y": 4, + "w": 1.25 + }, + { + "label": "Ctrl", + "x": 13.75, + "y": 4, + "w": 1.25 + } + ] + }, + "LAYOUT_60_ansi_split_bs_rshift": { + "key_count": 63, + "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 + }, + { + "label": "Back", + "x": 14, + "y": 0 + }, + { + "label": "Tab", + "x": 0, + "y": 1, + "w": 1.5 + }, + { + "label": "Q", + "x": 1.5, + "y": 1 + }, + { + "label": "W", + "x": 2.5, + "y": 1 + }, + { + "label": "E", + "x": 3.5, + "y": 1 + }, + { + "label": "R", + "x": 4.5, + "y": 1 + }, + { + "label": "T", + "x": 5.5, + "y": 1 + }, + { + "label": "Y", + "x": 6.5, + "y": 1 + }, + { + "label": "U", + "x": 7.5, + "y": 1 + }, + { + "label": "I", + "x": 8.5, + "y": 1 + }, + { + "label": "O", + "x": 9.5, + "y": 1 + }, + { + "label": "P", + "x": 10.5, + "y": 1 + }, + { + "label": "{", + "x": 11.5, + "y": 1 + }, + { + "label": "}", + "x": 12.5, + "y": 1 + }, + { + "label": "|", + "x": 13.5, + "y": 1, + "w": 1.5 + }, + { + "label": "Caps Lock", + "x": 0, + "y": 2, + "w": 1.75 + }, + { + "label": "A", + "x": 1.75, + "y": 2 + }, + { + "label": "S", + "x": 2.75, + "y": 2 + }, + { + "label": "D", + "x": 3.75, + "y": 2 + }, + { + "label": "F", + "x": 4.75, + "y": 2 + }, + { + "label": "G", + "x": 5.75, + "y": 2 + }, + { + "label": "H", + "x": 6.75, + "y": 2 + }, + { + "label": "J", + "x": 7.75, + "y": 2 + }, + { + "label": "K", + "x": 8.75, + "y": 2 + }, + { + "label": "L", + "x": 9.75, + "y": 2 + }, + { + "label": ":", + "x": 10.75, + "y": 2 + }, + { + "label": "\"", + "x": 11.75, + "y": 2 + }, + { + "label": "Enter", + "x": 12.75, + "y": 2, + "w": 2.25 + }, + { + "label": "Shift", + "x": 0, + "y": 3, + "w": 2.25 + }, + { + "label": "Z", + "x": 2.25, + "y": 3 + }, + { + "label": "X", + "x": 3.25, + "y": 3 + }, + { + "label": "C", + "x": 4.25, + "y": 3 + }, + { + "label": "V", + "x": 5.25, + "y": 3 + }, + { + "label": "B", + "x": 6.25, + "y": 3 + }, + { + "label": "N", + "x": 7.25, + "y": 3 + }, + { + "label": "M", + "x": 8.25, + "y": 3 + }, + { + "label": "<", + "x": 9.25, + "y": 3 + }, + { + "label": ">", + "x": 10.25, + "y": 3 + }, + { + "label": "?", + "x": 11.25, + "y": 3 + }, + { + "label": "Shift", + "x": 12.25, + "y": 3, + "w": 1.75 + }, + { + "x": 14, + "y": 3 + }, + { + "label": "Ctrl", + "x": 0, + "y": 4, + "w": 1.25 + }, + { + "label": "Win", + "x": 1.25, + "y": 4, + "w": 1.25 + }, + { + "label": "Alt", + "x": 2.5, + "y": 4, + "w": 1.25 + }, + { + "x": 3.75, + "y": 4, + "w": 6.25 + }, + { + "label": "Alt", + "x": 10, + "y": 4, + "w": 1.25 + }, + { + "label": "Win", + "x": 11.25, + "y": 4, + "w": 1.25 + }, + { + "label": "Menu", + "x": 12.5, + "y": 4, + "w": 1.25 + }, + { + "label": "Ctrl", + "x": 13.75, + "y": 4, + "w": 1.25 + } + ] + } + } +} diff --git a/keyboards/clueboard/60/keymaps/default/keymap.c b/keyboards/clueboard/60/keymaps/default/keymap.c index 1b0c71264097..8397c4bbfb1a 100644 --- a/keyboards/clueboard/60/keymaps/default/keymap.c +++ b/keyboards/clueboard/60/keymaps/default/keymap.c @@ -3,11 +3,35 @@ #define _______ KC_TRNS enum keyboard_layers { - _BL, - _FL, - _CL + _BL, + _FL, + _CL }; +enum custom_keycodes { + S_BSKTC = SAFE_RANGE, + S_ODEJY, + S_RCKBY, + S_DOEDR, + S_SCALE, + S_ONEUP, + S_COIN, + S_SONIC, + S_ZELDA +}; + +#ifdef AUDIO_ENABLE + float song_basketcase[][2] = SONG(BASKET_CASE); + float song_ode_to_joy[][2] = SONG(ODE_TO_JOY); + float song_rock_a_bye_baby[][2] = SONG(ROCK_A_BYE_BABY); + float song_doe_a_deer[][2] = SONG(DOE_A_DEER); + float song_scale[][2] = SONG(MUSIC_SCALE_SOUND); + float song_coin[][2] = SONG(COIN_SOUND); + float song_one_up[][2] = SONG(ONE_UP_SOUND); + float song_sonic_ring[][2] = SONG(SONIC_RING); + float song_zelda_puzzle[][2] = SONG(ZELDA_PUZZLE); +#endif + const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0: Default Layer * ,-----------------------------------------------------------. @@ -33,11 +57,71 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, \ - _______, _______, _______, _______, _______, _______, MO(_FL), _______), + _______,_______,_______, _______, _______, _______, MO(_FL), _______), [_CL] = KEYMAP( - BL_STEP,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + BL_STEP,S_BSKTC,S_ODEJY,S_RCKBY,S_DOEDR,S_SCALE,S_ONEUP,S_COIN, S_SONIC,S_ZELDA,_______,_______,_______,_______,_______,\ _______, _______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, \ _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ _______, _______, _______, _______, _______, _______, MO(_FL), _______) }; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case S_BSKTC: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_basketcase); + } + return false; + case S_ODEJY: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_ode_to_joy); + } + return false; + case S_RCKBY: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_rock_a_bye_baby); + } + return false; + case S_DOEDR: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_doe_a_deer); + } + return false; + case S_SCALE: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_scale); + } + return false; + case S_ONEUP: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_one_up); + } + return false; + case S_COIN: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_coin); + } + return false; + case S_SONIC: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_sonic_ring); + } + return false; + case S_ZELDA: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_zelda_puzzle); + } + return false; + } + return true; +} diff --git a/keyboards/clueboard/60/keymaps/yanfali/keymap.c b/keyboards/clueboard/60/keymaps/yanfali/keymap.c new file mode 100644 index 000000000000..eec17720a5d0 --- /dev/null +++ b/keyboards/clueboard/60/keymaps/yanfali/keymap.c @@ -0,0 +1,134 @@ +#include "60.h" + +#define _______ KC_TRNS + +enum keyboard_layers { + _BL, + _FL, + _CL, + _YF +}; + +enum custom_keycodes { + S_BSKTC = SAFE_RANGE, + S_ODEJY, + S_RCKBY, + S_DOEDR, + S_SCALE, + S_ONEUP, + S_COIN, + S_SONIC, + S_ZELDA +}; + +#ifdef AUDIO_ENABLE + float song_basketcase[][2] = SONG(BASKET_CASE); + float song_ode_to_joy[][2] = SONG(ODE_TO_JOY); + float song_rock_a_bye_baby[][2] = SONG(ROCK_A_BYE_BABY); + float song_doe_a_deer[][2] = SONG(DOE_A_DEER); + float song_scale[][2] = SONG(MUSIC_SCALE_SOUND); + float song_coin[][2] = SONG(COIN_SOUND); + float song_one_up[][2] = SONG(ONE_UP_SOUND); + float song_sonic_ring[][2] = SONG(SONIC_RING); + float song_zelda_puzzle[][2] = SONG(ZELDA_PUZZLE); +#endif + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0: Default Layer + * ,-----------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| `|BSp| + * |-----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| + * |-----------------------------------------------------------------| + * |MT(CTL, ESC)| A| S| D| F| G| H| J| K| L| ;| '|Enter | + * |-----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn0| + * |-----------------------------------------------------------------' + * |Ctrl |Alt|Gui | Space |Alt |Gui|Fn |Ctrl | + * `-----------------------------------------------------------------' + */ + [_BL] = KEYMAP( + KC_GESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_GRV, KC_BSPC,\ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, \ + MT(MOD_LCTL, KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS, KC_ENT, \ + KC_LSFT, KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, MO(_YF), \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL), + [_FL] = KEYMAP( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,_______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, MO(_YF), \ + _______,_______,_______, _______, _______, _______, MO(_FL), _______), + [_CL] = KEYMAP( + BL_STEP,S_BSKTC,S_ODEJY,S_RCKBY,S_DOEDR,S_SCALE,S_ONEUP,S_COIN, S_SONIC,S_ZELDA,_______,_______,_______,_______,_______,\ + _______, _______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, MO(_YF), \ + _______, _______, _______, _______, _______, _______, MO(_FL), _______), + [_YF] = KEYMAP( + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______,_______,KC_UP ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______,KC_LEFT,KC_DOWN,KC_RIGHT,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, MO(_YF), \ + _______, _______, _______, _______, _______, _______, MO(_FL), _______) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case S_BSKTC: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_basketcase); + } + return false; + case S_ODEJY: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_ode_to_joy); + } + return false; + case S_RCKBY: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_rock_a_bye_baby); + } + return false; + case S_DOEDR: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_doe_a_deer); + } + return false; + case S_SCALE: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_scale); + } + return false; + case S_ONEUP: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_one_up); + } + return false; + case S_COIN: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_coin); + } + return false; + case S_SONIC: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_sonic_ring); + } + return false; + case S_ZELDA: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_zelda_puzzle); + } + return false; + } + return true; +} diff --git a/keyboards/clueboard/60/keymaps/yanfali/readme.md b/keyboards/clueboard/60/keymaps/yanfali/readme.md new file mode 100644 index 000000000000..8b8705176206 --- /dev/null +++ b/keyboards/clueboard/60/keymaps/yanfali/readme.md @@ -0,0 +1,14 @@ +# /u/yanfali keymap for clueboard 60% + +Almost the same as default but differs in the following ways + + 1. `Caps Lock` -> `MT(KC_LCTL, KC_ESC)`. + I'm a heavy vim user and I prefer escape to be closer than default. I also move `Control` to this key if you hold it. + 1. Switch Alt and GUI. + I spend most of my time on OSX, so I reverse Alt and GUI to be + more comfortable on OSX. + 1. Added a custom layer. + I use this to map the cursor keys to WASD, the familiar directional + gaming keys. As I use a split right shift, this naturally leads + to the left hand being used for navigation. This is also the + best place to add custom mappings, macros and combo keys. diff --git a/keyboards/clueboard/60/led.c b/keyboards/clueboard/60/led.c index fdf244ad50a5..350696736bea 100644 --- a/keyboards/clueboard/60/led.c +++ b/keyboards/clueboard/60/led.c @@ -23,7 +23,7 @@ void backlight_init_ports(void) { printf("backlight_init_ports()\n"); #ifdef BACKLIGHT_ENABLE - palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL); palSetPad(GPIOB, 8); #endif } @@ -41,13 +41,8 @@ void backlight_set(uint8_t level) { #endif } -void led_init_ports() { - printf("led_init_ports()\n"); - palSetPadMode(GPIOB, 7, PAL_MODE_OUTPUT_PUSHPULL); -} - void led_set_kb(uint8_t usb_led) { - printf("led_init_ports()\n"); + printf("led_set_kb(%d)\n", usb_led); if (usb_led & (1< DEBOUNCE) { for (int row = 0; row < MATRIX_ROWS; row++) { matrix[row] = 0; diff --git a/keyboards/clueboard/60/rules.mk b/keyboards/clueboard/60/rules.mk index 01b7dad9b385..3664b6d2c1d4 100644 --- a/keyboards/clueboard/60/rules.mk +++ b/keyboards/clueboard/60/rules.mk @@ -28,14 +28,16 @@ MCU = cortex-m4 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 ARMV = 7 +USE_FPU = yes + # Vector table for application # 0x00000000-0x00001000 area is occupied by bootlaoder.*/ # The CORTEX_VTOR... is needed only for MCHCK/Infinity KB # OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 -OPT_DEFS = +OPT_DEFS = # Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000 -R +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave # Build Options # comment out to disable the options. @@ -50,5 +52,5 @@ COMMAND_ENABLE = yes # Commands for debug and configuration #SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover CUSTOM_MATRIX = yes # Custom matrix file -#AUDIO_ENABLE = yes +AUDIO_ENABLE = yes # SERIAL_LINK_ENABLE = yes diff --git a/keyboards/clueboard/66/info.json b/keyboards/clueboard/66/info.json index cfd6913ca486..7faeae29c4f3 100644 --- a/keyboards/clueboard/66/info.json +++ b/keyboards/clueboard/66/info.json @@ -1,7 +1,5 @@ { "keyboard_name": "Clueboard 66%", - "processor": "atmega32u4", - "bootloader": "atmel-dfu", "width": 16.5, "height": 5, "layouts": { diff --git a/keyboards/clueboard/66/keymaps/66_ansi/keymap.c b/keyboards/clueboard/66/keymaps/66_ansi/keymap.c new file mode 100644 index 000000000000..cfa641dcc6c8 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/66_ansi/keymap.c @@ -0,0 +1,36 @@ +#include "66.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = LAYOUT_66_ansi( + KC_GESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, KC_PGDN, + KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(_FL),KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = LAYOUT_66_ansi( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_VOLU, + _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_MUTE, KC_VOLD, + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, KC_PGUP, + _______,_______,_______, _______, _______,MO(_FL),_______,KC_HOME,KC_PGDN,KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = LAYOUT_66_ansi( + BL_STEP,RGB_M_P,RGB_M_B,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______, RGB_TOG, RGB_VAI, + _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, RGB_SAI, + _______,_______,_______, RGB_MOD, _______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI), +}; diff --git a/keyboards/clueboard/66/keymaps/66_ansi/readme.md b/keyboards/clueboard/66/keymaps/66_ansi/readme.md new file mode 100644 index 000000000000..25b5d7eb18c7 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/66_ansi/readme.md @@ -0,0 +1,11 @@ +![Clueboard Layout Image](http://i.imgur.com/7Capi8W.png) + +# Basic Clueboard 66% Hotswap Layout + +This is the default layout that comes flashed on every Clueboard. For the most +part it's a straightforward and easy to follow layout. The only unusual key is +the key in the upper left, which sends Escape normally, but Grave when any of +the Ctrl, Alt, or GUI modifiers are held down. + +This uses `LAYOUT_66_ansi`, which is compatable with the `66_ansi` community +layout. diff --git a/keyboards/clueboard/66/keymaps/66_iso/keymap.c b/keyboards/clueboard/66/keymaps/66_iso/keymap.c new file mode 100644 index 000000000000..577cf045b540 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/66_iso/keymap.c @@ -0,0 +1,36 @@ +#include "66.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = LAYOUT_66_iso( + KC_GESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC, KC_PGDN, + KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS,KC_ENT, + KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(_FL),KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = LAYOUT_66_iso( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_VOLU, + _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______, KC_VOLD, + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, KC_PGUP, + _______,_______,_______, _______, _______,MO(_FL),_______,KC_HOME,KC_PGDN,KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = LAYOUT_66_iso( + BL_STEP,RGB_M_P,RGB_M_B,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______, RGB_TOG, RGB_VAI, + _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + MO(_FL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, RGB_SAI, + _______,_______,_______, RGB_MOD, _______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI), +}; diff --git a/keyboards/clueboard/66/keymaps/66_iso/readme.md b/keyboards/clueboard/66/keymaps/66_iso/readme.md new file mode 100644 index 000000000000..019131aeb199 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/66_iso/readme.md @@ -0,0 +1,8 @@ +![Clueboard Layout Image](http://i.imgur.com/7Capi8W.png) + +# Default Clueboard Layout + +This is the default layout that comes flashed on every Clueboard. For the most +part it's a straightforward and easy to follow layout. The only unusual key is +the key in the upper left, which sends Escape normally, but Grave when any of +the Ctrl, Alt, or GUI modifiers are held down. diff --git a/keyboards/clueboard/66/keymaps/bloodlvst/keymap.c b/keyboards/clueboard/66/keymaps/bloodlvst/keymap.c index d23b4cb84634..73543cbfad9c 100644 --- a/keyboards/clueboard/66/keymaps/bloodlvst/keymap.c +++ b/keyboards/clueboard/66/keymaps/bloodlvst/keymap.c @@ -1,8 +1,5 @@ #include "66.h" -// Helpful defines -#define _______ KC_TRNS - // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them @@ -14,28 +11,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = KEYMAP( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_INS, KC_DEL, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ - KC_LSPO, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSPC, KC_UP, \ +[_BL] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_INS, KC_DEL, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSPO, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSPC, KC_UP, KC_LCTL, KC_LGUI, MO(_FL), KC_LALT, KC_BSPC,KC_SPC, KC_RALT, KC_APP, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, KC_END, KC_VOLU, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,KC_SLCK, KC_PAUS, _______, _______, KC_MUTE, KC_VOLD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, KC_PSCR, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MPLY, \ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, KC_END, KC_VOLU, + _______, _______, _______,_______,_______,_______,_______,_______,_______,KC_SLCK, KC_PAUS, _______, _______, KC_MUTE, KC_VOLD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, KC_PSCR, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MPLY, _______, KC_MYCM, MO(_FL), _______, _______,_______, _______, KC_CALC, MO(_FL), _______, KC_MPRV, KC_MSTP, KC_MNXT), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - KC_PWR, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, RGB_MOD, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,RGB_HUD, RGB_HUI, _______, _______, _______, KC_WAKE, \ +[_CL] = LAYOUT( + KC_PWR, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, RGB_MOD, + _______, _______, _______,_______,_______,_______,_______,_______,_______,RGB_HUD, RGB_HUI, _______, _______, _______, KC_WAKE, _______, _______, MO(_FL), _______, RGB_SAD,RGB_SAI, _______, _______, MO(_FL), _______, _______, KC_SLEP, _______), }; diff --git a/keyboards/clueboard/66/keymaps/caps_fn/keymap.c b/keyboards/clueboard/66/keymaps/caps_fn/keymap.c index 4a5fa72db1d8..c48c50738790 100644 --- a/keyboards/clueboard/66/keymaps/caps_fn/keymap.c +++ b/keyboards/clueboard/66/keymaps/caps_fn/keymap.c @@ -1,8 +1,5 @@ #include "66.h" -// Helpful defines -#define _______ KC_TRNS - // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them @@ -14,28 +11,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = KEYMAP( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ +[_BL] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ +[_CL] = LAYOUT( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; diff --git a/keyboards/clueboard/66/keymaps/colemak/keymap.c b/keyboards/clueboard/66/keymaps/colemak/keymap.c index 4759823e8a24..3666bd0e6407 100644 --- a/keyboards/clueboard/66/keymaps/colemak/keymap.c +++ b/keyboards/clueboard/66/keymaps/colemak/keymap.c @@ -1,8 +1,5 @@ #include "66.h" -// Helpful defines -#define _______ KC_TRNS - // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them @@ -14,28 +11,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = KEYMAP( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_NUHS, KC_ENT, \ - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ +[_BL] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, KC_LCTL, KC_LGUI, KC_LALT,KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_CAPS, KC_VOLU, \ - _______, _______, _______,_______,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP, KC_END, _______, _______, _______, KC_VOLD, \ - KC_DEL, _______, MO(_CL),_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP, KC_RGHT, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_CAPS, KC_VOLU, + _______, _______, _______,_______,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP, KC_END, _______, _______, _______, KC_VOLD, + KC_DEL, _______, MO(_CL),_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP, KC_RGHT, _______, _______, _______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______,_______, _______,_______, _______, _______, MO(_FL), _______, KC_HOME, KC_PGDN, KC_END), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - BL_STEP, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_SAI, \ +[_CL] = LAYOUT( + BL_STEP, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_SAI, _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; diff --git a/keyboards/clueboard/66/keymaps/default/keymap.c b/keyboards/clueboard/66/keymaps/default/keymap.c index 869165392060..555ff97f0c69 100644 --- a/keyboards/clueboard/66/keymaps/default/keymap.c +++ b/keyboards/clueboard/66/keymaps/default/keymap.c @@ -1,8 +1,5 @@ #include "66.h" -// Helpful defines -#define _______ KC_TRNS - // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. #define _BL 0 @@ -12,28 +9,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = KEYMAP( - KC_GESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, KC_PGDN, \ - KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS,KC_ENT, \ - KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RO, KC_RSFT, KC_UP, \ +[_BL] = LAYOUT( + KC_GESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, KC_PGDN, + KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS,KC_ENT, + KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RO, KC_RSFT, KC_UP, KC_LCTL,KC_LGUI,KC_LALT,KC_MHEN, KC_SPC, KC_SPC, KC_HENK,KC_RALT,MO(_FL),KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_DEL, KC_VOLU, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_MUTE, KC_VOLD, \ - _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_PGUP, \ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_DEL, KC_VOLU, + _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_MUTE, KC_VOLD, + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_PGUP, _______,_______,_______,_______, _______,_______, _______,_______,MO(_FL),_______,KC_HOME,KC_PGDN,KC_END), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - BL_STEP,RGB_M_P,RGB_M_B,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______,_______,RGB_TOG, RGB_VAI, \ - _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, \ - _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - MO(_FL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_SAI, \ +[_CL] = LAYOUT( + BL_STEP,RGB_M_P,RGB_M_B,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______,_______,RGB_TOG, RGB_VAI, + _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + MO(_FL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_SAI, _______,_______,_______,_______, RGB_MOD, RGB_MOD, _______,_______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI), }; diff --git a/keyboards/clueboard/66/keymaps/jokrik/keymap.c b/keyboards/clueboard/66/keymaps/jokrik/keymap.c index 9b03ae3ad5f4..118efe0a9771 100644 --- a/keyboards/clueboard/66/keymaps/jokrik/keymap.c +++ b/keyboards/clueboard/66/keymaps/jokrik/keymap.c @@ -1,8 +1,5 @@ #include "66.h" -// Helpful defines -#define _______ KC_TRNS - // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them @@ -14,28 +11,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = KEYMAP( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PSCR, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PAUS, \ - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ +[_BL] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PSCR, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PAUS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC,KC_SPC, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, BL_STEP, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, BL_STEP, + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______,_______, _______, _______, MO(_FL), _______, KC_HOME, KC_PGDN, KC_END), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_SAI, \ +[_CL] = LAYOUT( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_SAI, _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, MO(_FL), _______, RGB_HUD, RGB_SAD, RGB_HUI), }; diff --git a/keyboards/clueboard/66/keymaps/mac_optimized/keymap.c b/keyboards/clueboard/66/keymaps/mac_optimized/keymap.c index 8f54a7bea91c..29d96842963c 100644 --- a/keyboards/clueboard/66/keymaps/mac_optimized/keymap.c +++ b/keyboards/clueboard/66/keymaps/mac_optimized/keymap.c @@ -1,8 +1,5 @@ #include "66.h" -// Helpful defines -#define _______ KC_TRNS - // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them @@ -14,28 +11,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = KEYMAP( - KC_GESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, KC_PGDN, \ - KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS,KC_ENT, \ - KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RO, KC_RSFT, KC_UP, \ +[_BL] = LAYOUT( + KC_GESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, KC_PGDN, + KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS,KC_ENT, + KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RO, KC_RSFT, KC_UP, KC_LCTL,KC_LALT,KC_LGUI,KC_MHEN, KC_SPC, KC_SPC, KC_HENK,KC_RGUI,MO(_FL),KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_DEL, KC_VOLU, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MRWD,KC_MPLY,KC_MFFD,_______,KC_MUTE, KC_VOLD, \ - _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_PGUP, \ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_DEL, KC_VOLU, + _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MRWD,KC_MPLY,KC_MFFD,_______,KC_MUTE, KC_VOLD, + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_PGUP, _______,_______,_______,_______, _______,_______, _______,_______,MO(_FL),_______,KC_HOME,KC_PGDN,KC_END), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - BL_STEP,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RGB_TOG, RGB_VAI, \ - _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, \ - _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - MO(_FL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_SAI, \ +[_CL] = LAYOUT( + BL_STEP,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RGB_TOG, RGB_VAI, + _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + MO(_FL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_SAI, _______,_______,_______,_______, RGB_MOD, RGB_MOD, _______,_______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI), }; diff --git a/keyboards/clueboard/66/keymaps/magicmonty/keymap.c b/keyboards/clueboard/66/keymaps/magicmonty/keymap.c index bb3ca9623e09..7f91224cfb5c 100644 --- a/keyboards/clueboard/66/keymaps/magicmonty/keymap.c +++ b/keyboards/clueboard/66/keymaps/magicmonty/keymap.c @@ -1,7 +1,6 @@ #include "66.h" // Helpful defines -#define _______ KC_TRNS #define xxxxxxx KC_NO // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -49,60 +48,60 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ - [_BL] = KEYMAP( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, _______, KC_BSPC, KC_INS, \ - HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, \ - ESC_FUN, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, KC_RSFT, KC_UP, \ + [_BL] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, _______, KC_BSPC, KC_INS, + HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, + ESC_FUN, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, KC_RSFT, KC_UP, KC_LCTL, KC_LGUI, KC_LALT,_______, L_MOUSE, L_MOUSE, _______, KC_RALT, KC_RCTL, MO_FUNC, KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function layer */ - [_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, BL_STEP, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, KC_PAUS, _______, _______, _______, _______, \ - _______, _______, MO_CTL, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, \ - KC_LSPO, _______, _______, _______, _______, _______, _______, _______, MEDIA, _______, _______, TO_MIDI, _______, KC_RSPC, KC_PGUP, \ + [_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, BL_STEP, + _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, KC_PAUS, _______, _______, _______, _______, + _______, _______, MO_CTL, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, + KC_LSPO, _______, _______, _______, _______, _______, _______, _______, MEDIA, _______, _______, TO_MIDI, _______, KC_RSPC, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, _______, MO_FUNC, KC_HOME, KC_PGDN, KC_END), /* Keymap _ME: Media layer */ - [_ME] = KEYMAP( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, MEDIA, _______, _______, _______, _______, _______, _______, \ + [_ME] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, MEDIA, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT), /* Keymap _CL: Control layer */ - [_CL] = KEYMAP( - _______, RGB_RST, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO_CTL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, \ + [_CL] = LAYOUT( + _______, RGB_RST, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO_CTL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, _______, _______, _______, _______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), /* Keymap _ML: Mouse layer */ - [_ML] = KEYMAP( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, KC_BTN2, KC_BTN3, KC_BTN1, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_U, \ + [_ML] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_BTN2, KC_BTN3, KC_BTN1, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_U, _______, _______, _______, _______, L_MOUSE, L_MOUSE, _______, KC_BTN1, KC_BTN3, KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R), #if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) /* Keymap _MI: MIDI layer (Advanced)*/ - [_MI] = KEYMAP( - TO_BASE,MI_VEL_1,MI_VEL_2,MI_VEL_3,MI_VEL_4,MI_VEL_5,MI_VEL_6,MI_VEL_7,MI_VEL_8,MI_VEL_9,MI_VEL_10, MI_CHD, MI_CHU, xxxxxxx, xxxxxxx, xxxxxxx, \ - xxxxxxx, xxxxxxx, MI_Cs, MI_Ds, xxxxxxx, MI_Fs, MI_Gs, MI_As, xxxxxxx, MI_Cs_1, MI_Ds_1, xxxxxxx, MI_Fs_1, xxxxxxx, xxxxxxx, \ - MI_MOD, MI_C, MI_D, MI_E, MI_F, MI_G, MI_A, MI_B, MI_C_1, MI_D_1, MI_E_1, MI_F_1, MI_G_1, xxxxxxx, \ - MI_SUS, xxxxxxx, MI_OCTD, MI_OCTU,MI_MODSD,MI_MODSU, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, MI_TRNSD,MI_TRNSU,MI_TRNS_0, MI_SUS, xxxxxxx, \ + [_MI] = LAYOUT( + TO_BASE,MI_VEL_1,MI_VEL_2,MI_VEL_3,MI_VEL_4,MI_VEL_5,MI_VEL_6,MI_VEL_7,MI_VEL_8,MI_VEL_9,MI_VEL_10, MI_CHD, MI_CHU, xxxxxxx, xxxxxxx, xxxxxxx, + xxxxxxx, xxxxxxx, MI_Cs, MI_Ds, xxxxxxx, MI_Fs, MI_Gs, MI_As, xxxxxxx, MI_Cs_1, MI_Ds_1, xxxxxxx, MI_Fs_1, xxxxxxx, xxxxxxx, + MI_MOD, MI_C, MI_D, MI_E, MI_F, MI_G, MI_A, MI_B, MI_C_1, MI_D_1, MI_E_1, MI_F_1, MI_G_1, xxxxxxx, + MI_SUS, xxxxxxx, MI_OCTD, MI_OCTU,MI_MODSD,MI_MODSU, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, MI_TRNSD,MI_TRNSU,MI_TRNS_0, MI_SUS, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx,xxxxxxx, MI_ALLOFF, MI_ALLOFF, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx), #elif defined(MIDI_ENABLE) && defined(MIDI_BASIC) /* Keymap _MI: MIDI layer (Basic)*/ - [_MI] = KEYMAP( - TO_BASE, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, \ - xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, \ - xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, \ - xxxxxxx, xxxxxxx, MI_ON, MI_OFF, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, \ + [_MI] = LAYOUT( + TO_BASE, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, + xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, + xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, + xxxxxxx, xxxxxxx, MI_ON, MI_OFF, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx), #endif }; diff --git a/keyboards/clueboard/66/keymaps/manofinterests/keymap.c b/keyboards/clueboard/66/keymaps/manofinterests/keymap.c new file mode 100644 index 000000000000..08815dc5a90b --- /dev/null +++ b/keyboards/clueboard/66/keymaps/manofinterests/keymap.c @@ -0,0 +1,36 @@ +#include "66.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = LAYOUT( + KC_GESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_GRV, KC_BSPC, RGB_VAI, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, RGB_VAD, + KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS,KC_ENT, + KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RO, KC_RSFT, KC_UP, + KC_LCTL,KC_LGUI,KC_LALT,KC_MHEN, KC_SPC, KC_SPC, KC_HENK,KC_RALT,MO(_FL),KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_DEL, KC_VOLU, + _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_MUTE, KC_VOLD, + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_PGUP, + _______,_______,_______,_______, _______,_______, _______,_______,MO(_FL),_______,KC_HOME,KC_PGDN,KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = LAYOUT( + BL_STEP,RGB_M_P,RGB_M_B,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______,_______,RGB_TOG, RGB_VAI, + _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + MO(_FL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_SAI, + _______,_______,_______,_______, RGB_MOD, RGB_MOD, _______,_______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI), +}; diff --git a/keyboards/clueboard/66/keymaps/manofinterests/readme.md b/keyboards/clueboard/66/keymaps/manofinterests/readme.md new file mode 100644 index 000000000000..019131aeb199 --- /dev/null +++ b/keyboards/clueboard/66/keymaps/manofinterests/readme.md @@ -0,0 +1,8 @@ +![Clueboard Layout Image](http://i.imgur.com/7Capi8W.png) + +# Default Clueboard Layout + +This is the default layout that comes flashed on every Clueboard. For the most +part it's a straightforward and easy to follow layout. The only unusual key is +the key in the upper left, which sends Escape normally, but Grave when any of +the Ctrl, Alt, or GUI modifiers are held down. diff --git a/keyboards/clueboard/66/keymaps/maximised/keymap.c b/keyboards/clueboard/66/keymaps/maximised/keymap.c index bf577d1aaf4f..1b117dc60508 100644 --- a/keyboards/clueboard/66/keymaps/maximised/keymap.c +++ b/keyboards/clueboard/66/keymaps/maximised/keymap.c @@ -1,8 +1,5 @@ #include "66.h" -// Helpful defines -#define _______ KC_TRNS - // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them @@ -14,28 +11,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = KEYMAP( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ - MO(_FL), KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL), KC_UP, \ +[_BL] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + MO(_FL), KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL), KC_UP, KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), KC_PGUP, \ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, + _______, _______, _______,_______,_______,_______,_______,_______,_______,KC_SLCK, KC_PAUS, _______, _______, _______, _______, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), KC_PGUP, _______, _______, _______,_______, _______,_______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), /* Keymap _CL: Reset/Underlight layer */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ +[_CL] = LAYOUT( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; diff --git a/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c b/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c index e3422a5a6ba0..2169312d4659 100644 --- a/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c +++ b/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c @@ -1,8 +1,5 @@ #include "66.h" -// Helpful defines -#define _______ KC_TRNS - // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them @@ -15,37 +12,37 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = KEYMAP( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ +[_BL] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ +[_CL] = LAYOUT( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), /* Keymap _ML: Mouse layer */ - [_ML] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, \ - _______, _______, KC_BTN3,KC_BTN2,KC_BTN1,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MS_U, \ + [_ML] = LAYOUT( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, + _______, _______, KC_BTN3,KC_BTN2,KC_BTN1,_______,_______,_______,_______,_______, _______, _______, _______, _______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MS_U, _______, _______, _______,_______, LT(_ML, KC_SPC),LT(_ML, KC_SPC), _______, KC_BTN1, KC_BTN2, KC_BTN3, KC_MS_L, KC_MS_D,KC_MS_R), }; diff --git a/keyboards/clueboard/66/keymaps/mrscooty/keymap.c b/keyboards/clueboard/66/keymaps/mrscooty/keymap.c index 7697ff29ab07..abf98615ea45 100644 --- a/keyboards/clueboard/66/keymaps/mrscooty/keymap.c +++ b/keyboards/clueboard/66/keymaps/mrscooty/keymap.c @@ -1,7 +1,4 @@ -#include "clueboard.h" - -// Helpful defines -#define _______ KC_TRNS +#include "66.h" // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -13,29 +10,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = KEYMAP( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_HOME, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, \ - MO(_FL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ - KC_LSFT, KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ +[_BL] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, + MO(_FL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, KC_LCTL, KC_LGUI,KC_LALT,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, KC_PGUP, \ - _______, RGB_TOG, KC_MPRV, KC_MPLY, KC_MNXT,_______,_______,KC_HOME,KC_UP, KC_END, _______, _______, _______, KC_PSCR, KC_PGDN, \ - _______, RGB_VAI, KC_MUTE, KC_VOLD, KC_VOLU,_______,_______,KC_LEFT,KC_DOWN,KC_RIGHT, _______, _______, _______, _______, \ - _______, RGB_VAD, _______, _______, _______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_SAI, \ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, KC_PGUP, + _______, RGB_TOG, KC_MPRV, KC_MPLY, KC_MNXT,_______,_______,KC_HOME,KC_UP, KC_END, _______, _______, _______, KC_PSCR, KC_PGDN, + _______, RGB_VAI, KC_MUTE, KC_VOLD, KC_VOLU,_______,_______,KC_LEFT,KC_DOWN,KC_RIGHT, _______, _______, _______, _______, + _______, RGB_VAD, _______, _______, _______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_SAI, _______, _______, _______, _______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI) }; /* Keymap _CL: Control layer -[_CL] = KEYMAP( - BL_STEP,RGB_M_P,RGB_M_B,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______,_______,RGB_TOG, RGB_VAI, \ - _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_SAI, \ +[_CL] = LAYOUT( + BL_STEP,RGB_M_P,RGB_M_B,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______,_______,RGB_TOG, RGB_VAI, + _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_SAI, _______,_______,_______,_______, RGB_MOD, RGB_MOD, _______,_______,_______,_______,RGB_HUD,RGB_SAD,RGB_HUI), };*/ diff --git a/keyboards/clueboard/66/keymaps/serubin/keymap.c b/keyboards/clueboard/66/keymaps/serubin/keymap.c index 1c9f21d42720..32507e91848e 100644 --- a/keyboards/clueboard/66/keymaps/serubin/keymap.c +++ b/keyboards/clueboard/66/keymaps/serubin/keymap.c @@ -1,8 +1,5 @@ #include "66.h" -// Helpful defines -#define _______ KC_TRNS - // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them @@ -15,38 +12,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = KEYMAP( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - F(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ +[_BL] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + F(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RGUI, MO(_FL), MO(_ME), KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, KC_HOME, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, KC_PSCR, KC_END, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ +[_FL] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, KC_HOME, + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, KC_PSCR, KC_END, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______,_______, _______, _______, MO(_FL), MO(_ME), KC_HOME, KC_PGDN, KC_END), /* Keymap _FL: Function Layer */ -[_ME] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, KC_VOLD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______ , _______, _______, \ +[_ME] = LAYOUT( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, KC_VOLD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______,_______, _______, _______, MO(_FL), MO(_ME), KC_MPRV, KC_MPLY, KC_MNXT), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, MO(_FL), _______, RGB_SAI, \ +[_CL] = LAYOUT( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, MO(_FL), _______, RGB_SAI, _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; diff --git a/keyboards/clueboard/66/keymaps/shift_fn/keymap.c b/keyboards/clueboard/66/keymaps/shift_fn/keymap.c index cf6223efbab1..3736db899211 100644 --- a/keyboards/clueboard/66/keymaps/shift_fn/keymap.c +++ b/keyboards/clueboard/66/keymaps/shift_fn/keymap.c @@ -1,8 +1,5 @@ #include "66.h" -// Helpful defines -#define _______ KC_TRNS - // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them @@ -14,28 +11,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = KEYMAP( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ - MO(_FL), KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ +[_BL] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + MO(_FL), KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, KC_LCTL, KC_LGUI, KC_LALT,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_GRV), KC_DEL, BL_STEP, \ - S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), \ - S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), \ - MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, \ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_GRV), KC_DEL, BL_STEP, + S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), + S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), + MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, S(KC_SPC),S(KC_SPC), KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, KC_HOME, KC_PGDN, KC_END), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ +[_CL] = LAYOUT( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD,RGB_SAD,RGB_HUI), }; diff --git a/keyboards/clueboard/66/keymaps/skully/keymap.c b/keyboards/clueboard/66/keymaps/skully/keymap.c index 8ec2bed077f7..7f34a8cbae6f 100644 --- a/keyboards/clueboard/66/keymaps/skully/keymap.c +++ b/keyboards/clueboard/66/keymaps/skully/keymap.c @@ -1,7 +1,8 @@ #include "66.h" -// Helpful defines -#define _______ KC_TRNS +enum custom_keycodes { + M_SHRUG = SAFE_RANGE +}; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -14,28 +15,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = KEYMAP( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ - MO(_FL), KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ +[_BL] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + MO(_FL), KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_GRV), KC_DEL, BL_STEP, \ - S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), \ - S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), \ - MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, \ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_GRV), KC_DEL, BL_STEP, + S(KC_TAB), S(KC_Q), S(KC_W),S(KC_E),S(KC_R),S(KC_T), S(KC_Y), S(KC_U),S(KC_I),S(KC_O), S(KC_P), S(KC_LBRC),S(KC_RBRC),S(KC_BSLS), S(KC_PGDN), + S(KC_LCTL),S(KC_A), MO(_CL),S(KC_D),S(KC_F),S(KC_G), S(KC_H), S(KC_J),S(KC_K),S(KC_L), S(KC_SCLN),S(KC_QUOT),S(KC_NUHS),S(KC_ENT), + MO(_FL), S(KC_NUBS),S(KC_Z),S(KC_X),S(KC_C),S(KC_V), S(KC_B), S(KC_N),S(KC_M),S(KC_COMM),S(KC_DOT), S(KC_SLSH),S(KC_RO), KC_RSFT, KC_PGUP, KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, S(KC_SPC),S(KC_SPC), KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, KC_HOME, KC_PGDN, KC_END), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ +[_CL] = LAYOUT( + M_SHRUG, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD,RGB_SAD,RGB_HUI), }; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case M_SHRUG: + SEND_STRING("/shrug"SS_TAP(X_ENTER)); + return false; break; + } + } + return true; +}; diff --git a/keyboards/clueboard/66/keymaps/smt/keymap.c b/keyboards/clueboard/66/keymaps/smt/keymap.c index 095623ccc80a..42dcfecac099 100644 --- a/keyboards/clueboard/66/keymaps/smt/keymap.c +++ b/keyboards/clueboard/66/keymaps/smt/keymap.c @@ -17,7 +17,6 @@ enum planck_keycodes { }; // Helpful defines -#define _______ KC_TRNS #define XXXXXXX KC_NO // Custom macros @@ -40,11 +39,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt| * `------------------------------------------------------------------' */ -[_QWERTY] = KEYMAP( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PGUP, \ - HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGDN, \ - CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, \ - KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, MO(_FL), KC_UP, \ +[_QWERTY] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PGUP, + HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGDN, + CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, + KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, MO(_FL), KC_UP, KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC,KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _COLEMAK: Base Layer @@ -60,11 +59,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt| * `------------------------------------------------------------------' */ -[_COLEMAK] = KEYMAP( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PGUP, \ - HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGDN, \ - CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, XXXXXXX, KC_ENT, \ - KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, MO(_FL), KC_UP, \ +[_COLEMAK] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PGUP, + HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGDN, + CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, XXXXXXX, KC_ENT, + KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, MO(_FL), KC_UP, KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC,KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _DVORAK: Base Layer @@ -80,29 +79,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt| * `------------------------------------------------------------------' */ -[_DVORAK] = KEYMAP( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, KC_PGUP, \ - HPR_TAB, KC_QUOT, KC_COMM,KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC, KC_PGDN, \ - CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, XXXXXXX, KC_ENT, \ - KC_LSFT, XXXXXXX, KC_SCLN,KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, MO(_FL), KC_UP, \ +[_DVORAK] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, KC_PGUP, + HPR_TAB, KC_QUOT, KC_COMM,KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC, KC_PGDN, + CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, XXXXXXX, KC_ENT, + KC_LSFT, XXXXXXX, KC_SCLN,KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, MO(_FL), KC_UP, KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC,KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, BL_STEP, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, KC_DEL, _______, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), KC_PGUP, \ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, BL_STEP, + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, KC_DEL, _______, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), KC_PGUP, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,QWERTY, COLEMAK,DVORAK, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ +[_CL] = LAYOUT( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______,_______,RESET, _______,_______,QWERTY, COLEMAK,DVORAK, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; diff --git a/keyboards/clueboard/66/keymaps/tetris/keymap.c b/keyboards/clueboard/66/keymaps/tetris/keymap.c index 4eeb719f92c4..f7c6d4c139dd 100644 --- a/keyboards/clueboard/66/keymaps/tetris/keymap.c +++ b/keyboards/clueboard/66/keymaps/tetris/keymap.c @@ -3,7 +3,6 @@ // Helpful defines #define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) -#define _______ KC_TRNS // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -16,29 +15,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = KEYMAP( - F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ +[_BL] = LAYOUT( + F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ - _______, _______, _______,_______,_______,F(1) ,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, + _______, _______, _______,_______,_______,F(1) ,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ +[_CL] = LAYOUT( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; diff --git a/keyboards/clueboard/66/keymaps/unix_optimized/keymap.c b/keyboards/clueboard/66/keymaps/unix_optimized/keymap.c index 91f5250c7e8f..927e848539c7 100644 --- a/keyboards/clueboard/66/keymaps/unix_optimized/keymap.c +++ b/keyboards/clueboard/66/keymaps/unix_optimized/keymap.c @@ -1,8 +1,5 @@ #include "66.h" -// Helpful defines -#define _______ KC_TRNS - // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them @@ -14,28 +11,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = KEYMAP( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ +[_BL] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, KC_INS, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, KC_DEL, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, KC_INS, + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, KC_DEL, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ +[_CL] = LAYOUT( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD,RGB_HUI), }; diff --git a/keyboards/clueboard/66/keymaps/win_optimized/keymap.c b/keyboards/clueboard/66/keymaps/win_optimized/keymap.c index 83c9a6716c21..2432350164fe 100644 --- a/keyboards/clueboard/66/keymaps/win_optimized/keymap.c +++ b/keyboards/clueboard/66/keymaps/win_optimized/keymap.c @@ -1,8 +1,5 @@ #include "66.h" -// Helpful defines -#define _______ KC_TRNS - // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them @@ -14,28 +11,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ -[_BL] = KEYMAP( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_INS, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, \ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ +[_BL] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_INS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ -[_FL] = KEYMAP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ +[_FL] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), /* Keymap _CL: Control layer */ -[_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ +[_CL] = LAYOUT( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; diff --git a/keyboards/clueboard/66/keymaps/xyverz/keymap.c b/keyboards/clueboard/66/keymaps/xyverz/keymap.c index d7093f0a3c84..e3f413b49015 100644 --- a/keyboards/clueboard/66/keymaps/xyverz/keymap.c +++ b/keyboards/clueboard/66/keymaps/xyverz/keymap.c @@ -2,77 +2,140 @@ // It's based on the default keymap, but Dvorak! #include "66.h" +#include "action_layer.h" +#include "eeconfig.h" -// Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +extern keymap_config_t keymap_config; // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. -#define _BL 0 -#define _FL 1 -#define _RS 2 +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _FL 3 +#define _CL 4 + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK +}; + +// Useful defines +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define FN_CAPS LT(_FL, KC_CAPS) // Tap for Caps Lock, Hold for Function Layer const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: (Base Layer) Default Layer - * ,--------------------------------------------------------------------------. ,----. - * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \| BS| |PGUP| - * |--------------------------------------------------------------------------| |----| - * | Tab| '| ,| .| P| Y| F| G| C| R| L| /| =| \| |PGDN| - * |--------------------------------------------------------------------------| `----' - * |_FL/Caps| A| O| E| U| I| H| D| H| T| N| S| - | Ent| - * |-----------------------------------------------------------------------------. - * |Shift| BS| ;| Q| J| K| X| B| M| W| V| Z| BS|Shift| UP| - * |------------------------------------------------------------------------|----|----. - * | Ctrl| Gui| Alt| MHen| Space| Space| Hen| Alt| Ctrl| _FL|LEFT|DOWN|RGHT| - * `----------------------------------------------------------------------------------' + /* Keymap _QWERTY: Base Layer (Default Layer) + * ,-----------------------------------------------------------. ,---. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| BS| |PgU| + * |-----------------------------------------------------------| |---| + * |HpTab| Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |PgD| + * |-----------------------------------------------------------| `---' + * |FnCaps| A| S| D| F| G| H| J| K| L| ;| '| | Ent| + * |--------------------------------------------------------------. + * |Shift| | Z| X| C| V| B| N| M| ,| .| /|Shift| Fn| Up| + * |------------------------------------------------------------------. + * |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt| + * `------------------------------------------------------------------' */ -[_BL] = KEYMAP( + +[_QWERTY] = LAYOUT ( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSPC, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ + FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, \ + KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _COLEMAK: Base Layer + * ,-----------------------------------------------------------. ,---. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| |PgU| + * |-----------------------------------------------------------| |---| + * |HpTab| Q| W| F| P| G| J| L| U| Y| ;| [| ]| BS| |PgD| + * |-----------------------------------------------------------| `---' + * |FnCaps| A| R| S| T| D| H| N| E| I| O| '| | Ent| + * |--------------------------------------------------------------. + * |Shift| | Z| X| C| V| B| K| M| ,| .| /|Shift| Fn| Up| + * |------------------------------------------------------------------. + * |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt| + * `------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT ( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSPC, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ + FN_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, XXXXXXX, KC_ENT, \ + KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _DVORAK: Base Layer + * ,-----------------------------------------------------------. ,---. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \| `| |PgU| + * |-----------------------------------------------------------| |---| + * |HpTab| '| ,| .| P| Y| F| G| C| R| L| /| =| BS| |PgD| + * |-----------------------------------------------------------| `---' + * |FnCaps| A| O| E| U| I| D| H| T| N| S| -| | Ent| + * |--------------------------------------------------------------. + * |Shift| | ;| Q| J| K| X| B| M| W| V| Z|Shift| Fn| Up| + * |------------------------------------------------------------------. + * |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt| + * `------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT ( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSPC, KC_PGUP, \ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_PGDN, \ - LT(_FL, KC_CAPS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_NUHS, KC_ENT, \ - KC_LSFT, KC_RO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SLSH, KC_RSFT, KC_UP, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + FN_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, XXXXXXX, KC_ENT, \ + KC_LSFT, XXXXXXX, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer - * ,--------------------------------------------------------------------------. ,----. - * | `| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| | Del| |BLIN| - * |--------------------------------------------------------------------------| |----| - * | | | | | | | | |PScr|SLck|Paus| | | | |BLDE| - * |--------------------------------------------------------------------------| `----' - * | | | _RS| | | | | | | | | | | | - * |-----------------------------------------------------------------------------. - * | | | | | | | | | | | | | | |PGUP| - * |------------------------------------------------------------------------|----|----. - * | | | | | | | | | | _FL|HOME|PGDN| END| - * `----------------------------------------------------------------------------------' */ -[_FL] = 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_DEL, BL_STEP, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, MO(_RS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), KC_HOME, KC_PGDN, KC_END), - - /* Keymap _RS: Reset layer - * ,--------------------------------------------------------------------------. ,----. - * | | | | | | | | | | | | | | | RGB| |VAL+| - * |--------------------------------------------------------------------------| |----| - * | | | | |RESET| | | | | | | | | | |VAL-| - * |--------------------------------------------------------------------------| `----' - * | | | _RS| | | | | | | | | | | | - * |-----------------------------------------------------------------------------. - * | | | | | | | | | | | | | | |SAT+| - * |------------------------------------------------------------------------|----|----. - * | | | | | | | | | | _FL|HUE-|SAT-|HUE+| - * `----------------------------------------------------------------------------------' +[_FL] = LAYOUT ( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ + _______, _______, MO(_CL), _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer */ -[_RS] = 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, RGB_TOG, RGB_VAI, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, \ - KC_TRNS, KC_TRNS, MO(_RS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - MO(_FL), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), RGB_SAI, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_HUI), +[_CL] = LAYOUT ( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL), _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, \ + _______, _______, _______, _______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + } + return true; +} diff --git a/keyboards/clueboard/66/readme.md b/keyboards/clueboard/66/readme.md index ad14ae9d69a4..42a261e2abe4 100644 --- a/keyboards/clueboard/66/readme.md +++ b/keyboards/clueboard/66/readme.md @@ -6,13 +6,13 @@ A fully customizable 66% keyboard. * Keyboard Maintainer: [Zach White](https://github.com/skullydazed) * Hardware Supported: Clueboard 66% PCB - * rev1 (1.0) - * rev2 (2.0, 2.0.1, 2.1, 2.5, 2.5.1, 2.6) - * rev3 (2.7) + * rev1 (PCB Version 1.0) + * rev2 (PCB Versions 2.0, 2.0.1, 2.1, 2.5, 2.5.1, 2.6) + * rev3 (PCB Versions 2.7, 2.8) * Hardware Availability: [clueboard.co](https://clueboard.co/) Make example for this keyboard (after setting up your build environment): - make clueboard/66:default + make clueboard/66/rev3:default See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/clueboard/66/rev1/info.json b/keyboards/clueboard/66/rev1/info.json deleted file mode 100644 index a2b943b24335..000000000000 --- a/keyboards/clueboard/66/rev1/info.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "identifier":"c1ed:2301:0003" -} diff --git a/keyboards/clueboard/66/rev1/rev1.h b/keyboards/clueboard/66/rev1/rev1.h index ca54df1ec2a3..58694fcb973d 100644 --- a/keyboards/clueboard/66/rev1/rev1.h +++ b/keyboards/clueboard/66/rev1/rev1.h @@ -30,7 +30,7 @@ // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array -#define KEYMAP( \ +#define LAYOUT( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ @@ -43,5 +43,34 @@ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ { k40, k41, k42, k43, KC_NO, k45, k46, KC_NO, KC_NO, k49, k4A, k4B, k4C, k4D, k4E, k4F } \ } +#define KEYMAP LAYOUT + +#define LAYOUT_66_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, k3E, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D, k4E, k4F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, KC_NO, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, KC_NO, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KC_NO, k2D }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, KC_NO, k3D, k3E }, \ + { k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4A, k4B, k4C, k4D, k4E, k4F } \ +} + +#define LAYOUT_66_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, k3E, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D, k4E, k4F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, KC_NO, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, KC_NO, KC_NO, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, KC_NO, k3D, k3E }, \ + { k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4A, k4B, k4C, k4D, k4E, k4F } \ +} #endif diff --git a/keyboards/clueboard/66/rev2/info.json b/keyboards/clueboard/66/rev2/info.json deleted file mode 100644 index 18b3b895d33f..000000000000 --- a/keyboards/clueboard/66/rev2/info.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "identifier":"c1ed:2320:0001" -} diff --git a/keyboards/clueboard/66/rev2/rev2.h b/keyboards/clueboard/66/rev2/rev2.h index 9a1b7271987d..5eedcd237a4a 100644 --- a/keyboards/clueboard/66/rev2/rev2.h +++ b/keyboards/clueboard/66/rev2/rev2.h @@ -30,7 +30,7 @@ // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array -#define KEYMAP( \ +#define LAYOUT( \ k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k55, k56, k57, \ k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k67, \ k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k74, k75, \ @@ -48,5 +48,48 @@ { k80, k81, k82, k83, k84, k85, k86, KC_NO }, \ { k90, KC_NO, k92, k93, k94, k95, k96, k97 } \ } +#define KEYMAP LAYOUT + +/* LAYOUT_66_ansi, standard 66 key ANSI layout + */ +#define LAYOUT_66_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k56, k57, \ + k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k75, \ + k30, k32, k33, k34, k35, k36, k37, k80, k81, k82, k83, k85, k86, \ + k40, k41, k42, k46, k92, k93, k94, k95, k96, k97 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO }, \ + { k50, k51, k52, k53, k54, KC_NO, KC_NO, k57 }, \ + { k60, k61, k62, k63, k64, k65, KC_NO, k67 }, \ + { k70, k71, k72, k73, KC_NO, k75, KC_NO, KC_NO }, \ + { k80, k81, k82, k83, KC_NO, k85, k86, KC_NO }, \ + { KC_NO, KC_NO, k92, k93, k94, k95, k96, k97 } \ +} + +/* LAYOUT_66_iso, standard 67 key ISO layout + */ +#define LAYOUT_66_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k56, k57, \ + k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k74, k75, \ + k30, k31, k32, k33, k34, k35, k36, k37, k80, k81, k82, k83, k85, k86, \ + k40, k41, k42, k46, k92, k93, k94, k95, k96, k97 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO }, \ + { k50, k51, k52, k53, k54, KC_NO, k56, k57 }, \ + { k60, k61, k62, k63, k64, KC_NO, KC_NO, k67 }, \ + { k70, k71, k72, k73, k74, k75, KC_NO, KC_NO }, \ + { k80, k81, k82, k83, KC_NO, k85, k86, KC_NO }, \ + { KC_NO, KC_NO, k92, k93, k94, k95, k96, k97 } \ +} #endif diff --git a/keyboards/clueboard/66/rev3/info.json b/keyboards/clueboard/66/rev3/info.json deleted file mode 100644 index 83822ff75824..000000000000 --- a/keyboards/clueboard/66/rev3/info.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "identifier":"c1ed:2370:0001" -} diff --git a/keyboards/clueboard/66/rev3/rev3.c b/keyboards/clueboard/66/rev3/rev3.c index 8f703d2c9957..713d998e6d1a 100644 --- a/keyboards/clueboard/66/rev3/rev3.c +++ b/keyboards/clueboard/66/rev3/rev3.c @@ -4,10 +4,10 @@ #include "print.h" void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - matrix_init_user(); - led_init_ports(); + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + led_init_ports(); // JTAG disable for PORT F. write JTD bit twice within four cycles. MCUCR |= (1< + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CLUEBOARD_66_CONFIG_H +#define CLUEBOARD_66_CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xC1ED +#define MANUFACTURER Clueboard +#define PRODUCT Clueboard 66% HotSwap +#define DESCRIPTION QMK keyboard firmware for Clueboard 66% + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/clueboard/66_hotswap/gen1/config.h b/keyboards/clueboard/66_hotswap/gen1/config.h new file mode 100644 index 000000000000..d8163f5383f6 --- /dev/null +++ b/keyboards/clueboard/66_hotswap/gen1/config.h @@ -0,0 +1,53 @@ +#ifndef CLUEBOARD_66_REV3_CONFIG_H +#define CLUEBOARD_66_REV3_CONFIG_H + +#include "config_common.h" + +#define PRODUCT_ID 0x2390 +#define DEVICE_VER 0x0001 + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +// ROWS: Top to bottom, COLS: Left to right +/* Row pin configuration +* row: 0 1 2 3 4 5 6 7 8 9 +* pin: B2 C7 C6 B6 B5 B0 B3 D5 D3 D2 +*/ + +#define MATRIX_ROW_PINS { B2, C7, C6, B6, B5, B0, B3, D5, D3, D2 } +/* Column pin configuration + * col: 0 1 2 3 4 5 6 7 + * pin: F0 F1 F4 F5 F6 F7 E6 B1 + */ +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, E6, B1 } +#define UNUSED_PINS + +/* Speaker configuration + */ +//#define SPEAKER_PIN B7 // FIXME: find the correct name for this define + +/* Backlight configuration + */ +#define BACKLIGHT_LEVELS 1 + +/* Underlight configuration + */ +#define RGB_DI_PIN D7 +#define RGBLED_NUM 26 // Number of LEDs +#define RGBLIGHT_HUE_STEP 32 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 +#define RGBLIGHT_EFFECT_BREATHE_MAX 200 +#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 666*2 +#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 +#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 4 // How many LEDs wide to light up +#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 16 // The led to start at +#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 8 // How many LEDs to travel +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // How many LEDs wide to light up + +#endif diff --git a/keyboards/clueboard/66_hotswap/gen1/gen1.c b/keyboards/clueboard/66_hotswap/gen1/gen1.c new file mode 100644 index 000000000000..01f74bc50bcb --- /dev/null +++ b/keyboards/clueboard/66_hotswap/gen1/gen1.c @@ -0,0 +1,63 @@ +#include "gen1.h" +#include +#include "backlight.h" +#include "print.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + led_init_ports(); + + // JTAG disable for PORT F. write JTD bit twice within four cycles. + MCUCR |= (1<mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 0 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#endif diff --git a/keyboards/contra/contra.c b/keyboards/contra/contra.c new file mode 100755 index 000000000000..3ef66a9c0d5e --- /dev/null +++ b/keyboards/contra/contra.c @@ -0,0 +1 @@ +#include "contra.h" diff --git a/keyboards/contra/contra.h b/keyboards/contra/contra.h new file mode 100755 index 000000000000..a27d1ca25164 --- /dev/null +++ b/keyboards/contra/contra.h @@ -0,0 +1,46 @@ +#ifndef KB_H +#define KB_H + +#include "quantum.h" + +#define LAYOUT_grid( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 } \ +} + +#define LAYOUT_mit( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ + K300, K301, K302, K303, K304, K305, K307, K308, K309, K310, K311 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ + { K300, K301, K302, K303, K304, K305, K305, K307, K308, K309, K310, K311 } \ +} + +#define LAYOUT_kc_grid( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 \ +) \ + LAYOUT_grid( \ + KC_##K000, KC_##K001, KC_##K002, KC_##K003, KC_##K004, KC_##K005, KC_##K006, KC_##K007, KC_##K008, KC_##K009, KC_##K010, KC_##K011, \ + KC_##K100, KC_##K101, KC_##K102, KC_##K103, KC_##K104, KC_##K105, KC_##K106, KC_##K107, KC_##K108, KC_##K109, KC_##K110, KC_##K111, \ + KC_##K200, KC_##K201, KC_##K202, KC_##K203, KC_##K204, KC_##K205, KC_##K206, KC_##K207, KC_##K208, KC_##K209, KC_##K210, KC_##K211, \ + KC_##K300, KC_##K301, KC_##K302, KC_##K303, KC_##K304, KC_##K305, KC_##K306, KC_##K307, KC_##K308, KC_##K309, KC_##K310, KC_##K311 \ + ) +#define LAYOUT LAYOUT_grid +#define LAYOUT_ortho_4x12 LAYOUT_grid +#define LAYOUT_kc_ortho_4x12 LAYOUT_kc_grid + +#endif diff --git a/keyboards/contra/info.json b/keyboards/contra/info.json new file mode 100644 index 000000000000..fa0e60a447f6 --- /dev/null +++ b/keyboards/contra/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "Contra", + "url": "", + "maintainer": "qmk", + "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 000000000000..a1635f2bab5f --- /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 000000000000..95a96426afdc --- /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 000000000000..195bc2c1b649 --- /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/dana/config.h b/keyboards/contra/keymaps/dana/config.h new file mode 100644 index 000000000000..2846b5791050 --- /dev/null +++ b/keyboards/contra/keymaps/dana/config.h @@ -0,0 +1,30 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + + +#undef TAPPING_TERM +#define TAPPING_TERM 190 + +#define MUSIC_MASK (keycode != KC_NO) +#define MIDI_ADVANCED + +#endif diff --git a/keyboards/contra/keymaps/dana/keymap.c b/keyboards/contra/keymaps/dana/keymap.c new file mode 100644 index 000000000000..529491923f73 --- /dev/null +++ b/keyboards/contra/keymaps/dana/keymap.c @@ -0,0 +1,37 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include "contra.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | Cmd |Lower | Space |Raise | Enter| Cmd | Alt |Ctrl | + * `-----------------------------------------------------------------------------------' + */ +[0] = { + { MI_C_4, MI_Cs_4, MI_D_4, MI_Ds_4, MI_E_4, MI_F_4, MI_Fs_4, MI_G_4, MI_Gs_4, MI_A_4, MI_As_4, MI_B_4 }, + { MI_C_3, MI_Cs_3, MI_D_3, MI_Ds_3, MI_E_3, MI_F_3, MI_Fs_3, MI_G_3, MI_Gs_3, MI_A_3, MI_As_3, MI_B_3 }, + { MI_C_2, MI_Cs_2, MI_D_2, MI_Ds_2, MI_E_2, MI_F_2, MI_Fs_2, MI_G_2, MI_Gs_2, MI_A_2, MI_As_2, MI_B_2 }, + { MI_C_1, MI_Cs_1, MI_D_1, MI_Ds_1, MI_E_1, MI_F_1, MI_Fs_1, MI_G_1, MI_Gs_1, MI_A_1, MI_As_1, MI_B_1 } +} +}; + + + + diff --git a/keyboards/contra/keymaps/dana/readme.md b/keyboards/contra/keymaps/dana/readme.md new file mode 100644 index 000000000000..75b4582d4afc --- /dev/null +++ b/keyboards/contra/keymaps/dana/readme.md @@ -0,0 +1,6 @@ +# Dana musical MIDI keyboard layout + +Has the contra mapped as a MIDI keyboard, where each row is an octave. + +The keyboard has only MIDI, nothing else! + diff --git a/keyboards/contra/keymaps/dana/rules.mk b/keyboards/contra/keymaps/dana/rules.mk new file mode 100644 index 000000000000..1198f378a8e2 --- /dev/null +++ b/keyboards/contra/keymaps/dana/rules.mk @@ -0,0 +1,25 @@ + + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = yes # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/contra/keymaps/default/config.h b/keyboards/contra/keymaps/default/config.h new file mode 100644 index 000000000000..a1635f2bab5f --- /dev/null +++ b/keyboards/contra/keymaps/default/config.h @@ -0,0 +1,42 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/xyverz/keymap.c b/keyboards/contra/keymaps/default/keymap.c similarity index 54% rename from keyboards/planck/keymaps/xyverz/keymap.c rename to keyboards/contra/keymaps/default/keymap.c index 5ce52f36d841..176b2508aa42 100644 --- a/keyboards/planck/keymaps/xyverz/keymap.c +++ b/keyboards/contra/keymaps/default/keymap.c @@ -1,37 +1,45 @@ +/* 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 "contra.h" #include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#include "eeconfig.h" extern keymap_config_t keymap_config; -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 +enum planck_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST +}; enum planck_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, + PLOVER, LOWER, RAISE, - BACKLIT + BACKLIT, + 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 @@ -42,14 +50,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter | + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = { {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, - {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } + {KC_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 @@ -60,75 +68,94 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter | + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ [_COLEMAK] = { {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, - {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, /* Dvorak * ,-----------------------------------------------------------------------------------. - * | Tab | " | , | . | P | Y | F | G | C | R | L | / | + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | - | + * | Esc | A | O | E | U | I | D | H | T | N | S | / | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z | Shift| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter | + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ [_DVORAK] = { - {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH}, - {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, - {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT}, - {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } + {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, + {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH}, + {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, /* Lower * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | Mute | Vol- | Vol+ | | + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | |Enter | + * | | | | | | | | 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_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______}, - {BACKLIT, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} + {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 | | + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | Prev | Play | Next | | + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | |Enter | + * | | | | | | | | 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_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______}, - {BACKLIT, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | A | O | | E | U | | | | + * `-----------------------------------------------------------------------------------' + */ + +[_PLOVER] = { + {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, + {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, + {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} }, /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. - * | F11 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F12 | + * | | Reset| | | | | | | | | | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | Reset| |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | * |------+------+------+------+------+------|------+------+------+------+------+------| * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -136,9 +163,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_ADJUST] = { - {KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 }, - {_______, RESET, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, + {_______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL }, + {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} } @@ -146,48 +173,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef AUDIO_ENABLE - -float tone_startup[][2] = SONG(STARTUP_SOUND); -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); - -float tone_goodbye[][2] = SONG(GOODBYE_SOUND); + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); #endif - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); - #endif - persistent_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 COLEMAK: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_colemak); - #endif - persistent_default_layer_set(1UL<<_COLEMAK); + set_single_persistent_default_layer(_COLEMAK); } return false; break; case DVORAK: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_dvorak); - #endif - persistent_default_layer_set(1UL<<_DVORAK); + set_single_persistent_default_layer(_DVORAK); } return false; break; @@ -217,44 +224,41 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #ifdef BACKLIGHT_ENABLE backlight_step(); #endif + PORTE &= ~(1<<6); } else { unregister_code(KC_RSFT); + PORTE |= (1<<6); + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(plover_song); + #endif + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_PLOVER); } return false; break; } return true; } - -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/contra/keymaps/default/readme.md b/keyboards/contra/keymaps/default/readme.md new file mode 100644 index 000000000000..80aba1095487 --- /dev/null +++ b/keyboards/contra/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# The Default Contra Layout + diff --git a/keyboards/contra/keymaps/losinggeneration/README.md b/keyboards/contra/keymaps/losinggeneration/README.md new file mode 100644 index 000000000000..affd2fb9b414 --- /dev/null +++ b/keyboards/contra/keymaps/losinggeneration/README.md @@ -0,0 +1,30 @@ +losinggeneration's Contra Layout +============================ + +This build uses the MIT layout. + +See description of the layout in the common folder +[here](../../../../users/losinggeneration/README.md) + +## Features +- Adjust + - Removed AGSwap, AGNorm, & Del + - Added Caps Lock, F1-F12 in a 4x3 grid, arrow cluster, + and layer transitions to the new layers. + - Moved Reset & Audio control to the right side + +## Layouts + +### Adjust (Lower + Raise) + +``` + ,-----------------------------------------------------------------------------------. + | | F1 | F2 | F3 | F4 | | RESET| Game |Numpad|Mouse | |Sleep | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | F5 | F6 | F7 | F8 | | |Qwerty|Colmak|Workmn|Dvorak| | + |------+------+------+------+------+------+------+------+------+------+------+------| + | CAPS | F9 | F10 | F11 | F12 | | | | | | Up | | + |------+------+------+------+------+-------------+------+------+------+------+------| + | | | | | | | | XXX | Left | Down |Right | + `-----------------------------------------------------------------------------------' +``` diff --git a/keyboards/contra/keymaps/losinggeneration/config.h b/keyboards/contra/keymaps/losinggeneration/config.h new file mode 100644 index 000000000000..759b1d9a000d --- /dev/null +++ b/keyboards/contra/keymaps/losinggeneration/config.h @@ -0,0 +1,27 @@ +/* +Copyright 2017 Danny Nguyen +Copyright 2018 Harley Laue + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +long with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include QMK_KEYBOARD_CONFIG_H +#define USE_MIT_LAYOUT + +#define TAPPING_TERM 250 + +#endif diff --git a/keyboards/contra/keymaps/losinggeneration/keymap.c b/keyboards/contra/keymaps/losinggeneration/keymap.c new file mode 100644 index 000000000000..d4a336c33820 --- /dev/null +++ b/keyboards/contra/keymaps/losinggeneration/keymap.c @@ -0,0 +1,40 @@ +#include QMK_KEYBOARD_H +#include "losinggeneration-config.h" +#include "losinggeneration-keymap.h" + +extern keymap_config_t keymap_config; + +#define MT_CAPS LSFT_T(KC_CAPS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = CATMAP( QWERTY_LAYER ), +[_COLEMAK] = CATMAP( COLEMAK_LAYER ), +[_WORKMAN] = CATMAP( WORKMAN_LAYER ), +[_DVORAK] = CATMAP( DVORAK_LAYER ), +[_GAME] = CATMAP( GAME_LAYER ), +[_NUMPAD] = CATMAP( NUMPAD_LAYER ), +[_MOUSE] = CATMAP( MOUSE_LAYER ), +[_LOWER] = CATMAP( LOWER_LAYER ), +[_RAISE] = CATMAP( RAISE_LAYER ), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | | RESET| Game |Numpad|Mouse | |Sleep | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F5 | F6 | F7 | F8 | | |Qwerty|Colmak|Workmn|Dvorak| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CAPS | F9 | F10 | F11 | F12 | | | | | | Up | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | XXX | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = CATMAP( \ + _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , _______, RESET , TO_GAME, TO_NUM , TO_MS , _______, KC_SLEP, \ + _______, KC_F5 , KC_F6 , KC_F7 , KC_F8 , _______, _______, QWERTY , COLEMAK, WORKMAN, DVORAK , _______, \ + MT_CAPS, KC_F9 , KC_F10, KC_F11 , KC_F12 , _______, _______, _______, _______, _______, KC_UP , _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT \ +) + +}; + diff --git a/keyboards/contra/keymaps/losinggeneration/rules.mk b/keyboards/contra/keymaps/losinggeneration/rules.mk new file mode 100644 index 000000000000..1728afd85c00 --- /dev/null +++ b/keyboards/contra/keymaps/losinggeneration/rules.mk @@ -0,0 +1,17 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +AUDIO_ENABLE = no # Audio output on port C6 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +COMMAND_ENABLE = no # Commands for debug and configuration +CONSOLE_ENABLE = no # Console for debug(+400) +MIDI_ENABLE = no # MIDI controls +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/contra/keymaps/ryanm101/config.h b/keyboards/contra/keymaps/ryanm101/config.h new file mode 100644 index 000000000000..9a458b892d4b --- /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 000000000000..f8fbb960290a --- /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 000000000000..a289eefcb755 --- /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 000000000000..f5e8c3d6dc82 --- /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/contra/readme.md b/keyboards/contra/readme.md new file mode 100644 index 000000000000..a83228507dc3 --- /dev/null +++ b/keyboards/contra/readme.md @@ -0,0 +1,16 @@ +CONTRA +=== + +![CONTRA](https://cartel.ltd/wp-content/uploads/2018/01/img_3209.jpg) + +A 40% keyboard by + +Keyboard Maintainer: The QMK Community +Hardware Supported: CONTRA +Hardware Availability: [CARTEL](https://cartel.ltd/projects/contra/) + +Make example for this keyboard (after setting up your build environment): + + make contra:dana + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/contra/rules.mk b/keyboards/contra/rules.mk new file mode 100755 index 000000000000..a926dfc03ed4 --- /dev/null +++ b/keyboards/contra/rules.mk @@ -0,0 +1,61 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 + +LAYOUTS = ortho_4x12 planck_mit planck_grid +LAYOUTS_HAS_RGB = no diff --git a/keyboards/converter/ibm_terminal/matrix.c b/keyboards/converter/ibm_terminal/matrix.c index 9d717b61f536..caa0a3805105 100644 --- a/keyboards/converter/ibm_terminal/matrix.c +++ b/keyboards/converter/ibm_terminal/matrix.c @@ -108,7 +108,7 @@ uint8_t matrix_scan(void) state = RESET; } break; - // after reset receive keyboad ID(2 bytes) + // after reset receive keyboard ID(2 bytes) case KBD_ID0: if (code) { state = KBD_ID1; diff --git a/keyboards/crawlpad/readme.md b/keyboards/crawlpad/readme.md index 98d04bfada62..0bdc0f172240 100644 --- a/keyboards/crawlpad/readme.md +++ b/keyboards/crawlpad/readme.md @@ -14,4 +14,4 @@ Make example for this keyboard (after setting up your build environment): See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. -For those that prefer a GUI tool, the crawlpad.json file in this repo can be used on [kbfirmware.com](http://kbfirmware.com]. \ No newline at end of file +For those that prefer a GUI tool, the crawlpad.json file in this repo can be used on [kbfirmware.com](http://kbfirmware.com). \ No newline at end of file diff --git a/keyboards/cu24/config.h b/keyboards/cu24/config.h new file mode 100644 index 000000000000..df009c953a6a --- /dev/null +++ b/keyboards/cu24/config.h @@ -0,0 +1,192 @@ +/* Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Yiancar/CapsUnlocked +#define PRODUCT CU24 +#define DESCRIPTION A luxurious fully customisable numpad + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { E6, F5, B4, B6, C6, C7 } +#define MATRIX_COL_PINS { F0, F1, D0, D1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION ROW2COL + +/* Backlight */ +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 + +/* RGB Glow */ +#define RGB_DI_PIN F4 // The pin the LED strip is connected to +#define RGBLED_NUM 5 // Number of LEDs in your strip +#define RGBLIGHT_ANIMATIONS + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +#endif diff --git a/keyboards/cu24/cu24.c b/keyboards/cu24/cu24.c new file mode 100644 index 000000000000..0c976f076f3d --- /dev/null +++ b/keyboards/cu24/cu24.c @@ -0,0 +1,16 @@ +/* Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "cu24.h" diff --git a/keyboards/cu24/cu24.h b/keyboards/cu24/cu24.h new file mode 100644 index 000000000000..d329182d2387 --- /dev/null +++ b/keyboards/cu24/cu24.h @@ -0,0 +1,61 @@ +/* Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef CU24_H +#define CU24_H + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The following is an example using the Planck MIT layout +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT_grid( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, k43, \ + k50, k51, k52, k53 \ +) \ +{ \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, k33 }, \ + { k40, k41, k42, k43 }, \ + { k50, k51, k52, k53 } \ +} + +#define LAYOUT_numpad( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, \ + k40, k41, k42, k43, \ + k51, k52 \ +) \ +{ \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, KC_NO }, \ + { k40, k41, k42, k43 }, \ + { KC_NO, k51, k52, KC_NO } \ +} + + + +#endif diff --git a/keyboards/cu24/info.json b/keyboards/cu24/info.json new file mode 100644 index 000000000000..7cd9a3f1f904 --- /dev/null +++ b/keyboards/cu24/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "cu24", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 6, + "layouts": { + "LAYOUT_grid": { + "layout": [{"label":"Num Lock", "x":0, "y":0}, {"label":"/", "x":1, "y":0}, {"label":"*", "x":2, "y":0}, {"label":"-", "x":3, "y":0}, {"label":"7", "x":0, "y":1}, {"label":"8", "x":1, "y":1}, {"label":"9", "x":2, "y":1}, {"label":"+", "x":3, "y":1}, {"label":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"x":3, "y":2}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"Enter", "x":3, "y":3}, {"label":"0", "x":0, "y":4}, {"x":1, "y":4}, {"label":".", "x":2, "y":4}, {"x":3, "y":4}, {"x":0, "y":5}, {"x":1, "y":5}, {"x":2, "y":5}, {"x":3, "y":5}] + }, + + "LAYOUT_numpad": { + "layout": [{"label":"Num Lock", "x":0, "y":0}, {"label":"/", "x":1, "y":0}, {"label":"*", "x":2, "y":0}, {"label":"-", "x":3, "y":0}, {"label":"7", "x":0, "y":1}, {"label":"8", "x":1, "y":1}, {"label":"9", "x":2, "y":1}, {"label":"+", "x":3, "y":1}, {"label":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"x":3, "y":2, "h":2}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"0", "x":0, "y":4}, {"x":1, "y":4}, {"label":".", "x":2, "y":4}, {"x":3, "y":4, "h":2}, {"x":0, "y":5, "w":2}, {"x":2, "y":5}] + } + } +} \ No newline at end of file diff --git a/keyboards/cu24/keymaps/default/keymap.c b/keyboards/cu24/keymaps/default/keymap.c new file mode 100644 index 000000000000..73427ee8abac --- /dev/null +++ b/keyboards/cu24/keymaps/default/keymap.c @@ -0,0 +1,56 @@ +/* Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "cu24.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_grid( /* Base */ + KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, \ + MO(1) , KC_PSLS, KC_PAST, KC_PMNS, \ + KC_P7 , KC_P8 , KC_P9 , KC_PPLS, \ + KC_P4 , KC_P5 , KC_P6 , KC_PPLS, \ + KC_P1 , KC_P2 , KC_P3 , KC_PENT, \ + KC_P0 , KC_P0 , KC_PDOT, KC_PENT +), + +[1] = LAYOUT_grid( /* FN */ + RGB_TOG, RGB_MOD, BL_STEP, BL_BRTG, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, \ + RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, RESET , KC_TRNS +), +}; + +/* Use this function to add macros */ +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/cu24/keymaps/default/readme.md b/keyboards/cu24/keymaps/default/readme.md new file mode 100644 index 000000000000..5528d6c0d854 --- /dev/null +++ b/keyboards/cu24/keymaps/default/readme.md @@ -0,0 +1,10 @@ +https://imgur.com/a/vpHFj + +![CU24 Layout Image](https://imgur.com/X1c1qeY) + +# Default CU24 Layout + +This is the default layout that comes flashed on every CU24. It is like a normal numpad, +with all the led customization on the Fn layer. + +See [All Layouts](https://imgur.com/trwO7dN) for all supported configurations! \ No newline at end of file diff --git a/keyboards/cu24/readme.md b/keyboards/cu24/readme.md new file mode 100644 index 000000000000..4624c1aa9687 --- /dev/null +++ b/keyboards/cu24/readme.md @@ -0,0 +1,15 @@ +# CU24 + +![CU24](https://geekhack.org/index.php?action=dlattach;topic=93289.0;attach=185492;image) + +A luxurious 24 key keypad with various layouts. Includes RGB underglow, backlight and an aluminium, brass and nylon case. + +Keyboard Maintainer: [Yiancar](https://github.com/yiancar) +Hardware Supported: PCB v1.0 (uses a 32u4) +Hardware Availability: [caps-unlocked.com](http://caps-unlocked.com/) + +Make example for this keyboard (after setting up your build environment): + + make CU24:default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/cu24/rules.mk b/keyboards/cu24/rules.mk new file mode 100644 index 000000000000..86f1a8479c54 --- /dev/null +++ b/keyboards/cu24/rules.mk @@ -0,0 +1,69 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +RGBLIGHT_ENABLE = yes # RGB drivers diff --git a/keyboards/cu75/config.h b/keyboards/cu75/config.h new file mode 100644 index 000000000000..c21e1da017f1 --- /dev/null +++ b/keyboards/cu75/config.h @@ -0,0 +1,151 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6062 +#define DEVICE_VER 0x0001 +#define MANUFACTURER LFKeyboards/CapsUnlocked +#define PRODUCT CU75 +#define DESCRIPTION A luxurious fully customisable 75% + +#define DIODE_DIRECTION COL2ROW +#define MATRIX_ROWS 6 +#define MATRIX_COLS 16 +#define MATRIX_ROW_PINS {F1, B7, B3, D2, D3, B2} +#define MATRIX_COL_PINS {F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, B1, B0, F0} +#define UNUSED_PINS {} + +#define RGB_DI_PIN C7 // Have to set it to something to get the ws2812 code to compile +#define RGBLED_NUM 24 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 8 +#define BACKLIGHT_PWM_MAP {8, 16, 40, 55, 70, 128, 200, 255} + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/cu75/cu75.c b/keyboards/cu75/cu75.c new file mode 100644 index 000000000000..6dc289845457 --- /dev/null +++ b/keyboards/cu75/cu75.c @@ -0,0 +1,179 @@ +#include +#include +#include +#include "cu75.h" +#include "keymap.h" +#include "debug.h" +#include "../lfkeyboards/issi.h" +#include "../lfkeyboards/TWIlib.h" +#include "../lfkeyboards/lighting.h" + +#ifdef AUDIO_ENABLE +float test_sound[][2] = SONG(STARTUP_SOUND); +#include