diff --git a/.clang_complete b/.clang_complete deleted file mode 100644 index 21434586c73..00000000000 --- a/.clang_complete +++ /dev/null @@ -1,24 +0,0 @@ - --I. --I./drivers --I./drivers/avr --I./keyboards/ergodox_ez --I./keyboards/ergodox_ez/keymaps/vim --I./lib --I./lib/lufa --I./quantum --I./quantum/api --I./quantum/audio --I./quantum/keymap_extras --I./quantum/process_keycode --I./quantum/serial_link --I./quantum/template --I./quantum/tools --I./quantum/visualizer --I./tmk_core --I./tmk_core/common --I./tmk_core/common/debug.h --I./tmk_core/protocol --I./tmk_core/protocol/lufa --I./util --DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\" diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 27558127354..28c6bb36798 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -19,7 +19,7 @@ jobs: container: qmkfm/base_container steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 with: submodules: recursive - name: Install dependencies diff --git a/.gitignore b/.gitignore index 0e80cdb6c4b..20437224f18 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ quantum/version.h .idea/ CMakeLists.txt cmake-build-debug +.clang_complete doxygen/ .DS_Store /util/wsl_downloaded @@ -47,7 +48,6 @@ doxygen/ *.iml .browse.VC.db* *.stackdump -util/Win_Check_Output.txt # Let these ones be user specific, since we have so many different configurations .vscode/c_cpp_properties.json .vscode/launch.json diff --git a/.vscode/settings.json b/.vscode/settings.json index f17b9e23e3e..9aa546a7877 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,13 +9,17 @@ "**/*.bin": true }, "files.associations": { - "*.h": "c", - "*.c": "c", - "*.inc": "c", - "*.cpp": "cpp", - "*.hpp": "cpp", - "xstddef": "c", - "type_traits": "c", - "utility": "c" + "*.h": "c", + "*.c": "c", + "*.inc": "c", + "*.cpp": "cpp", + "*.hpp": "cpp", + "xstddef": "c", + "type_traits": "c", + "utility": "c" + }, + "[markdown]": { + "editor.trimAutoWhitespace": false, + "files.trimTrailingWhitespace": false } } diff --git a/autocomplete.sh b/autocomplete.sh deleted file mode 100644 index dffb260c425..00000000000 --- a/autocomplete.sh +++ /dev/null @@ -1 +0,0 @@ -complete -W " 9key-default alps64-default amj40-default amj40-fabian amj60-default_60_ansi amj60-iso_split_rshift amj60-maximized amjpad-default amjpad-max amjpad-ortho_left amjpad-ortho_right atomic-default atomic-default_ortho_5x15 atomic-pvc atreus-alphadox atreus-classic atreus-default atreus-erlandsona atreus-gerb atreus-jeremy atreus-replicaJunction atreus-xyverz atreus62-atreus52 atreus62-default atreus62-mneme atreus62-xyverz bananasplit-0010 bananasplit-coloneljesus bananasplit-default bananasplit-hhkbanana bananasplit-nic bananasplit-rask bantam44-default chibios_test-default clueboard-bloodlvst clueboard-caps_fn clueboard-colemak clueboard-default clueboard-jokrik clueboard-mac_optimized clueboard-magicmonty clueboard-maximised clueboard-mouse_keys clueboard-serubin clueboard-shift_fn clueboard-skully clueboard-smt clueboard-tetris clueboard-unix_optimized clueboard-win_optimized clueboard-xyverz cluecard-default cluecard-rgb_effects cluepad-default deltasplit75-default deltasplit75-itsaferbie deltasplit75-protosplit dk60-default eco-default eco-that_canadian ergodone-333fred ergodone-ab ergodone-absenth ergodone-adam ergodone-adnw_k_o_y ergodone-albert ergodone-alexjj ergodone-algernon ergodone-alphadox ergodone-andrew_osx ergodone-belak ergodone-bepo ergodone-bepo_csa ergodone-bryan ergodone-coderkun_neo2 ergodone-colemak ergodone-colemak_osx_pc_no ergodone-colemak_programmer ergodone-common_nighthawk ergodone-csharp_dev ergodone-dave ergodone-deadcyclo ergodone-default ergodone-default_ergodox ergodone-dragon788 ergodone-dvorak ergodone-dvorak_emacs ergodone-dvorak_emacs_software ergodone-dvorak_intl_squisher ergodone-dvorak_plover ergodone-dvorak_programmer ergodone-dvorak_programmer_swe ergodone-dvorak_spanish ergodone-emacs_osx_dk ergodone-erez_experimental ergodone-familiar ergodone-french_hacker ergodone-galson ergodone-german ergodone-german-kinergo ergodone-german-lukas ergodone-german-manuneo ergodone-guni ergodone-ishigoya-jp ergodone-italian ergodone-j3rn ergodone-jack ergodone-jacobono ergodone-jafo ergodone-jgarr ergodone-josh ergodone-kastyle ergodone-kines-ish ergodone-kristian ergodone-maz ergodone-mclennon_osx ergodone-mpiechotka ergodone-msc ergodone-naps62 ergodone-neo2_on_qwertz_hardware ergodone-norwegian_programmer_osx_pc ergodone-norwegian_programmer_osx_pc_colemak ergodone-ordinary ergodone-osx_de ergodone-osx_de_adnw_koy ergodone-osx_de_experimental ergodone-osx_fr ergodone-osx_kinesis_pnut ergodone-osx_whiskey_tango_foxtrot_capslock ergodone-phoenix ergodone-plover ergodone-plums ergodone-pvinis ergodone-replicaJunction ergodone-reset_eeprom ergodone-robot_test_layout ergodone-romanzolotarev-norman-osx ergodone-romanzolotarev-norman-plover-osx ergodone-romanzolotarev-norman-plover-osx-hjkl ergodone-romanzolotarev-norman-qwerty-osx ergodone-sethbc ergodone-siroken3 ergodone-sneako ergodone-software_neo2 ergodone-supercoder ergodone-swedish ergodone-swedish-lindhe ergodone-swissgerman ergodone-techtomas ergodone-teckinesis ergodone-tkuichooseyou ergodone-tm2030 ergodone-tonyabra_osx ergodone-townk_osx ergodone-twentylives_dvorak_with_hebrew ergodone-twey ergodone-videck ergodone-win10_writers-block ergodone-workman_osx_mdw ergodone-xyverz ergodone-yoruian ergodone-zweihander-osx ergodox_ez-333fred ergodox_ez-ab ergodox_ez-absenth ergodox_ez-adam ergodox_ez-adnw_k_o_y ergodox_ez-albert ergodox_ez-alexjj ergodox_ez-algernon ergodox_ez-alphadox ergodox_ez-andrew_osx ergodox_ez-belak ergodox_ez-bepo ergodox_ez-bepo_csa ergodox_ez-blakedietz ergodox_ez-bryan ergodox_ez-coderkun_neo2 ergodox_ez-colemak ergodox_ez-colemak_osx_pc_no ergodox_ez-colemak_programmer ergodox_ez-common_nighthawk ergodox_ez-csharp_dev ergodox_ez-dave ergodox_ez-deadcyclo ergodox_ez-default ergodox_ez-default_ergodox ergodox_ez-default_osx ergodox_ez-dragon788 ergodox_ez-drashna ergodox_ez-drashna-custom ergodox_ez-dvorak ergodox_ez-dvorak_emacs ergodox_ez-dvorak_emacs_software ergodox_ez-dvorak_intl_squisher ergodox_ez-dvorak_plover ergodox_ez-dvorak_programmer ergodox_ez-dvorak_programmer_swe ergodox_ez-dvorak_spanish ergodox_ez-emacs_osx_dk ergodox_ez-erez_experimental ergodox_ez-familiar ergodox_ez-french_hacker ergodox_ez-galson ergodox_ez-german ergodox_ez-german-kinergo ergodox_ez-german-lukas ergodox_ez-german-manuneo ergodox_ez-guni ergodox_ez-ishigoya-jp ergodox_ez-italian ergodox_ez-j3rn ergodox_ez-jack ergodox_ez-jacobono ergodox_ez-jafo ergodox_ez-jgarr ergodox_ez-josh ergodox_ez-kastyle ergodox_ez-kines-ish ergodox_ez-kristian ergodox_ez-maz ergodox_ez-mclennon_osx ergodox_ez-mpiechotka ergodox_ez-msc ergodox_ez-naps62 ergodox_ez-neo2_on_qwertz_hardware ergodox_ez-norwegian_programmer_osx_pc ergodox_ez-norwegian_programmer_osx_pc_colemak ergodox_ez-ordinary ergodox_ez-osx_de ergodox_ez-osx_de_adnw_koy ergodox_ez-osx_de_experimental ergodox_ez-osx_fr ergodox_ez-osx_kinesis_pnut ergodox_ez-osx_whiskey_tango_foxtrot_capslock ergodox_ez-phoenix ergodox_ez-plover ergodox_ez-plums ergodox_ez-profet_80 ergodox_ez-pvinis ergodox_ez-replicaJunction ergodox_ez-reset_eeprom ergodox_ez-robot_test_layout ergodox_ez-romanzolotarev-norman-osx ergodox_ez-romanzolotarev-norman-plover-osx ergodox_ez-romanzolotarev-norman-plover-osx-hjkl ergodox_ez-romanzolotarev-norman-qwerty-osx ergodox_ez-sethbc ergodox_ez-siroken3 ergodox_ez-sneako ergodox_ez-software_neo2 ergodox_ez-steno ergodox_ez-supercoder ergodox_ez-swedish ergodox_ez-swedish-lindhe ergodox_ez-swissgerman ergodox_ez-techtomas ergodox_ez-teckinesis ergodox_ez-tkuichooseyou ergodox_ez-tm2030 ergodox_ez-tonyabra_osx ergodox_ez-townk_osx ergodox_ez-twentylives_dvorak_with_hebrew ergodox_ez-twey ergodox_ez-videck ergodox_ez-win10_writers-block ergodox_ez-workman_osx_mdw ergodox_ez-xyverz ergodox_ez-yoruian ergodox_ez-zweihander-osx ergodox_infinity-333fred ergodox_infinity-ab ergodox_infinity-absenth ergodox_infinity-adam ergodox_infinity-adnw_k_o_y ergodox_infinity-albert ergodox_infinity-alexjj ergodox_infinity-algernon ergodox_infinity-alphadox ergodox_infinity-andrew_osx ergodox_infinity-belak ergodox_infinity-bepo ergodox_infinity-bepo_csa ergodox_infinity-bryan ergodox_infinity-coderkun_neo2 ergodox_infinity-colemak ergodox_infinity-colemak_osx_pc_no ergodox_infinity-colemak_programmer ergodox_infinity-common_nighthawk ergodox_infinity-csharp_dev ergodox_infinity-dave ergodox_infinity-deadcyclo ergodox_infinity-default_ergodox ergodox_infinity-dragon788 ergodox_infinity-dvorak ergodox_infinity-dvorak_emacs ergodox_infinity-dvorak_emacs_software ergodox_infinity-dvorak_intl_squisher ergodox_infinity-dvorak_plover ergodox_infinity-dvorak_programmer ergodox_infinity-dvorak_programmer_swe ergodox_infinity-dvorak_spanish ergodox_infinity-emacs_osx_dk ergodox_infinity-erez_experimental ergodox_infinity-familiar ergodox_infinity-french_hacker ergodox_infinity-galson ergodox_infinity-german ergodox_infinity-german-kinergo ergodox_infinity-german-lukas ergodox_infinity-german-manuneo ergodox_infinity-guni ergodox_infinity-ishigoya-jp ergodox_infinity-italian ergodox_infinity-j3rn ergodox_infinity-jack ergodox_infinity-jacobono ergodox_infinity-jafo ergodox_infinity-jgarr ergodox_infinity-josh ergodox_infinity-kastyle ergodox_infinity-kines-ish ergodox_infinity-kristian ergodox_infinity-maz ergodox_infinity-mclennon_osx ergodox_infinity-mpiechotka ergodox_infinity-msc ergodox_infinity-naps62 ergodox_infinity-neo2_on_qwertz_hardware ergodox_infinity-norwegian_programmer_osx_pc ergodox_infinity-norwegian_programmer_osx_pc_colemak ergodox_infinity-ordinary ergodox_infinity-osx_de ergodox_infinity-osx_de_adnw_koy ergodox_infinity-osx_de_experimental ergodox_infinity-osx_fr ergodox_infinity-osx_kinesis_pnut ergodox_infinity-osx_whiskey_tango_foxtrot_capslock ergodox_infinity-phoenix ergodox_infinity-plover ergodox_infinity-plums ergodox_infinity-pvinis ergodox_infinity-replicaJunction ergodox_infinity-reset_eeprom ergodox_infinity-robot_test_layout ergodox_infinity-romanzolotarev-norman-osx ergodox_infinity-romanzolotarev-norman-plover-osx ergodox_infinity-romanzolotarev-norman-plover-osx-hjkl ergodox_infinity-romanzolotarev-norman-qwerty-osx ergodox_infinity-sethbc ergodox_infinity-siroken3 ergodox_infinity-sneako ergodox_infinity-software_neo2 ergodox_infinity-supercoder ergodox_infinity-swedish ergodox_infinity-swedish-lindhe ergodox_infinity-swissgerman ergodox_infinity-techtomas ergodox_infinity-teckinesis ergodox_infinity-tkuichooseyou ergodox_infinity-tm2030 ergodox_infinity-tonyabra_osx ergodox_infinity-townk_osx ergodox_infinity-twentylives_dvorak_with_hebrew ergodox_infinity-twey ergodox_infinity-videck ergodox_infinity-win10_writers-block ergodox_infinity-workman_osx_mdw ergodox_infinity-xyverz ergodox_infinity-yoruian ergodox_infinity-zweihander-osx four_banger-default frosty_flake-default frosty_flake-nikchi frosty_flake-tkl gh60-dbroqua gh60-dbroqua_7U gh60-default gh60-default_60_ansi gh60-default_60_ansi_split_bs_rshift gh60-default_60_iso gh60-robotmaxtron gh60-sethbc gh60-talljoe gh60-unxmaal gh60-xyverz gherkin-default gherkin-mjt gherkin-steno gherkin-talljoe gonnerd-default gonnerd-mauin gonnerd-tkl hadron-default hadron-side_numpad hhkb-blakedietz hhkb-cinaeco hhkb-dbroqua hhkb-default hhkb-jp hhkb-jp_mac hhkb-lxol hhkb-mjt hhkb-rdg_jp hhkb-sh_jp hhkb-shela hhkb-smt infinity60-default infinity60-default_60_ansi_split_bs_rshift infinity60-depariel infinity60-hasu infinity60-jpetermans infinity60-talljoe jc65-default jc65-jetpacktuxedo jd40-default jd40-vanagon jd45-blakedietz jd45-default jd45-jeebak jd45-justin jd45-mjt jd45-mjt6u kbd75-default kc60-dbroqua kc60-dbroqua_hhkb kc60-default kc60-default_60_ansi kc60-mechmerlin kc60-sgoodwin kc60-stanleylai kc60-wigguno kc60-workman-dead kc60-ws2812 kinesis-default kinesis-dvorak kinesis-milestogo kinesis-xyverz kitten_paw-default kitten_paw-ickerwx kmac-default kmac-winkeyless lets_split-OLED_sample lets_split-adam lets_split-dale lets_split-default lets_split-default_ortho_4x12 lets_split-ergodoxish lets_split-fabian lets_split-henxing lets_split-hexwire lets_split-khord lets_split-mbsurfer lets_split-mjt lets_split-piemod lets_split-smt lets_split-xk lets_split-xyverz m10a-default maxipad-default mechmini-default minidox-default minidox-that_canadian mitosis-carvac_dv mitosis-default mitosis-mjt miuni32-adam-lee miuni32-default miuni32-ht_156 nyquist-333fred nyquist-default nyquist-default_ortho_5x12 nyquist-hexwire org60-boardy org60-default orthodox-default pegasushoof-blowrak pegasushoof-default phantom-default phantom-rgbmod phantom-xyverz planck-ab planck-alexey planck-angerthosenear planck-austin planck-basic planck-bone2planck planck-brandon planck-callum planck-cbbrowne planck-chance planck-charlie planck-circuit planck-coloneljesus planck-dale planck-daniel planck-david planck-dbroqua planck-default planck-default_ortho_4x12 planck-dshields planck-dzobert planck-ergodoxish planck-espynn planck-experimental planck-gabriel planck-handwired_binaryplease planck-impossible planck-jacob planck-jeebak planck-jeremy-dev planck-jhenahan planck-joe planck-johannes planck-khord planck-kyle planck-lae3 planck-leo planck-lucas planck-lukas planck-luke planck-max planck-mitch planck-mjt planck-mjtnumsym planck-mollat planck-nico planck-originerd planck-pete planck-piemod planck-premek planck-priyadi planck-pvc planck-rai-suta planck-sgoodwin planck-smt planck-steno planck-tak3over planck-thermal_printer planck-tong92 planck-unicode planck-vifon planck-xyverz planck-yale planck-yang planck-zach preonic-0xdec preonic-CMD-Preonic preonic-dale preonic-default preonic-default_ortho_5x12 preonic-jacwib preonic-kinesis preonic-nikchi preonic-smt preonic-xyverz preonic-zach ps2avrGB-default roadkit-default roadkit-default_ortho_4x4 roadkit-flipphone roadkit-mjt roadkit-singles roadkit-singlesBrent s60_x-ansi_qwertz s60_x-bluebear s60_x-custom s60_x-dbroqua s60_x-default s60_x-hasu s60_x-hhkb s60_x-iso s60_x-jpec s60_x-plain s60_x-poker s60_x-poker_bit s60_x-poker_set s60_x-spacefn s65_x-default s65_x-iso s65_x-nall s65_x-smt satan-admiralStrokers satan-ben_iso satan-colemak satan-dbroqua satan-default satan-default_60_ansi satan-default_60_ansi_split_bs_rshift satan-default_60_iso satan-denolfe satan-iso_split_rshift satan-mark1 satan-midi satan-poker satan-rask63 satan-sethbc satan-smt satan-stanleylai satan-talljoe satan-unxmaal sixkeyboard-default subatomic-default sweet16-default tada68-default tada68-maartenwut tada68-rgb tiger_lily-default tv44-belak tv44-core tv44-default tv44-jeebak tv44-jetpacktuxedo tv44-mjt tv44-smt tv44-tong92 tv44-xyverz uk78-default vision_division-default whitefox-default whitefox-jetpacktuxedo whitefox-matt3o xd60-cheese xd60-default xd60-stanleylai xd75-default xd75-default_ortho_5x15 xd75-fabian" make diff --git a/bin/qmk b/bin/qmk index 750ff2bdb7b..801852d4e8d 100755 --- a/bin/qmk +++ b/bin/qmk @@ -35,7 +35,7 @@ def _check_modules(requirements): if not find_spec(module['import']): print('Could not find module %s!' % module['name']) - print('Please run `python3 -m pip install -r %s` to install required python dependencies.' % str(qmk_dir / requirements)) + print('Please run `python3 -m pip install -r %s` to install required python dependencies.' % (qmk_dir / requirements,)) if developer: print('You can also turn off developer mode: qmk config user.developer=None') print() diff --git a/build_json.mk b/build_json.mk index 087944cc418..6e2f9c4c8f2 100644 --- a/build_json.mk +++ b/build_json.mk @@ -21,6 +21,11 @@ else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.json)","") KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1) endif +# Load the keymap-level rules.mk if exists +ifneq ("$(wildcard $(KEYMAP_PATH))", "") + -include $(KEYMAP_PATH)/rules.mk +endif + # Generate the keymap.c $(KEYBOARD_OUTPUT)/src/keymap.c: $(KEYMAP_JSON) bin/qmk json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON) diff --git a/docs/_summary.md b/docs/_summary.md index e351251093f..842422665e4 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -6,6 +6,7 @@ * [Testing and Debugging](newbs_testing_debugging.md) * [Getting Help/Support](support.md) * [Other Resources](newbs_learn_more_resources.md) + * [Syllabus](syllabus.md) * FAQs * [General FAQ](faq_general.md) @@ -136,6 +137,10 @@ * [Development Environment](api_development_environment.md) * [Architecture Overview](api_development_overview.md) + * Hardware Platform Development + * Arm/ChibiOS + * [Early initialization](platformdev_chibios_earlyinit.md) + * QMK Reference * [Contributing to QMK](contributing.md) * [Translating the QMK Docs](translating.md) diff --git a/docs/cli.md b/docs/cli.md index 760fe1cdb56..01641bd8b87 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -6,7 +6,7 @@ The QMK CLI makes building and working with QMK keyboards easier. We have provid ### Requirements :id=requirements -The CLI requires Python 3.5 or greater. We try to keep the number of requirements small but you will also need to install the packages listed in [`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt). These are installed automatically when you install the QMK CLI. +QMK requires Python 3.6 or greater. We try to keep the number of requirements small but you will also need to install the packages listed in [`requirements.txt`](https://github.com/qmk/qmk_firmware/blob/master/requirements.txt). These are installed automatically when you install the QMK CLI. ### Install Using Homebrew (macOS, some Linux) :id=install-using-homebrew @@ -21,7 +21,7 @@ qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build ### Install Using easy_install or pip :id=install-using-easy_install-or-pip -If your system is not listed above you can install QMK manually. First ensure that you have python 3.5 (or later) installed and have installed pip. Then install QMK with this command: +If your system is not listed above you can install QMK manually. First ensure that you have python 3.6 (or later) installed and have installed pip. Then install QMK with this command: ``` pip3 install qmk diff --git a/docs/cli_development.md b/docs/cli_development.md index 2a967de4aba..af86686c070 100644 --- a/docs/cli_development.md +++ b/docs/cli_development.md @@ -44,7 +44,7 @@ def hello(cli): First we import the `cli` object from `milc`. This is how we interact with the user and control the script's behavior. We use `@cli.argument()` to define a command line flag, `--name`. This also creates a configuration variable named `hello.name` (and the corresponding `user.name`) which the user can set so they don't have to specify the argument. The `cli.subcommand()` decorator designates this function as a subcommand. The name of the subcommand will be taken from the name of the function. -Once inside our function we find a typical "Hello, World!" program. We use `cli.log` to access the underlying [Logger Object](https://docs.python.org/3.5/library/logging.html#logger-objects), whose behavior is user controllable. We also access the value for name supplied by the user as `cli.config.hello.name`. The value for `cli.config.hello.name` will be determined by looking at the `--name` argument supplied by the user, if not provided it will use the value in the `qmk.ini` config file, and if neither of those is provided it will fall back to the default supplied in the `cli.argument()` decorator. +Once inside our function we find a typical "Hello, World!" program. We use `cli.log` to access the underlying [Logger Object](https://docs.python.org/3.6/library/logging.html#logger-objects), whose behavior is user controllable. We also access the value for name supplied by the user as `cli.config.hello.name`. The value for `cli.config.hello.name` will be determined by looking at the `--name` argument supplied by the user, if not provided it will use the value in the `qmk.ini` config file, and if neither of those is provided it will fall back to the default supplied in the `cli.argument()` decorator. # User Interaction @@ -56,13 +56,13 @@ There are two main methods for outputting text in a subcommand- `cli.log` and `c You can use special tokens to colorize your text, to make it easier to understand the output of your program. See [Colorizing Text](#colorizing-text) below. -Both of these methods support built-in string formatting using python's [printf style string format operations](https://docs.python.org/3.5/library/stdtypes.html#old-string-formatting). You can use tokens such as `%s` and `%d` within your text strings then pass the values as arguments. See our Hello, World program above for an example. +Both of these methods support built-in string formatting using python's [printf style string format operations](https://docs.python.org/3.6/library/stdtypes.html#old-string-formatting). You can use tokens such as `%s` and `%d` within your text strings then pass the values as arguments. See our Hello, World program above for an example. You should never use the format operator (`%`) directly, always pass values as arguments. ### Logging (`cli.log`) -The `cli.log` object gives you access to a [Logger Object](https://docs.python.org/3.5/library/logging.html#logger-objects). We have configured our log output to show the user a nice emoji for each log level (or the log level name if their terminal does not support unicode.) This way the user can tell at a glance which messages are most important when something goes wrong. +The `cli.log` object gives you access to a [Logger Object](https://docs.python.org/3.6/library/logging.html#logger-objects). We have configured our log output to show the user a nice emoji for each log level (or the log level name if their terminal does not support unicode.) This way the user can tell at a glance which messages are most important when something goes wrong. The default log level is `INFO`. If the user runs `qmk -v ` the default log level will be set to `DEBUG`. diff --git a/docs/coding_conventions_python.md b/docs/coding_conventions_python.md index 1aefc044e84..47dff7f8eea 100644 --- a/docs/coding_conventions_python.md +++ b/docs/coding_conventions_python.md @@ -2,7 +2,7 @@ Most of our style follows PEP8 with some local modifications to make things less nit-picky. -* We target Python 3.5 for compatability with all supported platforms. +* We target Python 3.6 for compatability with all supported platforms. * We indent using four (4) spaces (soft tabs) * We encourage liberal use of comments * Think of them as a story describing the feature @@ -317,7 +317,7 @@ At the time of this writing our tests are not very comprehensive. Looking at the ## Integration Tests -Integration tests can be found in `lib/python/qmk/tests/test_cli_commands.py`. This is where CLI commands are actually run and their overall behavior is verified. We use [`subprocess`](https://docs.python.org/3.5/library/subprocess.html#module-subprocess) to launch each CLI command and a combination of checking output and returncode to determine if the right thing happened. +Integration tests can be found in `lib/python/qmk/tests/test_cli_commands.py`. This is where CLI commands are actually run and their overall behavior is verified. We use [`subprocess`](https://docs.python.org/3.6/library/subprocess.html#module-subprocess) to launch each CLI command and a combination of checking output and returncode to determine if the right thing happened. ## Unit Tests diff --git a/docs/faq_debug.md b/docs/faq_debug.md index 6c66defbd44..08c84fe4fd3 100644 --- a/docs/faq_debug.md +++ b/docs/faq_debug.md @@ -160,10 +160,3 @@ As of now root of its cause is not clear but some build options seem to be relat https://github.com/tmk/tmk_keyboard/issues/266 https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778 - - - -## FLIP Doesn't Work -### `AtLibUsbDfu.dll` Not Found -Remove current driver and reinstall one FLIP provides from DeviceManager. -http://imgur.com/a/bnwzy diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index b2abe5dae08..b8664074a7c 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -6,11 +6,11 @@ These allow you to combine a modifier with a keycode. When pressed, the keydown |----------|-------------------------------|----------------------------------------------------| |`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` | |`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` | -|`LALT(kc)`|`A(kc)` |Hold Left Alt and press `kc` | +|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` | |`LGUI(kc)`|`G(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)`|`ALGR(kc)` |Hold Right Alt and press `kc` | +|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` | |`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI 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` | @@ -18,7 +18,7 @@ These allow you to combine a modifier with a keycode. When pressed, the keydown |`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` | |`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`| -You can also chain them, for example `LCTL(LALT(KC_DEL))` makes a key that sends Control+Alt+Delete with a single keypress. +You can also chain them, for example `LCTL(LALT(KC_DEL))` or `C(A(KC_DEL))` makes a key that sends Control+Alt+Delete with a single keypress. # Legacy Content :id=legacy-content diff --git a/docs/feature_encoders.md b/docs/feature_encoders.md index 4a0ae60c314..7799b78d6e4 100644 --- a/docs/feature_encoders.md +++ b/docs/feature_encoders.md @@ -61,7 +61,7 @@ void encoder_update_user(uint8_t index, bool clockwise) { } else { tap_code(KC_PGUP); } - } else if (index == 1) { /* Second encoder */ + } else if (index == 1) { /* Second encoder */ if (clockwise) { tap_code(KC_DOWN); } else { diff --git a/docs/feature_macros.md b/docs/feature_macros.md index 1bd2d74e7d9..1c7705a5160 100644 --- a/docs/feature_macros.md +++ b/docs/feature_macros.md @@ -161,11 +161,11 @@ There's also a couple of mod shortcuts you can use: * `SS_LCTL(string)` * `SS_LSFT(string)` -* `SS_LALT(string)` +* `SS_LALT(string)` or `SS_LOPT(string)` * `SS_LGUI(string)`, `SS_LCMD(string)` or `SS_LWIN(string)` * `SS_RCTL(string)` * `SS_RSFT(string)` -* `SS_RALT(string)` or `SS_ALGR(string)` +* `SS_RALT(string)`, `SS_ROPT(string)` or `SS_ALGR(string)` * `SS_RGUI(string)`, `SS_RCMD(string)` or `SS_RWIN(string)` These press the respective modifier, send the supplied string and then release the modifier. diff --git a/docs/flashing.md b/docs/flashing.md index ab003308d05..1f71c253c3a 100644 --- a/docs/flashing.md +++ b/docs/flashing.md @@ -26,7 +26,6 @@ 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.microchip.com/developmenttools/productdetails.aspx?partno=flip) (not recommended) Flashing sequence: diff --git a/docs/fr-fr/faq_debug.md b/docs/fr-fr/faq_debug.md index 754c79921cb..9c12f2917a0 100644 --- a/docs/fr-fr/faq_debug.md +++ b/docs/fr-fr/faq_debug.md @@ -155,11 +155,3 @@ Pour le moment, l'origine du problème n'est pas comprise, mais certaines option https://github.com/tmk/tmk_keyboard/issues/266 https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778 - -## FLIP ne marche pas - -### `AtLibUsbDfu.dll` Not Found - -Supprimez le pilote actuel et réinstallez celui donné par FLIP dans le gestionnaire de périphériques. - -http://imgur.com/a/bnwzy diff --git a/docs/fr-fr/flashing.md b/docs/fr-fr/flashing.md index c380614a5de..74eae497799 100644 --- a/docs/fr-fr/flashing.md +++ b/docs/fr-fr/flashing.md @@ -26,7 +26,6 @@ Méthodes de flash compatibles : * [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (interface graphique recommandé) * [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` avec QMK (outil en ligne de commande recommandé) -* [Atmel's Flip](http://www.microchip.com/developmenttools/productdetails.aspx?partno=flip) (non recommandé) Ordre des actions : diff --git a/docs/getting_started_vagrant.md b/docs/getting_started_vagrant.md index da26682d7f3..7a4541cfc63 100644 --- a/docs/getting_started_vagrant.md +++ b/docs/getting_started_vagrant.md @@ -20,7 +20,6 @@ The "easy" way to flash the firmware is using a tool from your host OS: * [QMK Toolbox](https://github.com/qmk/qmk_toolbox) (recommended) * [Teensy Loader](https://www.pjrc.com/teensy/loader.html) -* [Atmel FLIP](http://www.atmel.com/tools/flip.aspx) If you want to program via the command line you can uncomment the ['modifyvm'] lines in the Vagrantfile to enable the USB passthrough into Linux and then program using the command line tools like dfu-util/dfu-programmer or you can install the Teensy CLI version. diff --git a/docs/ja/faq_debug.md b/docs/ja/faq_debug.md index 8e42aebbb55..856e9473a17 100644 --- a/docs/ja/faq_debug.md +++ b/docs/ja/faq_debug.md @@ -152,10 +152,3 @@ https://geekhack.org/index.php?topic=14290.msg1884034#msg1884034 https://github.com/tmk/tmk_keyboard/issues/266 https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778 - - - -## FLIP が動作しない -### `AtLibUsbDfu.dll` が見つかりません -デバイスマネージャから現在のドライバを削除し、FLIP が提供するものを再インストールします。 -http://imgur.com/a/bnwzy diff --git a/docs/ja/feature_advanced_keycodes.md b/docs/ja/feature_advanced_keycodes.md index d208d7f926b..c6e21feb946 100644 --- a/docs/ja/feature_advanced_keycodes.md +++ b/docs/ja/feature_advanced_keycodes.md @@ -54,11 +54,11 @@ QMK を使い始めたばかりの場合は、全てを単純にしたいでし |----------|-------------------------------|----------------------------------------------------| | `LCTL(kc)` | `C(kc)` | 左 Control を押しながら `kc` を押します。 | | `LSFT(kc)` | `S(kc)` | 左 Shift を押しながら `kc` を押します。 | -| `LALT(kc)` | `A(kc)` | 左 Alt を押しながら `kc`を押します。 | +| `LALT(kc)` | `A(kc)`, `LOPT(kc)` | 左 Alt を押しながら `kc`を押します。 | | `LGUI(kc)` | `G(kc)`, `LCMD(kc)`, `LWIN(kc)` | 左 GUI を押しながら `kc` を押します。 | | `RCTL(kc)` | | 右 Control を押しながら `kc` を押します。 | | `RSFT(kc)` | | 右 Shift を押しながら `kc` を押します。 | -| `RALT(kc)` | `ALGR(kc)` | 右 Alt を押しながら `kc` を押します。 | +| `RALT(kc)` | `ROPT(kc)`, `ALGR(kc)` | 右 Alt を押しながら `kc` を押します。 | | `RGUI(kc)` | `RCMD(kc)`, `LWIN(kc)` | 右 GUI を押しながら `kc` を押します。 | | `SGUI(kc)` | `SCMD(kc)`, `SWIN(kc)` | 左 Shift と左 GUI を押しながら `kc` を押します。 | | `LCA(kc)` | | 左 Control と左 Alt を押しながら `kc` を押します。 | diff --git a/docs/ja/feature_combo.md b/docs/ja/feature_combo.md new file mode 100644 index 00000000000..4fbd6847d2c --- /dev/null +++ b/docs/ja/feature_combo.md @@ -0,0 +1,108 @@ +# コンボ + + + +コンボ機能は、同時押し方式でのカスタムアクション追加機能です。同時に複数のキーを押して、異なる効果を生み出すことができます。例えば、タッピング時間内で `A` と `S` を押すと、代わりに `ESC` が押されます。もっと複雑なタスクを実行させることもできます。 + +この機能を有効にするには、`rules.mk` に `COMBO_ENABLE = yes` を追加する必要があります。 + +さらに、使用するコンボの数を `config.h` の中で、`#define COMBO_COUNT 1` (1を使用するコンボの数で置き換えます)と書いて、指定する必要があります。 + + +また、デフォルトでは、コンボのタッピング時間は `TAPPING_TERM` と同じ値に設定されます (ほとんどのキーボードではデフォルトで 200)。ただし、`config.h` で定義することにより異なる値を指定することができます。例えば: `#define COMBO_TERM 300` はコンボのためのタイムアウト時間を 300ms に設定します。 + +次に、`keymap.c` ファイルに、`COMBO_END` で終了するキーのシーケンス、およびキーの組み合わせを列挙する構造体、その結果のアクションを定義する必要があります。 + +```c +const uint16_t PROGMEM test_combo[] = {KC_A, KC_B, COMBO_END}; +combo_t key_combos[COMBO_COUNT] = {COMBO(test_combo, KC_ESC)}; +``` + +これは、A と B のキーを押した場合に、"Escape" を送信します。 + +!> このメソッドは[基本的なキーコード](ja/keycodes_basic.md)のみをサポートします。詳細な制御については例を見てください。 + +## 例 + +リストを追加したい場合は、以下のようなものを使います: + +```c +enum combos { + AB_ESC, + JK_TAB +}; + +const uint16_t PROGMEM ab_combo[] = {KC_A, KC_B, COMBO_END}; +const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + [AB_ESC] = COMBO(ab_combo, KC_ESC), + [JK_TAB] = COMBO(jk_combo, KC_TAB) +}; +``` + +より複雑な実装として、カスタム処理を追加するために `process_combo_event` 関数を使うことができます。 + +```c +enum combo_events { + ZC_COPY, + XV_PASTE +}; + +const uint16_t PROGMEM copy_combo[] = {KC_Z, KC_C, COMBO_END}; +const uint16_t PROGMEM paste_combo[] = {KC_X, KC_V, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + [ZC_COPY] = COMBO_ACTION(copy_combo), + [XV_PASTE] = COMBO_ACTION(paste_combo), +}; + +void process_combo_event(uint8_t combo_index, bool pressed) { + switch(combo_index) { + case ZC_COPY: + if (pressed) { + tap_code16(LCTL(KC_C)); + } + break; + case XV_PASTE: + if (pressed) { + tap_code16(LCTL(KC_V)); + } + break; + } +} +``` + +これは、Z と C を押すと Ctrl+C を送信し、X と V を押すと Ctrl+V を送信します。これを変更して、レイヤーの変更、サウンドの再生、設定の変更などを行うこともできます。 + +## 追加の設定 + +長いコンボあるいはさらに長いコンボを使っている場合、構造体があなたのしていることに対応するのに十分な大きさで無いかもしれないため、問題が発生するかもしれません。 + +この場合、`config.h` ファイルに `#define EXTRA_LONG_COMBOS` または `#define EXTRA_EXTRA_LONG_COMBOS` のどちらかを追加することができます。 + +`COMBO_ALLOW_ACTION_KEYS` を定義することでアクションキーを有効にすることもできます。 + +## キーコード + +その場でコンボ機能を有効、無効および切り替えすることができます。ゲームなどで、一時的にそれらを無効にする必要がある場合に便利です。 + +| キーコード | 説明 | +|----------|---------------------------------| +| `CMB_ON` | コンボ機能をオンにします | +| `CMB_OFF` | コンボ機能をオフにします | +| `CMB_TOG` | コンボ機能のオンとオフを切り替えます | + +## ユーザコールバック + +キーコードに加えて、状態を設定または状態をチェックするために使うことができる幾つかの関数があります: + +| 関数 | 説明 | +|-----------|--------------------------------------------------------------------| +| `combo_enable()` | コンボ機能を有効にします | +| `combo_disable()` | コンボ機能を無効にし、コンボバッファをクリアします | +| `combo_toggle()` | コンボ機能の状態を切り替えます | +| `is_combo_enabled()` | コンボ機能の状態(true か false)を返します | diff --git a/docs/ja/feature_command.md b/docs/ja/feature_command.md new file mode 100644 index 00000000000..f8b7e892941 --- /dev/null +++ b/docs/ja/feature_command.md @@ -0,0 +1,56 @@ +# コマンド + + + +コマンド(旧称:マジック)は、ファームウェアを書き込んだり、[ブートマジック](ja/feature_bootmagic.md)を使うためにプラグを抜いたりすることなくキーボードの挙動を変更する方法です。この機能と[ブートマジックキーコード](feature_bootmagic.md#keycodes)には多くの重複があります。可能な限り、コマンドでは無くブートマジックキーコードの機能を使うことをお勧めします。 + +一部のキーボードではコマンドがデフォルトで無効になっています。その場合、`rules.mk` 内で明示的に有効にする必要があります: + +```make +COMMAND_ENABLE = yes +``` + +## 使用法 + +コマンドを使うには、`IS_COMMAND()` マクロで定義されたキーの組み合わせを押し続けます。デフォルトでは、これは「左Shift + 右Shift」です。次に、目的のコマンドに対応するキーを押します。例えば、現在の QMK バージョンを QMK Toolbox コンソールに出力するには、「左Shift + 右Shift + `V`」を押します。 + +## 設定 + +コマンドのためのキーの割り当てを変更したい場合は、キーボードあるいはキーマップレベルのどちらかで、`config.h` にこれらを `#define` します。ここで割り当てる全てのキーコードは `KC_` 接頭辞を省略する必要があります。 + +| 定義 | デフォルト | 説明 | +|------------------------------------|--------------------------------|------------------------------------------------| +| `IS_COMMAND()` | `(get_mods() == MOD_MASK_SHIFT)` | コマンドをアクティブにするキーの組み合わせ | +| `MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS` | `true` | ファンクション行を使ってデフォルトレイヤーを設定 | +| `MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS` | `true` | 数字キーでデフォルトレイヤーを設定 | +| `MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM` | `false` | `MAGIC_KEY_LAYER0..9` を使ってデフォルトレイヤーを設定 | +| `MAGIC_KEY_DEBUG` | `D` | シリアルを介するデバッグの切り替え | +| `MAGIC_KEY_DEBUG_MATRIX` | `X` | キーマトリックスのデバッグの切り替え | +| `MAGIC_KEY_DEBUG_KBD` | `K` | キーボードのデバッグの切り替え | +| `MAGIC_KEY_DEBUG_MOUSE` | `M` | マウスのデバッグの切り替え | +| `MAGIC_KEY_CONSOLE` | `C` | コマンドコンソールを有効にする | +| `MAGIC_KEY_VERSION` | `V` | コンソールに実行中の QMK バージョンを出力 | +| `MAGIC_KEY_STATUS` | `S` | コンソールに現在のキーボードの状態を出力 | +| `MAGIC_KEY_HELP` | `H` | コンソールにコマンドのヘルプを出力 | +| `MAGIC_KEY_HELP_ALT` | `SLASH` | コンソールにコマンドのヘルプを出力 (代替) | +| `MAGIC_KEY_LAYER0` | `0` | レイヤー 0 をデフォルトレイヤーにする | +| `MAGIC_KEY_LAYER0_ALT` | `GRAVE` | レイヤー 0 をデフォルトレイヤーにする (代替) | +| `MAGIC_KEY_LAYER1` | `1` | レイヤー 1 をデフォルトレイヤーにする | +| `MAGIC_KEY_LAYER2` | `2` | レイヤー 2 をデフォルトレイヤーにする | +| `MAGIC_KEY_LAYER3` | `3` | レイヤー 3 をデフォルトレイヤーにする | +| `MAGIC_KEY_LAYER4` | `4` | レイヤー 4 をデフォルトレイヤーにする | +| `MAGIC_KEY_LAYER5` | `5` | レイヤー 5 をデフォルトレイヤーにする | +| `MAGIC_KEY_LAYER6` | `6` | レイヤー 6 をデフォルトレイヤーにする | +| `MAGIC_KEY_LAYER7` | `7` | レイヤー 7 をデフォルトレイヤーにする | +| `MAGIC_KEY_LAYER8` | `8` | レイヤー 8 をデフォルトレイヤーにする | +| `MAGIC_KEY_LAYER9` | `9` | レイヤー 9 をデフォルトレイヤーにする | +| `MAGIC_KEY_BOOTLOADER` | `B` | ブートローダにジャンプする | +| `MAGIC_KEY_BOOTLOADER_ALT` | `ESC` | ブートローダにジャンプする (代替) | +| `MAGIC_KEY_LOCK` | `CAPS` | 何も入力できないようにキーボードをロック | +| `MAGIC_KEY_EEPROM` | `E` | 保存された EEPROM 設定をコンソールに出力 | +| `MAGIC_KEY_EEPROM_CLEAR` | `BSPACE` | EEPROM をクリア | +| `MAGIC_KEY_NKRO` | `N` | N キーロールオーバー (NKRO) の有効・無効を切り替え | +| `MAGIC_KEY_SLEEP_LED` | `Z` | コンピュータがスリープの時に LED を切り替え | diff --git a/docs/ja/feature_dip_switch.md b/docs/ja/feature_dip_switch.md new file mode 100644 index 00000000000..1403485cadd --- /dev/null +++ b/docs/ja/feature_dip_switch.md @@ -0,0 +1,95 @@ +# DIP スイッチ + + + +DIP スイッチは、以下を `rules.mk` に追加することでサポートされます: + + DIP_SWITCH_ENABLE = yes + +さらに、以下を `config.h` に追加します: + +```c +#define DIP_SWITCH_PINS { B14, A15, A10, B9 } +``` + +## コールバック + +コールバック関数を `.c` に記述することができます: + +```c +void dip_switch_update_kb(uint8_t index, bool active) { + dip_switch_update_user(index, active); +} +``` + + +あるいは `keymap.c` に記述することもできます: + +```c +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: + if(active) { audio_on(); } else { audio_off(); } + break; + case 1: + if(active) { clicky_on(); } else { clicky_off(); } + break; + case 2: + if(active) { music_on(); } else { music_off(); } + break; + case 3: + if (active) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_song); + #endif + layer_on(_PLOVER); + } else { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_PLOVER); + } + break; + } +} +``` + +更に、より複雑な処理ができるビットマスク関数をサポートします。 + + +```c +void dip_switch_update_mask_kb(uint32_t state) { + dip_switch_update_mask_user(state); +} +``` + + +あるいは `keymap.c` に記述することもできます: + +```c +void dip_switch_update_mask_user(uint32_t state) { + if (state & (1UL<<0) && state & (1UL<<1)) { + layer_on(_ADJUST); // C on esc + } else { + layer_off(_ADJUST); + } + if (state & (1UL<<0)) { + layer_on(_TEST_A); // A on ESC + } else { + layer_off(_TEST_A); + } + if (state & (1UL<<1)) { + layer_on(_TEST_B); // B on esc + } else { + layer_off(_TEST_B); + } +} +``` + + +## ハードウェア + +DIP スイッチの片側は MCU のピンへ直接配線し、もう一方の側はグラウンドに配線する必要があります。機能的に同じであるため、どちら側がどちらに接続されているかは問題にはならないはずです。 diff --git a/docs/ja/feature_dynamic_macros.md b/docs/ja/feature_dynamic_macros.md new file mode 100644 index 00000000000..ab8ec371374 --- /dev/null +++ b/docs/ja/feature_dynamic_macros.md @@ -0,0 +1,71 @@ +# 動的マクロ: ランタイムでのマクロの記録および再生 + + + +QMK はその場で作られた一時的なマクロをサポートします。これらを動的マクロと呼びます。それらはユーザがキーボードから定義し、キーボードのプラグを抜くか再起動すると失われます。 + +1つまたは2つのマクロに合計128のキー押下を保存できます。RAM をより多く使用してサイズを増やすことができます。 + +有効にするには、最初に `rules.mk` に `DYNAMIC_MACRO_ENABLE = yes` を記述します。そして、以下のキーをキーマップに追加します: + +| キー | Alias | 説明 | +|------------------|----------|---------------------------------------------------| +| `DYN_REC_START1` | `DM_REC1` | マクロ 1 の記録を開始します | +| `DYN_REC_START2` | `DM_REC2` | マクロ 2 の記録を開始します | +| `DYN_MACRO_PLAY1` | `DM_PLY1` | マクロ 1 を再生します | +| `DYN_MACRO_PLAY2` | `DM_PLY2` | マクロ 2 を再生します | +| `DYN_REC_STOP` | `DM_RSTP` | 現在記録中のマクロの記録を終了します。 | + +これが必要な全てです。 + +マクロの記録を開始するには、`DYN_REC_START1` または `DYN_REC_START2` のどちらかを押します。 + +記録を終了するには、`DYN_REC_STOP` レイヤーボタンを押します。 + +マクロを再生するには、`DYN_MACRO_PLAY1` あるいは `DYN_MACRO_PLAY2` のどちらかを押します。 + +マクロの一部としてマクロを再生することができます。マクロ 1 を記録中にマクロ 2 を再生、またはその逆も問題ありません。ただし、再帰的なマクロ、つまりマクロ 1 を再生するマクロ 1 は作成しないでください。もしそうしてキーボードが反応しなくなった場合は、キーボードを取り外し再び接続します。これを完全に無効にするには、`config.h` ファイルで `DYNAMIC_MACRO_NO_NESTING` を定義します。 + +?> 動的マクロの内部の詳細については、`process_dynamic_macro.h` および `process_dynamic_macro.c` ファイルのコメントを読んでください。 + +## カスタマイズ + +ある程度のカスタマイズを可能にするオプションがいくつか追加されています。 + +| 定義 | デフォルト | 説明 | +|----------------------------|----------------|-----------------------------------------------------------------------------------------------------------------| +| `DYNAMIC_MACRO_SIZE` | 128 | 動的マクロが使用できるメモリ量を設定します。これは限られたリソースであり、コントローラに依存します。 | +| `DYNAMIC_MACRO_USER_CALL` | *定義なし* | これを定義すると、ユーザの `keymap.c` ファイルを使ってマクロが起動されます。 | +| `DYNAMIC_MACRO_NO_NESTING` | *定義なし* | これを定義すると、別のマクロからマクロを呼び出す(入れ子になったマクロ)機能を無効にします。 | + + +記録中にキーを押すたびに LED が点滅し始めた場合は、マクロバッファにマクロを入れるスペースがもう無いことを意味します。マクロを入れるには、他のマクロ(それらは同じバッファを共有します)を短くするか、`config.h` に `DYNAMIC_MACRO_SIZE` 定義を追加することでバッファを増やします(デフォルト値: 128; ヘッダ内のコメントを読んでください)。 + + +### DYNAMIC_MACRO_USER_CALL + +以前のバージョンの動的マクロをお使いの方へ: 専用の `DYN_REC_STOP` キーを使わずに動的マクロキーへのアクセスに使われるレイヤーモディファイアのみを使って、マクロの記録を終了することもまだ可能です。この動作に戻したい場合は、`#define DYNAMIC_MACRO_USER_CALL` を `config.h` に追加し、以下のスニペットを `process_record_user()` 関数の先頭に記述します: + +```c + uint16_t macro_kc = (keycode == MO(_DYN) ? DYN_REC_STOP : keycode); + + if (!process_record_dynamic_macro(macro_kc, record)) { + return false; + } +``` + +### ユーザフック + +カスタム機能とフィードバックオプションを動的マクロ機能に追加するために使うことができるフックが幾つかあります。これによりある程度のカスタマイズが可能になります。 + +direction がどのマクロであるかを示すことに注意してください。`1` がマクロ 1、`-1` がマクロ 2、0 がマクロ無しです。 + +* `dynamic_macro_record_start_user(void)` - マクロの記録を開始する時に起動されます。 +* `dynamic_macro_play_user(int8_t direction)` - マクロを再生する時に起動されます。 +* `dynamic_macro_record_key_user(int8_t direction, keyrecord_t *record)` - マクロの記録中に各キー押下で起動されます。 +* `dynamic_macro_record_end_user(int8_t direction)` - マクロの記録を停止した時に起動されます。 + +さらに、動的マクロ機能が有効な場合にバックライトを点滅させるために `dynamic_macro_led_blink()` を呼び出すことができます。 diff --git a/docs/ja/feature_encoders.md b/docs/ja/feature_encoders.md new file mode 100644 index 00000000000..7f8922652db --- /dev/null +++ b/docs/ja/feature_encoders.md @@ -0,0 +1,81 @@ +# エンコーダ + + + +以下を `rules.mk` に追加することで基本的なエンコーダがサポートされます: + +```make +ENCODER_ENABLE = yes +``` + +さらに、以下を `config.h` に追加します: + +```c +#define ENCODERS_PAD_A { B12 } +#define ENCODERS_PAD_B { B13 } +``` + +各 PAD_A/B 変数は配列を定義するため、複数のエンコーダを定義することができます。例えば: + +```c +#define ENCODERS_PAD_A { encoder1a, encoder2a } +#define ENCODERS_PAD_B { encoder1b, encoder2b } +``` + +エンコーダの時計回りの方向が間違っている場合は、A と B のパッド定義を交換することができます。define を使って逆にすることもできます: + +```c +#define ENCODER_DIRECTION_FLIP +``` + +さらに、解像度を同じファイルで指定することができます (デフォルトかつお勧めは4): + +```c +#define ENCODER_RESOLUTION 4 +``` + +## 分割キーボード + +分割キーボードのそれぞれの側のエンコーダに異なるピン配列を使っている場合、右側のピン配列を以下のように定義することができます: + +```c +#define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a } +#define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b } +``` + +## コールバック + +コールバック関数を `.c` に記述することができます: + +```c +void encoder_update_kb(uint8_t index, bool clockwise) { + encoder_update_user(index, clockwise); +} +``` + +あるいは `keymap.c` に記述することもできます: + +```c +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + } +} +``` + +## ハードウェア + +エンコーダの A と B の線は MCU に直接配線し、C/common 線はグランドに配線する必要があります。 diff --git a/docs/ja/flashing.md b/docs/ja/flashing.md index 62baa907d1e..713d4fdf9e0 100644 --- a/docs/ja/flashing.md +++ b/docs/ja/flashing.md @@ -31,7 +31,6 @@ BOOTLOADER = atmel-dfu * [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (推奨の GUI) * QMK の [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` (推奨のコマンドライン) -* [Atmel の Flip](http://www.microchip.com/developmenttools/productdetails.aspx?partno=flip) (非推奨) 書き込み手順: diff --git a/docs/ja/getting_started_vagrant.md b/docs/ja/getting_started_vagrant.md index 0bc5c4b798b..66fb8951077 100644 --- a/docs/ja/getting_started_vagrant.md +++ b/docs/ja/getting_started_vagrant.md @@ -25,7 +25,6 @@ Vagrant 以外に、適切なプロバイダがインストールされ、その * [QMK Toolbox](https://github.com/qmk/qmk_toolbox) (推奨) * [Teensy ローダー](https://www.pjrc.com/teensy/loader.html) -* [Atmel FLIP](http://www.atmel.com/tools/flip.aspx) コマンドラインでプログラムしたい場合は、Vagranfile の ['modifyvm'] 行のコメントを解除して Linux への USB パススルーを有効にし、dfu-util/dfu-programmer のようなコマンドラインツールを使ってプログラムすることができます。あるいは Teensy CLI バージョンをインストールすることができます。 diff --git a/docs/keycodes.md b/docs/keycodes.md index 1a388f106b4..18fd8111840 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -175,11 +175,11 @@ See also: [Basic Keycodes](keycodes_basic.md) |`KC_EXSEL` | |ExSel | |`KC_LCTRL` |`KC_LCTL` |Left Control | |`KC_LSHIFT` |`KC_LSFT` |Left Shift | -|`KC_LALT` | |Left Alt | +|`KC_LALT` |`KC_LOPT` |Left Alt (Option) | |`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` |`KC_ALGR` |Right Alt (AltGr) | +|`KC_RALT` |`KC_ROPT`, `KC_ALGR` |Right Alt (Option/AltGr) | |`KC_RGUI` |`KC_RCMD`, `KC_RWIN` |Right GUI (Windows/Command/Meta key) | |`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down | |`KC_SYSTEM_SLEEP` |`KC_SLEP` |System Sleep | @@ -378,11 +378,11 @@ See also: [Modifier Keys](feature_advanced_keycodes.md#modifier-keys) |----------|-------------------------------|----------------------------------------------------| |`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` | |`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` | -|`LALT(kc)`|`A(kc)` |Hold Left Alt and press `kc` | +|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` | |`LGUI(kc)`|`G(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)`|`ALGR(kc)` |Hold Right Alt and press `kc` | +|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` | |`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI 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` | @@ -401,11 +401,11 @@ See also: [Mod-Tap](mod_tap.md) |`MT(mod, kc)`| |`mod` when held, `kc` when tapped | |`LCTL_T(kc)` |`CTL_T(kc)` |Left Control when held, `kc` when tapped | |`LSFT_T(kc)` |`SFT_T(kc)` |Left Shift when held, `kc` when tapped | -|`LALT_T(kc)` |`ALT_T(kc)` |Left Alt when held, `kc` when tapped | +|`LALT_T(kc)` |`LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` |Left Alt when held, `kc` when tapped | |`LGUI_T(kc)` |`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped | |`RCTL_T(kc)` | |Right Control when held, `kc` when tapped | |`RSFT_T(kc)` | |Right Shift when held, `kc` when tapped | -|`RALT_T(kc)` |`ALGR_T(kc)` |Right Alt when held, `kc` when tapped | +|`RALT_T(kc)` |`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt when held, `kc` when tapped | |`RGUI_T(kc)` |`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | |`SGUI_T(kc)` |`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 | diff --git a/docs/keycodes_basic.md b/docs/keycodes_basic.md index 75d58c1f1b5..09efc8c9c3d 100644 --- a/docs/keycodes_basic.md +++ b/docs/keycodes_basic.md @@ -112,11 +112,11 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07 |-----------|--------------------|------------------------------------| |`KC_LCTRL` |`KC_LCTL` |Left Control | |`KC_LSHIFT`|`KC_LSFT` |Left Shift | -|`KC_LALT` | |Left Alt | +|`KC_LALT` |`KC_LOPT` |Left Alt (Option) | |`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` |`KC_ALGR` |Right Alt (AltGr) | +|`KC_RALT` |`KC_ROPT`, `KC_ALGR`|Right Alt (Option/AltGr) | |`KC_RGUI` |`KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key)| ## International diff --git a/docs/mod_tap.md b/docs/mod_tap.md index 2b86701ca45..ced0beba99d 100644 --- a/docs/mod_tap.md +++ b/docs/mod_tap.md @@ -31,11 +31,11 @@ For convenience, QMK includes some Mod-Tap shortcuts to make common combinations |------------|-----------------------------------------------------------------|-------------------------------------------------------| |`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped | |`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped | -|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped | +|`LALT_T(kc)`|`LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` |Left Alt when held, `kc` when tapped | |`LGUI_T(kc)`|`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped | |`RCTL_T(kc)`| |Right Control when held, `kc` when tapped | |`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped | -|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped | +|`RALT_T(kc)`|`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt when held, `kc` when tapped | |`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | |`SGUI_T(kc)`|`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 | diff --git a/docs/newbs_getting_started.md b/docs/newbs_getting_started.md index 8ffbb9117a1..c8916b0e2fe 100644 --- a/docs/newbs_getting_started.md +++ b/docs/newbs_getting_started.md @@ -78,7 +78,7 @@ After installing QMK you can set it up with this command: In most situations you will want to answer Yes to all of the prompts. -?> If you already know [how to use GitHub](getting_started_github.md), we recommend that you create your own fork and use `qmk setup ` to clone your personal fork. If you don't know what that means you can safely ignore this message. +?> If you already know [how to use GitHub](getting_started_github.md), we recommend that you create your own fork and use `qmk setup /qmk_firmware` to clone your personal fork. If you don't know what that means you can safely ignore this message. ## 4. Test Your Build Environment diff --git a/docs/platformdev_chibios_earlyinit.md b/docs/platformdev_chibios_earlyinit.md new file mode 100644 index 00000000000..699c223771b --- /dev/null +++ b/docs/platformdev_chibios_earlyinit.md @@ -0,0 +1,53 @@ +# Arm/ChibiOS Early Initialization :id=chibios-early-init + +This page describes a part of QMK that is a somewhat advanced concept, and is only relevant to keyboard designers. + +QMK uses ChibiOS as the underlying layer to support a multitude of Arm-based devices. Each ChibiOS-supported keyboard has a low-level board definition which is responsible for initializing hardware peripherals such as the clocks, and GPIOs. + +Older QMK revisions required duplication of these board definitions inside your keyboard's directory in order to override such early initialization points; this is now abstracted into the following APIs, and allows usage of the board definitions supplied with ChibiOS itself. Check `/lib/chibios/os/hal/boards` for the list of official definitions. If your keyboard needs extra initialization at a very early stage, consider providing keyboard-level overrides of the following APIs: + +## `early_hardware_init_pre()` :id=early-hardware-init-pre + +The function `early_hardware_init_pre` is the earliest possible code that can be executed by a keyboard firmware. This is intended as a replacement for the ChibiOS board definition's `__early_init` function, and is the equivalent of executing at the start of the function. + +This is executed before RAM gets cleared, and before clocks or GPIOs are configured; any delays or preparation using GPIOs is not likely to work at this point. After executing this function, RAM on the MCU may be zero'ed. Assigning values to variables during execution of this function may be overwritten. + +As such, if you wish to override this API consider limiting use to writing to low-level registers. The default implementation of this function can be configured to jump to bootloader if a `RESET` key was pressed, by ensuring `#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE` is in the keyboard's `config.h` file. + +To implement your own version of this function, in your keyboard's source files: + +```c +void early_hardware_init_pre(void) { + // do things with registers +} +``` + +## `early_hardware_init_post()` :id=early-hardware-init-post + +The function `early_hardware_init_post` is the next earliest possible code that can be executed by a keyboard firmware. This is executed after RAM has been cleared, and clocks and GPIOs are configured. This is intended as a replacement for the ChibiOS board definition's `__early_init` function, and is the equivalent of executing at the end of the function. + +Much like `early_hardware_init_pre`, ChibiOS has not yet been initialized either, so the same restrictions on delays and timing apply. + +If you wish to override this API, consider limiting functionality to register writes, variable initialization, and GPIO toggling. The default implementation of this function is to do nothing. + +To implement your own version of this function, in your keyboard's source files: + +```c +void early_hardware_init_post(void) { + // toggle GPIO pins and write to variables +} +``` + +## `board_init()` :id=board-init + +The function `board_init` is executed directly after the ChibiOS initialization routines have completed. At this stage, all normal low-level functionality should be available for use (including timers and delays), with the restriction that USB is not yet connected. This is intended as a replacement for the ChibiOS board definition's `boardInit` function. + +The default implementation of this function is to do nothing. + +To implement your own version of this function, in your keyboard's source files: + +```c +void board_init(void) { + // initialize anything that requires ChibiOS +} +``` \ No newline at end of file diff --git a/docs/proton_c_conversion.md b/docs/proton_c_conversion.md index dc0a3f48491..98f1508a9e5 100644 --- a/docs/proton_c_conversion.md +++ b/docs/proton_c_conversion.md @@ -1,5 +1,9 @@ # Converting a board to use the Proton C +Since the Proton C is a drop-in replacement for a Pro Micro we've made it easy to use. This page documents a handy automated process for converting keyboards, as well as documenting the manual process if you'd like to make use of Proton C features that aren't available on Pro Micros. + +## Automatic Conversion + If a board currently supported in QMK uses a Pro Micro (or compatible board) and you want to use the Proton C, you can generate the firmware by appending `CONVERT_TO_PROTON_C=yes` (or `CTPC=yes`) to your make argument, like this: make 40percentclub/mf68:default CTPC=yes @@ -8,13 +12,15 @@ You can add the same argument to your keymap's `rules.mk`, which will accomplish This exposes the `CONVERT_TO_PROTON_C` flag that you can use in your code with `#ifdef`s, like this: - #ifdef CONVERT_TO_PROTON_C - // Proton C code - #else - // Pro Micro code - #endif +```c +#ifdef CONVERT_TO_PROTON_C + // Proton C code +#else + // Pro Micro code +#endif +``` -Before being able to compile, you may get some errors about `PORTB/DDRB`, etc not being defined, so you'll need to convert the keyboard's code to use the [GPIO Controls](internals_gpio_control.md) that will work for both ARM and AVR. This shouldn't affect the AVR builds at all. +If you get errors about `PORTB/DDRB`, etc not being defined, so you'll need to convert the keyboard's code to use the [GPIO Controls](internals_gpio_control.md) that will work for both ARM and AVR. This shouldn't affect the AVR builds at all. The Proton C only has one on-board LED (C13), and by default, the TXLED (D5) is mapped to it. If you want the RXLED (B0) mapped to it instead, add this like to your `config.h`: @@ -31,3 +37,54 @@ These are defaults based on what has been implemented for ARM boards. | [Backlight](feature_backlight.md) | Forces [task driven PWM](feature_backlight.md#software-pwm-driver) until ARM can provide automatic configuration | | USB Host (e.g. USB-USB converter) | Not supported (USB host code is AVR specific and is not currently supported on ARM) | | [Split keyboards](feature_split_keyboard.md) | Not supported yet | + +## Manual Conversion + +To use the Proton C natively, without having to specify `CTPC=yes`, you need to change the `MCU` line in `rules.mk`: + +``` +MCU = STM32F303 +``` + +Remove these variables if they exist: + +* `BOOTLOADER` +* `EXTRA_FLAGS` + +Finally convert all pin assignments in `config.h` to the stm32 equivalents. + +| Pro Micro Left | Proton C Left | | Proton C Right | Pro Micro Right | +|-----------|----------|-|----------|-----------| +| `D3` | `A9` | | 5v | RAW (5v) | +| `D2` | `A10` | | GND | GND | +| GND | GND | | FLASH | RESET | +| GND | GND | | 3.3v | VCC 1 | +| `D1` | `B7` | | `A2` | `F4` | +| `D0` | `B6` | | `A1` | `F5` | +| `D4` | `B5` | | `A0` | `F6` | +| `C6` | `B4` | | `B8` | `F7` | +| `D7` | `B3` | | `B13` | `B1` | +| `E6` | `B2` | | `B14` | `B3` | +| `B4` | `B1` | | `B15` | `B2` | +| `B5` | `B0` | | `B9` | `B6` | +| `B0` (RX LED) | `C13` 2 | | `C13` 2 | `D5` (TX LED) | + +You can also make use of several new pins on the extended portion of the Proton C: + +| Left | | Right | +|------|-|-------| +| `A4`3 | | `B10` | +| `A5`4 | | `B11` | +| `A6` | | `B12` | +| `A7` | | `A14`5 (SWCLK) | +| `A8` | | `A13`5 (SWDIO) | +| `A15` | | RESET6 | + +Notes: + +1. On a Pro Micro VCC can be 3.3v or 5v. +2. A Proton C only has one onboard LED, not two like a Pro Micro. The Pro Micro has an RX LED on `D5` and a TX LED on `B0`. +3. `A4` is shared with the speaker. +4. `A5` is shared with the speaker. +5. `A13` and `A14` are used for hardware debugging (SWD). You can also use them for GPIO, but should use them last. +6. Short RESET to 3.3v (pull high) to reboot the MCU. This does not enter bootloader mode like a Pro Micro, it only resets the MCU. diff --git a/docs/ref_functions.md b/docs/ref_functions.md index 708b0be28f4..57f701d790d 100644 --- a/docs/ref_functions.md +++ b/docs/ref_functions.md @@ -8,7 +8,7 @@ There are actually separate functions that you can use there, depending on what ### `update_tri_layer(x, y, z)` -The first is the `update_tri_layer(x, y, z)` function. This function check to see if layers `x` and `y` are both on. If they are both on, then it runs on layer `z`. Otherwise, if both `x` and `y` are not both on (either only one is, or neither is), then it runs off layer `z`. +The first is the `update_tri_layer(x, y, z)` function. This function check to see if layers `x` and `y` are both on. If they are both on, then it turns on layer `z`. Otherwise, if both `x` and `y` are not both on (either only one is, or neither is), then it turns off layer `z`. This function is useful if you want to create specific keys that have this functionality, but other layer keycodes won't do this. @@ -43,7 +43,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { ``` ### `update_tri_layer_state(state, x, y, z)` -The other function is `update_tri_layer_state(state, x, y, z)`. This function is meant to be called from they [`layer_state_set_*` functions](custom_quantum_functions.md#layer-change-code). This means that any time that you use a keycode to change the layer, this will be checked. So you could use `LT(layer, kc)` to change the layer and it will trigger the same layer check. +The other function is `update_tri_layer_state(state, x, y, z)`. This function is meant to be called from the [`layer_state_set_*` functions](custom_quantum_functions.md#layer-change-code). This means that any time that you use a keycode to change the layer, this will be checked. So you could use `LT(layer, kc)` to change the layer and it will trigger the same layer check. The caveat to this method is that you cannot access the `z` layer without having `x` and `y` layers on, since if you try to activate just layer `z`, it will run this code and turn off layer `z` before you could use it. diff --git a/docs/reference_glossary.md b/docs/reference_glossary.md index 08a22050cf8..4cdba024e46 100644 --- a/docs/reference_glossary.md +++ b/docs/reference_glossary.md @@ -46,9 +46,6 @@ An IDE that is popular with many C developers. ## Firmware The software that controls your MCU. -## FLIP -Software provided by Atmel for flashing AVR devices. We generally recommend [QMK Flasher](https://github.com/qmk/qmk_flasher) instead, but for some advanced use cases FLIP is required. - ## git Versioning software used at the command line diff --git a/docs/spi_driver.md b/docs/spi_driver.md index 360796d2a4e..e2b5b140b72 100644 --- a/docs/spi_driver.md +++ b/docs/spi_driver.md @@ -16,7 +16,7 @@ No special setup is required - just connect the `SS`, `SCK`, `MOSI` and `MISO` p You may use more than one slave select pin, not just the `SS` pin. This is useful when you have multiple devices connected and need to communicate with them individually. `SPI_SS_PIN` can be passed to `spi_start()` to refer to `SS`. -## ARM Configuration +## ChibiOS/ARM Configuration ARM support for this driver is not ready yet. Check back later! @@ -28,7 +28,7 @@ Initialize the SPI driver. This function must be called only once, before any of --- -### `void spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint8_t divisor)` +### `bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor)` Start an SPI transaction. @@ -48,12 +48,16 @@ Start an SPI transaction. |`2` |Leading edge falling|Sample on leading edge | |`3` |Leading edge falling|Sample on trailing edge| - - `uint8_t divisor` + - `uint16_t divisor` The SPI clock divisor, will be rounded up to the nearest power of two. This number can be calculated by dividing the MCU's clock speed by the desired SPI clock speed. For example, an MCU running at 8 MHz wanting to talk to an SPI device at 4 MHz would set the divisor to `2`. +#### Return Value + +`false` if the supplied parameters are invalid or the SPI peripheral is already in use, or `true`. + --- -### `spi_status_t spi_write(uint8_t data, uint16_t timeout)` +### `spi_status_t spi_write(uint8_t data)` Write a byte to the selected SPI device. @@ -61,8 +65,6 @@ Write a byte to the selected SPI device. - `uint8_t data` The byte to write. - - `uint16_t timeout` - The amount of time to wait, in milliseconds, before timing out. #### Return Value @@ -70,22 +72,17 @@ Write a byte to the selected SPI device. --- -### `spi_status_t spi_read(uint16_t timeout)` +### `spi_status_t spi_read(void)` Read a byte from the selected SPI device. -#### Arguments - - - `uint16_t timeout` - The amount of time to wait, in milliseconds, before timing out. - #### Return Value `SPI_STATUS_TIMEOUT` if the timeout period elapses, or the byte read from the device. --- -### `spi_status_t spi_transmit(const uint8_t *data, uint16_t length, uint16_t timeout)` +### `spi_status_t spi_transmit(const uint8_t *data, uint16_t length)` Send multiple bytes to the selected SPI device. @@ -95,8 +92,6 @@ Send multiple bytes to the selected SPI device. A pointer to the data to write from. - `uint16_t length` The number of bytes to write. Take care not to overrun the length of `data`. - - `uint16_t timeout` - The amount of time to wait, in milliseconds, before timing out. #### Return Value @@ -104,7 +99,7 @@ Send multiple bytes to the selected SPI device. --- -### `spi_status_t spi_receive(uint8_t *data, uint16_t length, uint16_t timeout)` +### `spi_status_t spi_receive(uint8_t *data, uint16_t length)` Receive multiple bytes from the selected SPI device. @@ -114,12 +109,10 @@ Receive multiple bytes from the selected SPI device. A pointer to the buffer to read into. - `uint16_t length` The number of bytes to read. Take care not to overrun the length of `data`. - - `uint16_t timeout` - The amount of time to wait, in milliseconds, before timing out. #### Return Value -`SPI_STATUS_TIMEOUT` if the timeout period elapses, `SPI_STATUS_SUCCESS` on success, or `SPI_STATUS_ERROR` otherwise. +`SPI_STATUS_TIMEOUT` if the internal transmission timeout period elapses, `SPI_STATUS_SUCCESS` on success, or `SPI_STATUS_ERROR` otherwise. --- diff --git a/docs/syllabus.md b/docs/syllabus.md new file mode 100644 index 00000000000..ec7f66ba780 --- /dev/null +++ b/docs/syllabus.md @@ -0,0 +1,70 @@ +# QMK Syllabus + +This page helps you build up your QMK knowledge by introducing the basics first and guiding you to understanding all the concepts you need to know to be proficient with QMK. + +# Beginning Topics + +If you read nothing else you should read the documents in this section. After reading the [Tutorial](newbs.md) you should be able to create a basic keymap, compile it, and flash it to your keyboard. The remaining documents will flesh out your knowledge of these basics. + +* **Learn How To Use QMK Tools** + * [Tutorial](newbs.md) + * [CLI](cli.md) + * [GIT](newbs_git_best_practices.md) +* **Learn About Keymaps** + * [Layers](feature_layers.md) + * [Keycodes](keycodes.md) + * The full list of keycodes you can use. Note that some may require knowledge found in the Intermediate or Advanced Topics. +* **Configuring IDEs** - Optional + * [Eclipse](other_eclipse.md) + * [VS Code](other_vscode.md) + +# Intermediate Topics + +These topics start to dig into some of the features that QMK supports. You don't have to read all of these documents, but some of the documents in the Advanced Topics section won't make sense if you skip over some of these. + +* **Learn How To Configure Features** + + * [Audio](feature_audio.md) + * Lighting + * [Backlight](feature_backlight.md) + * [LED Matrix](feature_led_matrix.md) + * [RGB Lighting](feature_rgblight.md) + * [RGB Matrix](feature_rgb_matrix.md) + * [Tap-Hold Configuration](tap_hold.md) +* **Learn More About Keymaps** + * [Keymaps](keymap.md) + * [Custom Functions and Keycodes](custom_quantum_functions.md) + * Macros + * [Dynamic Macros](feature_dynamic_macros.md) + * [Compiled Macros](feature_macros.md) + * [Tap Dance](feature_tap_dance.md) + * [Combos](feature_combo.md) + * [Userspace](feature_userspace.md) + +# Advanced Topics + +Everything below here requires a lot of foundational knowledge. Besides being able to create keymaps using advanced features you should be familiar with using both `config.h` and `rules.mk` to configure options for your keyboard. + +* **Maintaining Keyboards Within QMK** + * [Handwiring a Keyboard](hand_wire.md) + * [Keyboard Guidelines](hardware_keyboard_guidelines.md) + * [info.json Reference](reference_info_json.md) + * [Debounce API](feature_debounce_type.md) +* **Advanced Features** + * [Unicode](feature_unicode.md) + * [API](api_overview.md) + * [Bootmagic](feature_bootmagic.md) +* **Hardware** + * [How Keyboards Work](how_keyboards_work.md) + * [How A Keyboard Matrix Works](how_a_matrix_works.md) + * [Split Keyboards](feature_split_keyboard.md) + * [Stenography](feature_stenography.md) + * [Pointing Devices](feature_pointing_device.md) +* **Core Development** + * [Coding Conventions](coding_conventions_c.md) + * [Compatible Microcontrollers](compatible_microcontrollers.md) + * [Custom Matrix](custom_matrix.md) + * [Understanding QMK](understanding_qmk.md) +* **CLI Development** + * [Coding Conventions](coding_conventions_python.md) + * [CLI Development Overview](cli_development.md) diff --git a/docs/tap_hold.md b/docs/tap_hold.md index 1719c0bbe5f..a0b648694b9 100644 --- a/docs/tap_hold.md +++ b/docs/tap_hold.md @@ -12,7 +12,7 @@ As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new #define PERMISSIVE_HOLD ``` -This makes tap and hold keys (like Mod Tap) work better for fast typist, or for high `TAPPING_TERM` settings. +This makes tap and hold keys (like Mod Tap) work better for fast typists, or for high `TAPPING_TERM` settings. If you press a Mod Tap key, tap another key (press and release) and then release the Mod Tap key, all within the tapping term, it will output the "tapping" function for both keys. @@ -35,7 +35,7 @@ To enable this setting, add this to your `config.h`: #define IGNORE_MOD_TAP_INTERRUPT ``` -Similar to Permissive Hold, this alters how the firmware processes input for fast typist. If you press a Mod Tap key, press another key, release the Mod Tap key, and then release the normal key, it would normally output the "tapping" function for both keys. This may not be desirable for rolling combo keys. +Similar to Permissive Hold, this alters how the firmware processes inputs for fast typists. If you press a Mod Tap key, press another key, release the Mod Tap key, and then release the normal key, it would normally output the "tapping" function for both keys. This may not be desirable for rolling combo keys. Setting `Ignore Mod Tap Interrupt` requires holding both keys for the `TAPPING_TERM` to trigger the hold function (the mod). diff --git a/docs/zh-cn/faq_debug.md b/docs/zh-cn/faq_debug.md index 7eff7f2651c..71b575ea00b 100644 --- a/docs/zh-cn/faq_debug.md +++ b/docs/zh-cn/faq_debug.md @@ -139,10 +139,3 @@ https://geekhack.org/index.php?topic=14290.msg1884034#msg1884034 https://github.com/tmk/tmk_keyboard/issues/266 https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778 - - - -## FLIP 不工作 -### `AtLibUsbDfu.dll` 未找到 -从设备管理器中删除当前驱动程序并在设备管理器重新安装一个FLIP提供的程序。 -http://imgur.com/a/bnwzy diff --git a/docs/zh-cn/reference_glossary.md b/docs/zh-cn/reference_glossary.md index 7b9adcc2a7c..0e0521221cd 100644 --- a/docs/zh-cn/reference_glossary.md +++ b/docs/zh-cn/reference_glossary.md @@ -46,9 +46,6 @@ Français (法国)标准键盘布局。用键盘的前六个字母命名。 ## Firmware(固件) 用来控制单片机的软件。 -## FLIP -爱特梅尔(Atmel)提供的AVR器件刷写软件。我们一般推荐 [QMK刷写工具](https://github.com/qmk/qmk_flasher),但是对于一些高级用例,需要FLIP。 - ## git 命令行版本控制软件 diff --git a/drivers/avr/spi_master.c b/drivers/avr/spi_master.c index 3f405ddf5cd..32cc55c8361 100644 --- a/drivers/avr/spi_master.c +++ b/drivers/avr/spi_master.c @@ -34,6 +34,10 @@ # define SPI_MISO_PIN B4 #endif +#ifndef SPI_TIMEOUT +# define SPI_TIMEOUT 100 +#endif + static pin_t currentSlavePin = NO_PIN; static uint8_t currentSlaveConfig = 0; static bool currentSlave2X = false; @@ -47,65 +51,74 @@ void spi_init(void) { SPCR = (_BV(SPE) | _BV(MSTR)); } -void spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint8_t divisor) { - if (currentSlavePin == NO_PIN && slavePin != NO_PIN) { - if (lsbFirst) { - currentSlaveConfig |= _BV(DORD); - } +bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor) { + if (currentSlavePin != NO_PIN || slavePin == NO_PIN) { + return false; + } - switch (mode) { - case 1: - currentSlaveConfig |= _BV(CPHA); - break; - case 2: - currentSlaveConfig |= _BV(CPOL); - break; - case 3: - currentSlaveConfig |= (_BV(CPOL) | _BV(CPHA)); - break; - } + currentSlaveConfig = 0; - uint8_t roundedDivisor = 1; - while (roundedDivisor < divisor) { - roundedDivisor <<= 1; - } + if (lsbFirst) { + currentSlaveConfig |= _BV(DORD); + } - switch (roundedDivisor) { - case 16: - currentSlaveConfig |= _BV(SPR0); - break; - case 64: - currentSlaveConfig |= _BV(SPR1); - break; - case 128: - currentSlaveConfig |= (_BV(SPR1) | _BV(SPR0)); - break; - case 2: - currentSlave2X = true; - break; - case 8: - currentSlave2X = true; - currentSlaveConfig |= _BV(SPR0); - break; - case 32: - currentSlave2X = true; - currentSlaveConfig |= _BV(SPR1); - break; - } + switch (mode) { + case 1: + currentSlaveConfig |= _BV(CPHA); + break; + case 2: + currentSlaveConfig |= _BV(CPOL); + break; + case 3: + currentSlaveConfig |= (_BV(CPOL) | _BV(CPHA)); + break; + } - SPSR |= currentSlaveConfig; - currentSlavePin = slavePin; - setPinOutput(currentSlavePin); - writePinLow(currentSlavePin); + uint16_t roundedDivisor = 1; + while (roundedDivisor < divisor) { + roundedDivisor <<= 1; + } + + switch (roundedDivisor) { + case 16: + currentSlaveConfig |= _BV(SPR0); + break; + case 64: + currentSlaveConfig |= _BV(SPR1); + break; + case 128: + currentSlaveConfig |= (_BV(SPR1) | _BV(SPR0)); + break; + case 2: + currentSlave2X = true; + break; + case 8: + currentSlave2X = true; + currentSlaveConfig |= _BV(SPR0); + break; + case 32: + currentSlave2X = true; + currentSlaveConfig |= _BV(SPR1); + break; } + + SPCR |= currentSlaveConfig; + if (currentSlave2X) { + SPSR |= _BV(SPI2X); + } + currentSlavePin = slavePin; + setPinOutput(currentSlavePin); + writePinLow(currentSlavePin); + + return true; } -spi_status_t spi_write(uint8_t data, uint16_t timeout) { +spi_status_t spi_write(uint8_t data) { SPDR = data; uint16_t timeout_timer = timer_read(); while (!(SPSR & _BV(SPIF))) { - if ((timeout != SPI_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) { + if ((timer_read() - timeout_timer) >= SPI_TIMEOUT) { return SPI_STATUS_TIMEOUT; } } @@ -113,12 +126,12 @@ spi_status_t spi_write(uint8_t data, uint16_t timeout) { return SPDR; } -spi_status_t spi_read(uint16_t timeout) { +spi_status_t spi_read() { SPDR = 0x00; // Dummy uint16_t timeout_timer = timer_read(); while (!(SPSR & _BV(SPIF))) { - if ((timeout != SPI_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) { + if ((timer_read() - timeout_timer) >= SPI_TIMEOUT) { return SPI_STATUS_TIMEOUT; } } @@ -126,21 +139,21 @@ spi_status_t spi_read(uint16_t timeout) { return SPDR; } -spi_status_t spi_transmit(const uint8_t *data, uint16_t length, uint16_t timeout) { +spi_status_t spi_transmit(const uint8_t *data, uint16_t length) { spi_status_t status = SPI_STATUS_ERROR; for (uint16_t i = 0; i < length; i++) { - status = spi_write(data[i], timeout); + status = spi_write(data[i]); } return status; } -spi_status_t spi_receive(uint8_t *data, uint16_t length, uint16_t timeout) { +spi_status_t spi_receive(uint8_t *data, uint16_t length) { spi_status_t status = SPI_STATUS_ERROR; for (uint16_t i = 0; i < length; i++) { - status = spi_read(timeout); + status = spi_read(); if (status > 0) { data[i] = status; @@ -155,9 +168,9 @@ void spi_stop(void) { setPinOutput(currentSlavePin); writePinHigh(currentSlavePin); currentSlavePin = NO_PIN; + SPSR &= ~(_BV(SPI2X)); SPCR &= ~(currentSlaveConfig); currentSlaveConfig = 0; - SPSR = 0; currentSlave2X = false; } } diff --git a/drivers/avr/spi_master.h b/drivers/avr/spi_master.h index 0bab2dc24eb..b69c1cbd66e 100644 --- a/drivers/avr/spi_master.h +++ b/drivers/avr/spi_master.h @@ -41,15 +41,15 @@ extern "C" { #endif void spi_init(void); -void spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint8_t divisor); +bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor); -spi_status_t spi_write(uint8_t data, uint16_t timeout); +spi_status_t spi_write(uint8_t data); -spi_status_t spi_read(uint16_t timeout); +spi_status_t spi_read(void); -spi_status_t spi_transmit(const uint8_t *data, uint16_t length, uint16_t timeout); +spi_status_t spi_transmit(const uint8_t *data, uint16_t length); -spi_status_t spi_receive(uint8_t *data, uint16_t length, uint16_t timeout); +spi_status_t spi_receive(uint8_t *data, uint16_t length); void spi_stop(void); #ifdef __cplusplus diff --git a/keyboards/7skb/keymaps/salicylic/keymap.c b/keyboards/7skb/keymaps/salicylic/keymap.c index 522d4c13824..bf3433b17ce 100644 --- a/keyboards/7skb/keymaps/salicylic/keymap.c +++ b/keyboards/7skb/keymaps/salicylic/keymap.c @@ -147,7 +147,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { rgblight_sethsv_at( 0, 0, 0, 0); break; } - rgblight_set_effect_range( 1, 4); + rgblight_set_effect_range( 1, 5); #endif return state; } diff --git a/keyboards/7skb/rev1/config.h b/keyboards/7skb/rev1/config.h index b1096c4d69b..808ec282ea5 100644 --- a/keyboards/7skb/rev1/config.h +++ b/keyboards/7skb/rev1/config.h @@ -20,7 +20,7 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x3060 +#define PRODUCT_ID 0x36E1 #define DEVICE_VER 0x0007 #define MANUFACTURER Salicylic_Acid #define PRODUCT 7skb @@ -52,9 +52,9 @@ along with this program. If not, see . #define RGB_DI_PIN D3 #ifndef RGBLED_NUM - #define RGBLED_NUM 10 + #define RGBLED_NUM 12 #define RGBLIGHT_SPLIT - #define RGBLED_SPLIT { 5, 5 } + #define RGBLED_SPLIT { 6, 6 } #endif #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/abacus/config.h b/keyboards/abacus/config.h index 7fa98985392..bc4120544fd 100644 --- a/keyboards/abacus/config.h +++ b/keyboards/abacus/config.h @@ -105,10 +105,9 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + /* * MIDI options */ diff --git a/keyboards/absinthe/absinthe.c b/keyboards/absinthe/absinthe.c new file mode 100644 index 00000000000..502139ed0cd --- /dev/null +++ b/keyboards/absinthe/absinthe.c @@ -0,0 +1,17 @@ +/* Copyright 2020 cfbender + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "absinthe.h" diff --git a/keyboards/absinthe/absinthe.h b/keyboards/absinthe/absinthe.h new file mode 100644 index 00000000000..890aff643e9 --- /dev/null +++ b/keyboards/absinthe/absinthe.h @@ -0,0 +1,68 @@ +/* Copyright 2020 cfbender + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define XXX KC_NO + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_default( \ + K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K07, K17, K08, K18, \ + K20, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K27, K37, K28, K38, \ + K40, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K46, K56, \ + K60, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K66, K67, K68, \ + K80, K81, K82, K83, K76, K86, K87, K77, K88, K78 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08 },\ + { K10, K11, K12, K13, K14, K15, K16, K17, K18 },\ + { K20, K21, K22, K23, K24, K25, K26, K27, K28 },\ + { XXX, K31, K32, K33, K34, K35, K36, K37, K38 },\ + { K40, K41, K42, K43, K44, K45, K46, XXX, XXX },\ + { XXX, K51, K52, K53, K54, K55, K56, XXX, XXX },\ + { K60, K61, K62, K63, K64, K65, K66, K67, K68 },\ + { XXX, K71, K72, K73, K74, K75, K76, K77, K78 },\ + { K80, K81, K82, K83, XXX, XXX, K86, K87, K88 } \ +} + +#define LAYOUT_ansi( \ + K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K17, K08, K18, \ + K20, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K27, K37, K28, K38, \ + K40, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K46, K56, \ + K60, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K66, K68, \ + K80, K81, K82, K83, K85, K76, K86, K87, K77, K88, K78 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, XXX, K08 },\ + { K10, K11, K12, K13, K14, K15, K16, K17, K18 },\ + { K20, K21, K22, K23, K24, K25, K26, K27, K28 },\ + { XXX, K31, K32, K33, K34, K35, K36, K37, K38 },\ + { K40, K41, K42, K43, K44, K45, K46, XXX, XXX },\ + { XXX, K51, K52, K53, K54, K55, K56, XXX, XXX },\ + { K60, K61, K62, K63, K64, K65, K66, XXX, K68 },\ + { XXX, K71, K72, K73, K74, K75, K76, K77, K78 },\ + { K80, K81, K82, K83, XXX, K85, K86, K87, K88 } \ +} + diff --git a/keyboards/absinthe/config.h b/keyboards/absinthe/config.h new file mode 100644 index 00000000000..939b3d06546 --- /dev/null +++ b/keyboards/absinthe/config.h @@ -0,0 +1,102 @@ +/* +Copyright 2020 cfbender + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xB00B +#define PRODUCT_ID 0xFEED +#define DEVICE_VER 0x0001 +#define MANUFACTURER cfbender +#define PRODUCT absinthe +#define DESCRIPTION An F-row-less TKL + +/* key matrix size */ +#define MATRIX_ROWS 9 +#define MATRIX_COLS 9 + +/* + * 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 { D2, D1, B6, D4, C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, D3, D0 } +#define UNUSED_PINS + +#define ENCODERS_PAD_A { D5 } +#define ENCODERS_PAD_B { B7 } + +#define ENCODER_DIRECTION_FLIP + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN B0 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 32 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ + #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 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 diff --git a/keyboards/absinthe/info.json b/keyboards/absinthe/info.json new file mode 100644 index 00000000000..29066410646 --- /dev/null +++ b/keyboards/absinthe/info.json @@ -0,0 +1,150 @@ +{ + "keyboard_name": "absinthe", + "url": "https://github.com/cfbender/keyboards/tree/master/absinthe", + "maintainer": "cfbender", + "width": 18.25, + "height": 5, + "layouts": { + "LAYOUT_default": { + "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":"Insert", "x":15.25, "y":0}, + {"label":"Home", "x":16.25, "y":0}, + {"label":"PgUp", "x":17.25, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, + {"label":"Delete", "x":15.25, "y":1}, + {"label":"End", "x":16.25, "y":1}, + {"label":"PgDn", "x":17.25, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"\"", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"MO(1)", "x":14, "y":3}, + {"label":"\u2191", "x":16.25, "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":7}, + {"label":"Alt", "x":11, "y":4, "w":1.5}, + {"label":"Win", "x":12.5, "y":4}, + {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}, + {"label":"\u2190", "x":15.25, "y":4}, + {"label":"\u2193", "x":16.25, "y":4}, {"label":"\u2192", "x":17.25, "y":4}] + }, + "LAYOUT_ansi": { + "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", "x":13, "y":0, "w":2}, + {"label":"Insert", "x":15.25, "y":0}, + {"label":"Home", "x":16.25, "y":0}, + {"label":"PgUp", "x":17.25, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"Delete", "x":15.25, "y":1}, + {"label":"End", "x":16.25, "y":1}, + {"label":"PgDn", "x":17.25, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"\"", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":2.75}, + {"label":"\u2191", "x":16.25, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Win", "x":11.25, "y":4, "w":1.25}, + {"label":"Menu", "x":12.5, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}, + {"label":"\u2190", "x":15.25, "y":4}, + {"label":"\u2193", "x":16.25, "y":4}, + {"label":"\u2192", "x":17.25, "y":4}] + } + } +} diff --git a/keyboards/absinthe/keymaps/ansi/config.h b/keyboards/absinthe/keymaps/ansi/config.h new file mode 100644 index 00000000000..102e290a419 --- /dev/null +++ b/keyboards/absinthe/keymaps/ansi/config.h @@ -0,0 +1,19 @@ +/* Copyright 2020 cfbender + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/absinthe/keymaps/ansi/keymap.c b/keyboards/absinthe/keymaps/ansi/keymap.c new file mode 100644 index 00000000000..2177f18146a --- /dev/null +++ b/keyboards/absinthe/keymaps/ansi/keymap.c @@ -0,0 +1,32 @@ +/* Copyright 2020 cfbender + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + + [1] = LAYOUT_ansi( + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, + 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, RGB_TOG, RGB_RMOD, RGB_MOD, RGB_HUD,RGB_HUI,RGB_SAD,RGB_SAI,RGB_VAD,RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS) +}; diff --git a/keyboards/absinthe/keymaps/ansi/readme.md b/keyboards/absinthe/keymaps/ansi/readme.md new file mode 100644 index 00000000000..e88d0cf9dd8 --- /dev/null +++ b/keyboards/absinthe/keymaps/ansi/readme.md @@ -0,0 +1,3 @@ +# The all ANSI keymap for absinthe + +![default absinthe keymap](https://i.imgur.com/td0vfz0.png) diff --git a/keyboards/absinthe/keymaps/default/config.h b/keyboards/absinthe/keymaps/default/config.h new file mode 100644 index 00000000000..102e290a419 --- /dev/null +++ b/keyboards/absinthe/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2020 cfbender + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/absinthe/keymaps/default/keymap.c b/keyboards/absinthe/keymaps/default/keymap.c new file mode 100644 index 00000000000..d6c4549c472 --- /dev/null +++ b/keyboards/absinthe/keymaps/default/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2020 cfbender + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_default( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_DEL, KC_END, KC_PGDN, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + + [1] = LAYOUT_default( + 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_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, + 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, RGB_TOG, RGB_RMOD, RGB_MOD, RGB_HUD,RGB_HUI,RGB_SAD,RGB_SAI,RGB_VAD,RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} diff --git a/keyboards/absinthe/keymaps/default/readme.md b/keyboards/absinthe/keymaps/default/readme.md new file mode 100644 index 00000000000..f9ec78d7b49 --- /dev/null +++ b/keyboards/absinthe/keymaps/default/readme.md @@ -0,0 +1,6 @@ +# The default keymap for absinthe + + +Tsangan HHKB style with split backspace and split right shift. + +![default absinthe keymap](https://i.imgur.com/9Xxx6Rd.png) diff --git a/keyboards/absinthe/readme.md b/keyboards/absinthe/readme.md new file mode 100644 index 00000000000..f99d3649f2c --- /dev/null +++ b/keyboards/absinthe/readme.md @@ -0,0 +1,15 @@ +# absinthe + +![absinthe](https://i.imgur.com/fK215Tx.jpg) + +A budget-friendly F-rowless TKL with a rotary encoder + +* Keyboard Maintainer: [cfbender](https://cfbender.design) +* Hardware Supported: Absinthe PCB, Elite-C (for rotary encoder support - alternatively you can use a Pro Micro without an encoder) +* Hardware Availability: [GitHub](https://github.com/cfbender/keyboards/tree/master/absinthe) + +Make example for this keyboard (after setting up your build environment): + + make absinthe:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/absinthe/rules.mk b/keyboards/absinthe/rules.mk new file mode 100644 index 00000000000..f0b8037c912 --- /dev/null +++ b/keyboards/absinthe/rules.mk @@ -0,0 +1,45 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Otherwise, delete this section +# 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 = full # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +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 +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +ENCODER_ENABLE = yes +RGBLIGHT_ENABLE = yes +# EXTRAFLAGS += -flto diff --git a/keyboards/ai03/orbit_x/config.h b/keyboards/ai03/orbit_x/config.h index fb2ebe44f62..c21e3e8f65e 100644 --- a/keyboards/ai03/orbit_x/config.h +++ b/keyboards/ai03/orbit_x/config.h @@ -165,10 +165,8 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 diff --git a/keyboards/allison/config.h b/keyboards/allison/config.h index 8a310d0a205..e2e032442d7 100644 --- a/keyboards/allison/config.h +++ b/keyboards/allison/config.h @@ -192,10 +192,9 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + /* * MIDI options */ diff --git a/keyboards/allison_numpad/config.h b/keyboards/allison_numpad/config.h index c8b8189071b..0e04a8722a1 100644 --- a/keyboards/allison_numpad/config.h +++ b/keyboards/allison_numpad/config.h @@ -192,10 +192,9 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + /* * MIDI options */ diff --git a/keyboards/aplx6/README.md b/keyboards/aplx6/README.md new file mode 100644 index 00000000000..55e73ea2da5 --- /dev/null +++ b/keyboards/aplx6/README.md @@ -0,0 +1,41 @@ +# Aplx6 + +![Front](https://i.imgur.com/flhSvAG.png) +![Back](https://i.imgur.com/PXqNmUh.png) + +A stylish (2x3) 6-key MediaPad for your music and browser shortcuts. Designed to be assembled as a sandwich with a blank PCB, using M2.5 screws and spacers, your choice of MX- or Alps-compatible switches, and 1N4148 diodes. + + +## RGB Underglow (WS2812) + +Just wire them to any of the unused ProMicro pins. Don't forget to edit-uncomment the `config.h` and the `rules.mk` for RGB underglow support, or even add your own functions and modes. Used pins can be found in `config.h` or in the [KiCad Schematic](https://github.com/Aplyard/Aplx6/blob/master/kiCad/xd6.sch). All ProMicro pins can be found [here](https://golem.hu/article/pro-micro-pinout/) along with the +2 pins mod. + +* Keyboard Maintainer: [Aplyard](https://github.com/Aplyard) +* Hardware Supported: Aplx6 PCB, Pro Micro (ATmega32U4) +* Hardware Availability: [GitHub](https://github.com/Aplyard/Aplx6) + +Make example for this keyboard (after setting up your build environment): + + make aplx6:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +--- +****Designed in**:** +[KiCad](https://github.com/KiCad) + +**Components Footprints & Libraries :** +[keebs.pretty](https://github.com/egladman/keebs.pretty) +[keyboard_parts.pretty +](https://github.com/tmk/keyboard_parts.pretty) +[ProMicro KiCad](https://github.com/Biacco42/ProMicroKiCad) + +**Usefull Links:** +[Qmk Online Configurator](https://config.qmk.fm/#) + +**Alternatives of qmk that worked for me:** +[Keyboard Layout Editor](http://www.keyboard-layout-editor.com/#/) +[Keyboard Plate & Case Builder](http://builder.swillkb.com/) +[Firmware Builder](https://kbfirmware.com/) + +--- diff --git a/keyboards/aplx6/aplx6.c b/keyboards/aplx6/aplx6.c new file mode 100644 index 00000000000..3a294c19983 --- /dev/null +++ b/keyboards/aplx6/aplx6.c @@ -0,0 +1,19 @@ +/* +Copyright 2020 April Aplyard + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 "aplx6.h" + diff --git a/keyboards/aplx6/aplx6.h b/keyboards/aplx6/aplx6.h new file mode 100644 index 00000000000..6990d388e73 --- /dev/null +++ b/keyboards/aplx6/aplx6.h @@ -0,0 +1,12 @@ +#pragma once +#include "quantum.h" + +#define LAYOUT( \ + k000, k001, k002, \ + k100, k101, k102 \ +) \ +{ \ + { k000, k001, k002 }, \ + { k100, k101, k102 } \ +} + diff --git a/keyboards/aplx6/config.h b/keyboards/aplx6/config.h new file mode 100644 index 00000000000..8db06d93cfb --- /dev/null +++ b/keyboards/aplx6/config.h @@ -0,0 +1,49 @@ +/* +Copyright 2020 April Aplyard + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xE0E0 +#define PRODUCT_ID 0x0030 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Aplyard +#define PRODUCT Aplx6 +#define DESCRIPTION Aplx6 MediaPad + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 3 + +/* pin-out */ +#define MATRIX_ROW_PINS { E6, B3 } +#define MATRIX_COL_PINS { F7, B6, F4 } +#define UNUSED_PINS + + +/* ws2812 RGB LED */ +//#define RGB_DI_PIN X + +//#define RGBLIGHT_ANIMATIONS +//#define RGBLED_NUM X // Number of LEDs + + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + diff --git a/keyboards/aplx6/keymaps/default/keymap.c b/keyboards/aplx6/keymaps/default/keymap.c new file mode 100644 index 00000000000..4c4f612a381 --- /dev/null +++ b/keyboards/aplx6/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +#include QMK_KEYBOARD_H + +#define _MAIN 0 +#define _FN 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap __MAIN: Default Layer + * ,--------------------------------. + * | .------. |-----|-----|-----| | + * | | | |Play |VolUp| Fn | | + * | | Pro | |-----|-----|-----| | + * | | Micro| --------------------| + * | | | |-----|-----|-----| | + * | '------' |Prev |VolD |Next | | + * | |||||| |-----|-----|-----| | + * '--------------------------------' + */ + [_MAIN] = LAYOUT( + KC_MPLY, KC_VOLU, MO(1), + KC_MPRV, KC_VOLD, KC_MNXT + ), + /* Keymap __FN: Second Layer + * ,--------------------------------. + * | .------. |-----|-----|-----| | + * | | | |Calc |PgUp |TRANS| | + * | | Pro | |-----|-----|-----| | + * | | Micro| --------------------| + * | | | |-----|-----|-----| | + * | '------' |MyPC | PgD |RESET| | + * | |||||| |-----|-----|-----| | + * '--------------------------------' + */ + + [_FN] = LAYOUT( + KC_CALC, KC_PGUP, _______, + KC_MYCM, KC_PGDN, RESET + ) +}; diff --git a/keyboards/aplx6/rules.mk b/keyboards/aplx6/rules.mk new file mode 100644 index 00000000000..d2d1078d322 --- /dev/null +++ b/keyboards/aplx6/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +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 +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +UNICODE_ENABLE = yes # Unicode diff --git a/keyboards/atreus/keymaps/khitsule/keymap.c b/keyboards/atreus/keymaps/khitsule/keymap.c index 04cd4d59168..e6a5366916e 100644 --- a/keyboards/atreus/keymaps/khitsule/keymap.c +++ b/keyboards/atreus/keymaps/khitsule/keymap.c @@ -2,20 +2,19 @@ #include QMK_KEYBOARD_H -#define ALPH 0 -#define LOWR 1 -#define RAIS 2 - -// enum layers { -// ALPH, //alpha qwerty -// LOWR, //layer 1: nav and functions -// RAIS //layer 2: numpad and symbols -// }; +enum layers { + ALPH, + GAME, + LOWR, + RAIS, + ADJS +}; // define any macros here to keep keymap clean and readable #define KM_DLEFT LGUI(LCTL(KC_LEFT)) #define KM_DRIGHT LGUI(LCTL(KC_RIGHT)) +#define TSKMGR LCTL(LSFT(KC_ESC)) #define tap_mod_macro(record, mod, macro) ( ((record)->event.pressed) ? \ ( ((record)->tap.count <= 0 || (record)->tap.interrupted) ? MACRO(D(mod), END) : MACRO_NONE ) : \ @@ -28,20 +27,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, - KC_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 + 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, TO(GAME), KC_QUOT, KC_MINUS + ), + [GAME] = 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_ENT, KC_LALT, KC_TAB, KC_LCTL, KC_LSFT, KC_DEL, KC_LGUI, TO(ALPH), 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 + KM_DLEFT, KM_DRIGHT, LALT(KC_TAB), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(ADJS), 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 + 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, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(ADJS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_EQL ), + [ADJS] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TSKMGR, KC_TRNS, 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, + RESET, 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/bat43/config.h b/keyboards/bat43/config.h index 57d65233c77..eb1c1a05cf0 100644 --- a/keyboards/bat43/config.h +++ b/keyboards/bat43/config.h @@ -192,10 +192,9 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + /* * MIDI options */ diff --git a/keyboards/bat43/info.json b/keyboards/bat43/info.json new file mode 100644 index 00000000000..dea07d29877 --- /dev/null +++ b/keyboards/bat43/info.json @@ -0,0 +1,71 @@ +{ + "keyboard_name": "bat43", + "url": "", + "maintainer": "yfuku", + "width": 15, + "height": 5.1, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"k00", "x":0, "y":1.43}, + {"label":"k01", "x":1, "y":1.11}, + {"label":"k02", "x":2, "y":0.38}, + {"label":"k03", "x":3, "y":0}, + {"label":"k04", "x":4, "y":0.05}, + {"label":"k05", "x":5, "y":0.16}, + + {"label":"k40", "x":9, "y":0.16}, + {"label":"k41", "x":10, "y":0.05}, + {"label":"k42", "x":11, "y":0}, + {"label":"k43", "x":12, "y":0.38}, + {"label":"k44", "x":13, "y":1.11}, + {"label":"k45", "x":14, "y":1.43}, + + {"label":"k10", "x":0, "y":2.43}, + {"label":"k11", "x":1, "y":2.11}, + {"label":"k12", "x":2, "y":1.38}, + {"label":"k13", "x":3, "y":1}, + {"label":"k14", "x":4, "y":1.05}, + {"label":"k15", "x":5, "y":1.16}, + + {"label":"k30", "x":7, "y":1.16}, + + {"label":"k50", "x":9, "y":1.16}, + {"label":"k51", "x":10, "y":1.05}, + {"label":"k52", "x":11, "y":1}, + {"label":"k53", "x":12, "y":1.38}, + {"label":"k54", "x":13, "y":2.11}, + {"label":"k55", "x":14, "y":2.43}, + + {"label":"k20", "x":0, "y":3.43}, + {"label":"k21", "x":1, "y":3.11}, + {"label":"k22", "x":2, "y":2.38}, + {"label":"k23", "x":3, "y":2}, + {"label":"k24", "x":4, "y":2.05}, + {"label":"k25", "x":5, "y":2.16}, + + {"label":"k60", "x":9, "y":2.16}, + {"label":"k61", "x":10, "y":2.05}, + {"label":"k62", "x":11, "y":2}, + {"label":"k63", "x":12, "y":2.38}, + {"label":"k64", "x":13, "y":3.11}, + {"label":"k65", "x":14, "y":3.43}, + + {"label":"k33", "x":4, "y":3.3}, + {"label":"k34", "x":5, "y":3.3}, + {"label":"k35", "x":6, "y":3.3}, + + {"label":"k70", "x":8, "y":3.3}, + {"label":"k71", "x":9, "y":3.3}, + {"label":"k72", "x":10, "y":3.3}, + + {"label":"k74", "x":5.1, "y":4.3, "w":0.8, "h":0.8}, + {"label":"k75", "x":6.1, "y":4.3, "w":0.8, "h":0.8}, + + {"label":"k73", "x":8.1, "y":4.3, "w":0.8, "h":0.8}, + {"label":"k31", "x":9.1, "y":4.3, "w":0.8, "h":0.8}, + {"label":"k32", "x":10.1, "y":4.3, "w":0.8, "h":0.8} + ] + } + } +} diff --git a/keyboards/botanicalkeyboards/fm2u/config.h b/keyboards/botanicalkeyboards/fm2u/config.h new file mode 100644 index 00000000000..944b7b3b2a7 --- /dev/null +++ b/keyboards/botanicalkeyboards/fm2u/config.h @@ -0,0 +1,55 @@ +/* +Copyright 2020 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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6969 +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER botanicalkeyboards +#define PRODUCT fm2u +#define DESCRIPTION A 1 key macropad + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 1 + +/* Keyboard Matrix Assignments */ +#define DIRECT_PINS { \ + { C4 } \ +} + +/* + * 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*/ +#define DIODE_DIRECTION COL2ROW + + + diff --git a/keyboards/botanicalkeyboards/fm2u/fm2u.c b/keyboards/botanicalkeyboards/fm2u/fm2u.c new file mode 100644 index 00000000000..9729e5eec0f --- /dev/null +++ b/keyboards/botanicalkeyboards/fm2u/fm2u.c @@ -0,0 +1,17 @@ +/* Copyright 2020 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 "fm2u.h" diff --git a/keyboards/botanicalkeyboards/fm2u/fm2u.h b/keyboards/botanicalkeyboards/fm2u/fm2u.h new file mode 100644 index 00000000000..eb5564afc35 --- /dev/null +++ b/keyboards/botanicalkeyboards/fm2u/fm2u.h @@ -0,0 +1,46 @@ +/* Copyright 2020 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 . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_100u( \ + k00 \ +) \ +{ \ + { k00 } \ +} + +#define LAYOUT_125u LAYOUT_100u +#define LAYOUT_150u LAYOUT_100u +#define LAYOUT_175u LAYOUT_100u +#define LAYOUT_200u LAYOUT_100u +#define LAYOUT_225u LAYOUT_100u +#define LAYOUT_275u LAYOUT_100u +#define LAYOUT_300u LAYOUT_100u +#define LAYOUT_600u LAYOUT_100u +#define LAYOUT_625u LAYOUT_100u +#define LAYOUT_700u LAYOUT_100u +#define LAYOUT_iso LAYOUT_100u diff --git a/keyboards/botanicalkeyboards/fm2u/info.json b/keyboards/botanicalkeyboards/fm2u/info.json new file mode 100644 index 00000000000..6831dad9445 --- /dev/null +++ b/keyboards/botanicalkeyboards/fm2u/info.json @@ -0,0 +1,56 @@ +{ + "keyboard_name": "fm2u", + "url": "", + "maintainer": "qmk", + "width": 1, + "height": 1, + "layouts": { + "LAYOUT_100u": { + "layout": [{"x":0, "y":0}] + }, + + "LAYOUT_125u": { + "layout": [{"x":0, "y":0, "w":1.25}] + }, + + "LAYOUT_150u": { + "layout": [{"x":0, "y":0, "w":1.50}] + }, + + "LAYOUT_175u": { + "layout": [{"x":0, "y":0, "w":1.75}] + }, + + "LAYOUT_200u": { + "layout": [{"x":0, "y":0, "w":2.00}] + }, + + "LAYOUT_225u": { + "layout": [{"x":0, "y":0, "w":2.25}] + }, + + "LAYOUT_275u": { + "layout": [{"x":0, "y":0, "w":2.75}] + }, + + "LAYOUT_300u": { + "layout": [{"x":0, "y":0, "w":3.00}] + }, + + "LAYOUT_600u": { + "layout": [{"x":0, "y":0, "w":6.00}] + }, + + "LAYOUT_625u": { + "layout": [{"x":0, "y":0, "w":6.25}] + }, + + "LAYOUT_700u": { + "layout": [{"x":0, "y":0, "w":7.00}] + }, + + "LAYOUT_iso": { + "layout": [{"x":0.25, "y":0, "w":1.25, "h":2}] + } + } +} diff --git a/keyboards/botanicalkeyboards/fm2u/keymaps/default/keymap.c b/keyboards/botanicalkeyboards/fm2u/keymaps/default/keymap.c new file mode 100644 index 00000000000..afefa35334b --- /dev/null +++ b/keyboards/botanicalkeyboards/fm2u/keymaps/default/keymap.c @@ -0,0 +1,25 @@ +/* Copyright 2020 mechmerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [0] = LAYOUT_100u( + KC_B + ) +}; + diff --git a/keyboards/botanicalkeyboards/fm2u/keymaps/via/keymap.c b/keyboards/botanicalkeyboards/fm2u/keymaps/via/keymap.c new file mode 100644 index 00000000000..01b00f18781 --- /dev/null +++ b/keyboards/botanicalkeyboards/fm2u/keymaps/via/keymap.c @@ -0,0 +1,37 @@ +/* Copyright 2020 mechmerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [0] = LAYOUT_100u( + KC_B + ), + + [1] = LAYOUT_100u( + KC_TRNS + ), + + [2] = LAYOUT_100u( + KC_TRNS + ), + + [3] = LAYOUT_100u( + KC_TRNS + ), +}; + diff --git a/keyboards/botanicalkeyboards/fm2u/keymaps/via/rules.mk b/keyboards/botanicalkeyboards/fm2u/keymaps/via/rules.mk new file mode 100644 index 00000000000..7d47e6b7262 --- /dev/null +++ b/keyboards/botanicalkeyboards/fm2u/keymaps/via/rules.mk @@ -0,0 +1,4 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes + +EXTRAKEY_ENABLE = no diff --git a/keyboards/botanicalkeyboards/fm2u/readme.md b/keyboards/botanicalkeyboards/fm2u/readme.md new file mode 100644 index 00000000000..511c09214f5 --- /dev/null +++ b/keyboards/botanicalkeyboards/fm2u/readme.md @@ -0,0 +1,13 @@ +# fm2u + +A 1 key macropad with USB C and atmega32u2 microcontroller. + +* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +* Hardware Supported: fm2u PCB +* Hardware Availability: TBD + +Make example for this keyboard (after setting up your build environment): + + make botanicalkeyboards/fm2u:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/botanicalkeyboards/fm2u/rules.mk b/keyboards/botanicalkeyboards/fm2u/rules.mk new file mode 100644 index 00000000000..4f7f9b28642 --- /dev/null +++ b/keyboards/botanicalkeyboards/fm2u/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u2 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +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 +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +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 +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/cannonkeys/atlas/atlas.c b/keyboards/cannonkeys/atlas/atlas.c new file mode 100644 index 00000000000..8b0b236fe9e --- /dev/null +++ b/keyboards/cannonkeys/atlas/atlas.c @@ -0,0 +1 @@ +#include "atlas.h" diff --git a/keyboards/cannonkeys/atlas/atlas.h b/keyboards/cannonkeys/atlas/atlas.h new file mode 100644 index 00000000000..b2f64dab73c --- /dev/null +++ b/keyboards/cannonkeys/atlas/atlas.h @@ -0,0 +1,48 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_5x12_1x2uC( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \ + k40, k41, k42, k43, k44, k45 , k47, k48, k49, k4a, k4b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b }, \ + { k40, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4a, k4b }, \ +} + +#define LAYOUT_ortho_5x12( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b }, \ +} + +#define LAYOUT_ortho_5x12_2x2uC( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \ + k40, k41, k42, k43, k44, k46 , k48, k49, k4a, k4b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b }, \ + { k40, k41, k42, k43, k44, KC_NO, k46, KC_NO, k48, k49, k4a, k4b }, \ +} diff --git a/keyboards/cannonkeys/atlas/chconf.h b/keyboards/cannonkeys/atlas/chconf.h new file mode 100644 index 00000000000..03f63da36a8 --- /dev/null +++ b/keyboards/cannonkeys/atlas/chconf.h @@ -0,0 +1,714 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file rt/templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_ST_RESOLUTION) +#define CH_CFG_ST_RESOLUTION 32 +#endif + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#if !defined(CH_CFG_ST_FREQUENCY) +#define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MUTEXES) +#define CH_CFG_USE_MUTEXES TRUE +#endif + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_EVENTS) +#define CH_CFG_USE_EVENTS TRUE +#endif + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMPOOLS) +#define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#if !defined(CH_CFG_USE_DYNAMIC) +#define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_MASK) +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) +#define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/cannonkeys/atlas/config.h b/keyboards/cannonkeys/atlas/config.h new file mode 100644 index 00000000000..6cd1d1b6e87 --- /dev/null +++ b/keyboards/cannonkeys/atlas/config.h @@ -0,0 +1,71 @@ +/* +Copyright 2015 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCA04 +#define PRODUCT_ID 0xA7A5 +#define DEVICE_VER 0x0001 +#define MANUFACTURER CannonKeys +#define PRODUCT Atlas +#define DESCRIPTION Atlas Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 12 + +#define MATRIX_COL_PINS { A9, A10, A15, B9, C13, C14, C15, F0, F1, A0, A1, A2 } +#define MATRIX_ROW_PINS { A8, B14, B12, B4, B3 } +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define RGBLIGHT_ANIMATIONS + + +#define WS2812_SPI SPID2 +#define RGB_DI_PIN B15 +#define RGBLED_NUM 22 +#define WS2812_SPI_MOSI_PAL_MODE 0 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/cannonkeys/atlas/halconf.h b/keyboards/cannonkeys/atlas/halconf.h new file mode 100644 index 00000000000..adb1a907154 --- /dev/null +++ b/keyboards/cannonkeys/atlas/halconf.h @@ -0,0 +1,525 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C TRUE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT 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 + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION 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 the zero-copy API. + */ +#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 + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U +#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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#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 circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#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 + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/keyboards/cannonkeys/atlas/info.json b/keyboards/cannonkeys/atlas/info.json new file mode 100644 index 00000000000..10d95297300 --- /dev/null +++ b/keyboards/cannonkeys/atlas/info.json @@ -0,0 +1,198 @@ +{ + "keyboard_name": "Atlas", + "url": "https://cannonkeys.com", + "maintainer": "awkannan", + "width": 12, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x12": { + "layout": [ + {"label":"`", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + {"label":"7", "x":7, "y":0}, + {"label":"8", "x":8, "y":0}, + {"label":"9", "x":9, "y":0}, + {"label":"0", "x":10, "y":0}, + {"label":"Backspace", "x":11, "y":0}, + {"label":"Tab", "x":0, "y":1}, + {"label":"Q", "x":1, "y":1}, + {"label":"W", "x":2, "y":1}, + {"label":"E", "x":3, "y":1}, + {"label":"R", "x":4, "y":1}, + {"label":"T", "x":5, "y":1}, + {"label":"Y", "x":6, "y":1}, + {"label":"U", "x":7, "y":1}, + {"label":"I", "x":8, "y":1}, + {"label":"O", "x":9, "y":1}, + {"label":"P", "x":10, "y":1}, + {"label":"Delete", "x":11, "y":1}, + {"label":"Esc", "x":0, "y":2}, + {"label":"A", "x":1, "y":2}, + {"label":"S", "x":2, "y":2}, + {"label":"D", "x":3, "y":2}, + {"label":"F", "x":4, "y":2}, + {"label":"G", "x":5, "y":2}, + {"label":"H", "x":6, "y":2}, + {"label":"J", "x":7, "y":2}, + {"label":"K", "x":8, "y":2}, + {"label":"L", "x":9, "y":2}, + {"label":";", "x":10, "y":2}, + {"label":"'", "x":11, "y":2}, + {"label":"Shift", "x":0, "y":3}, + {"label":"Z", "x":1, "y":3}, + {"label":"X", "x":2, "y":3}, + {"label":"C", "x":3, "y":3}, + {"label":"V", "x":4, "y":3}, + {"label":"B", "x":5, "y":3}, + {"label":"N", "x":6, "y":3}, + {"label":"M", "x":7, "y":3}, + {"label":",", "x":8, "y":3}, + {"label":".", "x":9, "y":3}, + {"label":"/", "x":10, "y":3}, + {"label":"Enter", "x":11, "y":3}, + {"label":"Fn", "x":0, "y":4}, + {"label":"Ctrl", "x":1, "y":4}, + {"label":"Alt", "x":2, "y":4}, + {"label":"Meta", "x":3, "y":4}, + {"label":"Lower", "x":4, "y":4}, + {"label":"Space", "x":5, "y":4}, + {"label":"Space", "x":6, "y":4}, + {"label":"Raise", "x":7, "y":4}, + {"label":"Left", "x":8, "y":4}, + {"label":"Down", "x":9, "y":4}, + {"label":"Up", "x":10, "y":4}, + {"label":"Right", "x":11, "y":4} + ] + }, + "LAYOUT_ortho_5x12_1x2uC": { + "layout": [ + {"label":"`", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + {"label":"7", "x":7, "y":0}, + {"label":"8", "x":8, "y":0}, + {"label":"9", "x":9, "y":0}, + {"label":"0", "x":10, "y":0}, + {"label":"Backspace", "x":11, "y":0}, + {"label":"Tab", "x":0, "y":1}, + {"label":"Q", "x":1, "y":1}, + {"label":"W", "x":2, "y":1}, + {"label":"E", "x":3, "y":1}, + {"label":"R", "x":4, "y":1}, + {"label":"T", "x":5, "y":1}, + {"label":"Y", "x":6, "y":1}, + {"label":"U", "x":7, "y":1}, + {"label":"I", "x":8, "y":1}, + {"label":"O", "x":9, "y":1}, + {"label":"P", "x":10, "y":1}, + {"label":"Delete", "x":11, "y":1}, + {"label":"Esc", "x":0, "y":2}, + {"label":"A", "x":1, "y":2}, + {"label":"S", "x":2, "y":2}, + {"label":"D", "x":3, "y":2}, + {"label":"F", "x":4, "y":2}, + {"label":"G", "x":5, "y":2}, + {"label":"H", "x":6, "y":2}, + {"label":"J", "x":7, "y":2}, + {"label":"K", "x":8, "y":2}, + {"label":"L", "x":9, "y":2}, + {"label":";", "x":10, "y":2}, + {"label":"'", "x":11, "y":2}, + {"label":"Shift", "x":0, "y":3}, + {"label":"Z", "x":1, "y":3}, + {"label":"X", "x":2, "y":3}, + {"label":"C", "x":3, "y":3}, + {"label":"V", "x":4, "y":3}, + {"label":"B", "x":5, "y":3}, + {"label":"N", "x":6, "y":3}, + {"label":"M", "x":7, "y":3}, + {"label":",", "x":8, "y":3}, + {"label":".", "x":9, "y":3}, + {"label":"/", "x":10, "y":3}, + {"label":"Enter", "x":11, "y":3}, + {"label":"Fn", "x":0, "y":4}, + {"label":"Ctrl", "x":1, "y":4}, + {"label":"Alt", "x":2, "y":4}, + {"label":"Meta", "x":3, "y":4}, + {"label":"Lower", "x":4, "y":4}, + {"label":"Space", "x":5, "y":4, "w":2}, + {"label":"Raise", "x":7, "y":4}, + {"label":"Left", "x":8, "y":4}, + {"label":"Down", "x":9, "y":4}, + {"label":"Up", "x":10, "y":4}, + {"label":"Right", "x":11, "y":4} + ] + }, + "LAYOUT_ortho_5x12_2x2uC": { + "layout": [ + {"label":"`", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + {"label":"7", "x":7, "y":0}, + {"label":"8", "x":8, "y":0}, + {"label":"9", "x":9, "y":0}, + {"label":"0", "x":10, "y":0}, + {"label":"Backspace", "x":11, "y":0}, + {"label":"Tab", "x":0, "y":1}, + {"label":"Q", "x":1, "y":1}, + {"label":"W", "x":2, "y":1}, + {"label":"E", "x":3, "y":1}, + {"label":"R", "x":4, "y":1}, + {"label":"T", "x":5, "y":1}, + {"label":"Y", "x":6, "y":1}, + {"label":"U", "x":7, "y":1}, + {"label":"I", "x":8, "y":1}, + {"label":"O", "x":9, "y":1}, + {"label":"P", "x":10, "y":1}, + {"label":"Delete", "x":11, "y":1}, + {"label":"Esc", "x":0, "y":2}, + {"label":"A", "x":1, "y":2}, + {"label":"S", "x":2, "y":2}, + {"label":"D", "x":3, "y":2}, + {"label":"F", "x":4, "y":2}, + {"label":"G", "x":5, "y":2}, + {"label":"H", "x":6, "y":2}, + {"label":"J", "x":7, "y":2}, + {"label":"K", "x":8, "y":2}, + {"label":"L", "x":9, "y":2}, + {"label":";", "x":10, "y":2}, + {"label":"'", "x":11, "y":2}, + {"label":"Shift", "x":0, "y":3}, + {"label":"Z", "x":1, "y":3}, + {"label":"X", "x":2, "y":3}, + {"label":"C", "x":3, "y":3}, + {"label":"V", "x":4, "y":3}, + {"label":"B", "x":5, "y":3}, + {"label":"N", "x":6, "y":3}, + {"label":"M", "x":7, "y":3}, + {"label":",", "x":8, "y":3}, + {"label":".", "x":9, "y":3}, + {"label":"/", "x":10, "y":3}, + {"label":"Enter", "x":11, "y":3}, + {"label":"Fn", "x":0, "y":4}, + {"label":"Ctrl", "x":1, "y":4}, + {"label":"Alt", "x":2, "y":4}, + {"label":"Meta", "x":3, "y":4}, + {"label":"Space1", "x":4, "y":4, "w":2}, + {"label":"Space2", "x":6, "y":4, "w":2}, + {"label":"Left", "x":8, "y":4}, + {"label":"Down", "x":9, "y":4}, + {"label":"Up", "x":10, "y":4}, + {"label":"Right", "x":11, "y":4} + ] + } + } + } diff --git a/keyboards/cannonkeys/atlas/keymaps/default/keymap.c b/keyboards/cannonkeys/atlas/keymaps/default/keymap.c new file mode 100644 index 00000000000..705d31a405f --- /dev/null +++ b/keyboards/cannonkeys/atlas/keymaps/default/keymap.c @@ -0,0 +1,93 @@ +/* +Copyright 2012,2013 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_names { + _BASE, + _RAISE, + _LOWER +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_BASE] = LAYOUT_ortho_5x12( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_5x12( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, \ + RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_5x12( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, \ + RGB_TOG, RGB_MOD, BL_INC, BL_DEC, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +) +}; diff --git a/keyboards/cannonkeys/atlas/keymaps/via/keymap.c b/keyboards/cannonkeys/atlas/keymaps/via/keymap.c new file mode 100644 index 00000000000..2e72c8f9dc2 --- /dev/null +++ b/keyboards/cannonkeys/atlas/keymaps/via/keymap.c @@ -0,0 +1,102 @@ +/* +Copyright 2012,2013 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_names { + _BASE, + _RAISE, + _LOWER, + _EXTRA +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_BASE] = LAYOUT_ortho_5x12( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_5x12( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, \ + RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_5x12( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, \ + RGB_TOG, RGB_MOD, BL_INC, BL_DEC, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +[_EXTRA] = LAYOUT_ortho_5x12( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) +}; diff --git a/keyboards/sirius/uni660/keymaps/via/rules.mk b/keyboards/cannonkeys/atlas/keymaps/via/rules.mk similarity index 100% rename from keyboards/sirius/uni660/keymaps/via/rules.mk rename to keyboards/cannonkeys/atlas/keymaps/via/rules.mk diff --git a/keyboards/cannonkeys/atlas/mcuconf.h b/keyboards/cannonkeys/atlas/mcuconf.h new file mode 100644 index 00000000000..048eb4df650 --- /dev/null +++ b/keyboards/cannonkeys/atlas/mcuconf.h @@ -0,0 +1,176 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF +// #define STM32F070xB + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 TRUE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/cannonkeys/atlas/readme.md b/keyboards/cannonkeys/atlas/readme.md new file mode 100644 index 00000000000..a11117b8e1a --- /dev/null +++ b/keyboards/cannonkeys/atlas/readme.md @@ -0,0 +1,10 @@ +# CannonKeys Atlas + +* Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan) +* Hardware Supported: STM32F072CBT6 + +Make example for this keyboard (after setting up your build environment): + + make cannonkeys/atlas:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/cannonkeys/atlas/rules.mk b/keyboards/cannonkeys/atlas/rules.mk new file mode 100644 index 00000000000..8037597b5ac --- /dev/null +++ b/keyboards/cannonkeys/atlas/rules.mk @@ -0,0 +1,16 @@ +# MCU Name +MCU = STM32F072 + +# Build Options +# comment out to disable the options. +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +CUSTOM_MATRIX = no # Custom matrix file +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = yes +WS2812_DRIVER = spi diff --git a/keyboards/cannonkeys/db60/rules.mk b/keyboards/cannonkeys/db60/rules.mk index d7b88b4e643..1267286507d 100644 --- a/keyboards/cannonkeys/db60/rules.mk +++ b/keyboards/cannonkeys/db60/rules.mk @@ -1,4 +1,4 @@ -# MCU Name +# MCU name MCU = STM32F072 # Build Options diff --git a/keyboards/cannonkeys/devastatingtkl/rules.mk b/keyboards/cannonkeys/devastatingtkl/rules.mk index 007dab751b4..9c3d0179f6b 100644 --- a/keyboards/cannonkeys/devastatingtkl/rules.mk +++ b/keyboards/cannonkeys/devastatingtkl/rules.mk @@ -1,4 +1,4 @@ -# MCU Name +# MCU name MCU = STM32F072 # Build Options @@ -10,7 +10,6 @@ EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -`` NKRO_ENABLE = yes # USB Nkey Rollover CUSTOM_MATRIX = no # Custom matrix file BACKLIGHT_ENABLE = yes diff --git a/keyboards/cannonkeys/obliterated75/chconf.h b/keyboards/cannonkeys/obliterated75/chconf.h new file mode 100644 index 00000000000..03f63da36a8 --- /dev/null +++ b/keyboards/cannonkeys/obliterated75/chconf.h @@ -0,0 +1,714 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file rt/templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_ST_RESOLUTION) +#define CH_CFG_ST_RESOLUTION 32 +#endif + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#if !defined(CH_CFG_ST_FREQUENCY) +#define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MUTEXES) +#define CH_CFG_USE_MUTEXES TRUE +#endif + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_EVENTS) +#define CH_CFG_USE_EVENTS TRUE +#endif + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMPOOLS) +#define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#if !defined(CH_CFG_USE_DYNAMIC) +#define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_MASK) +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) +#define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/cannonkeys/obliterated75/config.h b/keyboards/cannonkeys/obliterated75/config.h new file mode 100644 index 00000000000..bff3030b511 --- /dev/null +++ b/keyboards/cannonkeys/obliterated75/config.h @@ -0,0 +1,78 @@ +/* +Copyright 2015 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCA04 +#define PRODUCT_ID 0x0B75 +#define DEVICE_VER 0x0001 +#define MANUFACTURER CannonKeys +#define PRODUCT Obliterated75 +#define DESCRIPTION Obliterated75 Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 16 + +#define MATRIX_COL_PINS { A5, B10, A3, A2, B0, A9, C13, B9, B8, B7, B6, B5, B4, B3, A15, A14 } +#define MATRIX_ROW_PINS { A13, B12, B11, B14, A8, A1 } +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN A6 +#define BACKLIGHT_PWM_DRIVER PWMD3 +#define BACKLIGHT_PWM_CHANNEL 1 +#define BACKLIGHT_PAL_MODE 1 +#define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define RGBLIGHT_ANIMATIONS +#define RGB_DI_PIN B15 +#define RGBLED_NUM 20 +#define WS2812_SPI SPID2 +#define WS2812_SPI_MOSI_PAL_MODE 0 + + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/cannonkeys/obliterated75/halconf.h b/keyboards/cannonkeys/obliterated75/halconf.h new file mode 100644 index 00000000000..921803762ea --- /dev/null +++ b/keyboards/cannonkeys/obliterated75/halconf.h @@ -0,0 +1,525 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT 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 + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION 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 the zero-copy API. + */ +#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 + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U +#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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#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 circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#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 + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/keyboards/cannonkeys/obliterated75/info.json b/keyboards/cannonkeys/obliterated75/info.json new file mode 100644 index 00000000000..b62cee36ca4 --- /dev/null +++ b/keyboards/cannonkeys/obliterated75/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Obliterated75", + "url": "https://cannonkeys.com", + "maintainer": "awkannan", + "width": 16, + "height": 6.25, + "layouts": { + "LAYOUT_all": { + "layout": [{"x":0, "y":0}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":12.5, "y":0}, {"x":13.5, "y":0}, {"x":15, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"x":13, "y":1.25}, {"x":14, "y":1.25}, {"x":15, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"x":15, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"x":12.75, "y":3.25}, {"label":"Enter", "x":13.75, "y":3.25, "w":1.25}, {"x":15, "y":3.25}, {"x":0, "y":4.25, "w":1.25}, {"x":1.25, "y":4.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, {"x":14, "y":4.25}, {"x":15, "y":4.25}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"label":"Alt", "x":10, "y":5.25, "w":1.25}, {"label":"Ctrl", "x":11.25, "y":5.25, "w":1.25}, {"x":13, "y":5.25}, {"x":14, "y":5.25}, {"x":15, "y":5.25}] + } + } +} diff --git a/keyboards/cannonkeys/obliterated75/keymaps/default/keymap.c b/keyboards/cannonkeys/obliterated75/keymaps/default/keymap.c new file mode 100644 index 00000000000..2934aae1895 --- /dev/null +++ b/keyboards/cannonkeys/obliterated75/keymaps/default/keymap.c @@ -0,0 +1,48 @@ +/* +Copyright 2012,2013 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_names { + _BASE, + _FN1, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + KC_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_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_NUBS, KC_ENT, KC_PGUP, + 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_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_TRNS, RGB_TOG, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, + BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL_INC, BL_DEC, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/cannonkeys/obliterated75/keymaps/via/keymap.c b/keyboards/cannonkeys/obliterated75/keymaps/via/keymap.c new file mode 100644 index 00000000000..68fe4f7885d --- /dev/null +++ b/keyboards/cannonkeys/obliterated75/keymaps/via/keymap.c @@ -0,0 +1,71 @@ +/* +Copyright 2012,2013 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_names { + _BASE, + _FN1, + _FN2, + _FN3 +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + KC_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_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_NUBS, KC_ENT, KC_PGUP, + 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_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_TRNS, RGB_TOG, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, + BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL_INC, BL_DEC, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS + ), + + + [_FN2] = 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_FN3] = 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/cannonkeys/obliterated75/keymaps/via/rules.mk b/keyboards/cannonkeys/obliterated75/keymaps/via/rules.mk new file mode 100644 index 00000000000..1e5b99807cb --- /dev/null +++ b/keyboards/cannonkeys/obliterated75/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/cannonkeys/obliterated75/mcuconf.h b/keyboards/cannonkeys/obliterated75/mcuconf.h new file mode 100644 index 00000000000..43fe0a462ef --- /dev/null +++ b/keyboards/cannonkeys/obliterated75/mcuconf.h @@ -0,0 +1,176 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF +// #define STM32F070xB + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 TRUE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/cannonkeys/obliterated75/obliterated75.c b/keyboards/cannonkeys/obliterated75/obliterated75.c new file mode 100644 index 00000000000..347a6438369 --- /dev/null +++ b/keyboards/cannonkeys/obliterated75/obliterated75.c @@ -0,0 +1 @@ +#include "obliterated75.h" diff --git a/keyboards/cannonkeys/obliterated75/obliterated75.h b/keyboards/cannonkeys/obliterated75/obliterated75.h new file mode 100644 index 00000000000..895223a1fd1 --- /dev/null +++ b/keyboards/cannonkeys/obliterated75/obliterated75.h @@ -0,0 +1,19 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K006, K007, K008, K009, K010, K011, K012, K013, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \ + K500, K501, K502, K506, K510, K511, K512, K513, K515 \ +) { \ + { K000, K001, K002, K003, K004, KC_NO, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO, K415 }, \ + { K500, K501, K502, KC_NO, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, K511, K512, K513, KC_NO, K515 } \ +} diff --git a/keyboards/cannonkeys/obliterated75/readme.md b/keyboards/cannonkeys/obliterated75/readme.md new file mode 100644 index 00000000000..372b5500d18 --- /dev/null +++ b/keyboards/cannonkeys/obliterated75/readme.md @@ -0,0 +1,10 @@ +# CannonKeys Obliterated75 + +* Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan) +* Hardware Supported: STM32F072CBT6 + +Make example for this keyboard (after setting up your build environment): + + make cannonkeys/obliterated75:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/cannonkeys/obliterated75/rules.mk b/keyboards/cannonkeys/obliterated75/rules.mk new file mode 100644 index 00000000000..350b0d53245 --- /dev/null +++ b/keyboards/cannonkeys/obliterated75/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = STM32F072 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +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 +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +WS2812_DRIVER = spi + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/cannonkeys/rekt1800/chconf.h b/keyboards/cannonkeys/rekt1800/chconf.h new file mode 100644 index 00000000000..03f63da36a8 --- /dev/null +++ b/keyboards/cannonkeys/rekt1800/chconf.h @@ -0,0 +1,714 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file rt/templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_ST_RESOLUTION) +#define CH_CFG_ST_RESOLUTION 32 +#endif + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#if !defined(CH_CFG_ST_FREQUENCY) +#define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MUTEXES) +#define CH_CFG_USE_MUTEXES TRUE +#endif + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_EVENTS) +#define CH_CFG_USE_EVENTS TRUE +#endif + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMPOOLS) +#define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#if !defined(CH_CFG_USE_DYNAMIC) +#define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_MASK) +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) +#define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/cannonkeys/rekt1800/config.h b/keyboards/cannonkeys/rekt1800/config.h new file mode 100644 index 00000000000..1fc60bef973 --- /dev/null +++ b/keyboards/cannonkeys/rekt1800/config.h @@ -0,0 +1,74 @@ +/* +Copyright 2015 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCA04 +#define PRODUCT_ID 0x2377 +#define DEVICE_VER 0x0001 +#define MANUFACTURER CannonKeys +#define PRODUCT Rekt1800 +#define DESCRIPTION Rekt1800 Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 19 + +#define MATRIX_COL_PINS { B12, A14, A15, B3, B4, B5, B6, B7, B8, B9, A7, B0, B1, B2, B10, A3, A4, A5, C15 } +#define MATRIX_ROW_PINS { C13, C14, A0, A1, A2, B11 } +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN A6 +#define BACKLIGHT_PWM_DRIVER PWMD3 +#define BACKLIGHT_PWM_CHANNEL 1 +#define BACKLIGHT_PAL_MODE 1 +#define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + + +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 + +/* + * 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 diff --git a/keyboards/cannonkeys/rekt1800/halconf.h b/keyboards/cannonkeys/rekt1800/halconf.h new file mode 100644 index 00000000000..921803762ea --- /dev/null +++ b/keyboards/cannonkeys/rekt1800/halconf.h @@ -0,0 +1,525 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT 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 + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION 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 the zero-copy API. + */ +#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 + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U +#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 16 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 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#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 circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#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 + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/keyboards/cannonkeys/rekt1800/info.json b/keyboards/cannonkeys/rekt1800/info.json new file mode 100644 index 00000000000..32942f1ec44 --- /dev/null +++ b/keyboards/cannonkeys/rekt1800/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Rekt1800", + "url": "https://cannonkeys.com", + "maintainer": "awkannan", + "width": 19.5, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"x":14, "y":0}, {"label":"PrtSc", "x":15.5, "y":0}, {"label":"Scroll Lock", "x":16.5, "y":0}, {"label":"Pause", "x":17.5, "y":0}, {"x":18.5, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"x":13, "y":1.25}, {"x":14, "y":1.25}, {"label":"Insert", "x":15.5, "y":1.25}, {"label":"Home", "x":16.5, "y":1.25}, {"label":"PgUp", "x":17.5, "y":1.25}, {"x":18.5, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"Delete", "x":15.5, "y":2.25}, {"label":"End", "x":16.5, "y":2.25}, {"label":"PgDn", "x":17.5, "y":2.25}, {"x":18.5, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"x":12.75, "y":3.25}, {"label":"Enter", "x":13.75, "y":3.25, "w":1.25}, {"x":15.5, "y":3.25}, {"x":16.5, "y":3.25}, {"x":17.5, "y":3.25}, {"x":18.5, "y":3.25}, {"label":"Shift", "x":0, "y":4.25, "w":1.25}, {"x":1.25, "y":4.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, {"label":"\u2191", "x":14.25, "y":4.5}, {"x":15.5, "y":4.25}, {"x":16.5, "y":4.25}, {"x":17.5, "y":4.25}, {"x":18.5, "y":4.25, "h":2}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, {"label":"Alt", "x":1.25, "y":5.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"label":"Alt", "x":10, "y":5.25, "w":1.5}, {"label":"Ctrl", "x":11.5, "y":5.25, "w":1.5}, {"label":"\u2190", "x":13.25, "y":5.5}, {"label":"\u2193", "x":14.25, "y":5.5}, {"label":"\u2192", "x":15.25, "y":5.5}, {"x":16.5, "y":5.25}, {"x":17.5, "y":5.25}] + } + } +} diff --git a/keyboards/cannonkeys/rekt1800/keymaps/default/keymap.c b/keyboards/cannonkeys/rekt1800/keymaps/default/keymap.c new file mode 100644 index 00000000000..98e16e7008e --- /dev/null +++ b/keyboards/cannonkeys/rekt1800/keymaps/default/keymap.c @@ -0,0 +1,48 @@ +/* +Copyright 2012,2013 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_names { + _BASE, + _FN1, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_DEL, KC_INS, KC_PGUP, KC_PGDN, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUBS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + 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_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + + [_FN1] = LAYOUT_all( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_BRTG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_INC, BL_DEC, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/cannonkeys/rekt1800/keymaps/via/keymap.c b/keyboards/cannonkeys/rekt1800/keymaps/via/keymap.c new file mode 100644 index 00000000000..d267302b34d --- /dev/null +++ b/keyboards/cannonkeys/rekt1800/keymaps/via/keymap.c @@ -0,0 +1,58 @@ +/* +Copyright 2012,2013 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_names { + _BASE, + _FN1, + _FN2, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_DEL, KC_INS, KC_PGUP, KC_PGDN, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUBS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + 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_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + + [_FN1] = LAYOUT_all( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_BRTG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_INC, BL_DEC, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_FN2] = 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/cannonkeys/rekt1800/keymaps/via/rules.mk b/keyboards/cannonkeys/rekt1800/keymaps/via/rules.mk new file mode 100644 index 00000000000..1e5b99807cb --- /dev/null +++ b/keyboards/cannonkeys/rekt1800/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/cannonkeys/rekt1800/mcuconf.h b/keyboards/cannonkeys/rekt1800/mcuconf.h new file mode 100644 index 00000000000..43fe0a462ef --- /dev/null +++ b/keyboards/cannonkeys/rekt1800/mcuconf.h @@ -0,0 +1,176 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF +// #define STM32F070xB + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 TRUE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/cannonkeys/rekt1800/readme.md b/keyboards/cannonkeys/rekt1800/readme.md new file mode 100644 index 00000000000..5daf03b9a79 --- /dev/null +++ b/keyboards/cannonkeys/rekt1800/readme.md @@ -0,0 +1,10 @@ +# CannonKeys Rekt1800 + +* Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan) +* Hardware Supported: STM32F072CBT6 + +Make example for this keyboard (after setting up your build environment): + + make cannonkeys/rekt1800:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/cannonkeys/rekt1800/rekt1800.c b/keyboards/cannonkeys/rekt1800/rekt1800.c new file mode 100644 index 00000000000..3a8673b9553 --- /dev/null +++ b/keyboards/cannonkeys/rekt1800/rekt1800.c @@ -0,0 +1 @@ +#include "rekt1800.h" diff --git a/keyboards/cannonkeys/rekt1800/rekt1800.h b/keyboards/cannonkeys/rekt1800/rekt1800.h new file mode 100644 index 00000000000..18d72dfdf4c --- /dev/null +++ b/keyboards/cannonkeys/rekt1800/rekt1800.h @@ -0,0 +1,20 @@ +#pragma once + +#include "quantum.h" +#define K_NO KC_NO + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, K017, K018, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, K217, K218, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, K315, K316, K317, K318, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, K415, K416, K417, K418, \ + K500, K501, K502, K506, K510, K511, K512, K514, K515, K516, K517 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K_NO, K014, K015, K016, K017, K018 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K_NO, K214, K215, K216, K217, K218 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K_NO, K314, K315, K316, K317, K318 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K_NO, K414, K415, K416, K417, K418 }, \ + { K500, K501, K502, K_NO, K_NO, K_NO, K506, K_NO, K_NO, K_NO, K510, K511, K512, K_NO, K514, K515, K516, K517, K_NO } \ +} diff --git a/keyboards/cannonkeys/rekt1800/rules.mk b/keyboards/cannonkeys/rekt1800/rules.mk new file mode 100644 index 00000000000..c8f75b7dd93 --- /dev/null +++ b/keyboards/cannonkeys/rekt1800/rules.mk @@ -0,0 +1,19 @@ +# MCU name +MCU = STM32F072 + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +CUSTOM_MATRIX = no # Custom matrix file +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = no + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/ckeys/washington/config.h b/keyboards/ckeys/washington/config.h index 419e35e3be6..9a9b69d3235 100644 --- a/keyboards/ckeys/washington/config.h +++ b/keyboards/ckeys/washington/config.h @@ -193,10 +193,9 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + /* * MIDI options */ diff --git a/keyboards/coseyfannitutti/discipad/config.h b/keyboards/coseyfannitutti/discipad/config.h index 55033bd9d06..34776fcbdd6 100644 --- a/keyboards/coseyfannitutti/discipad/config.h +++ b/keyboards/coseyfannitutti/discipad/config.h @@ -19,7 +19,7 @@ along with this program. If not, see . #include "config_common.h" -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0x6B62 #define PRODUCT_ID 0x1769 #define DEVICE_VER 0x0001 #define MANUFACTURER coseyfannitutti @@ -243,7 +243,7 @@ along with this program. If not, see . #endif */ -/* Bootmagic Lite key configuration +/* Bootmagic Lite key configuration */ #define BOOTMAGIC_LITE_ROW 0 #define BOOTMAGIC_LITE_COLUMN 0 -*/ + diff --git a/keyboards/coseyfannitutti/discipad/keymaps/via/keymap.c b/keyboards/coseyfannitutti/discipad/keymaps/via/keymap.c new file mode 100644 index 00000000000..d47c2ce75c5 --- /dev/null +++ b/keyboards/coseyfannitutti/discipad/keymaps/via/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_numpad_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT ), + [1] = LAYOUT_numpad_5x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS ), + [2] = LAYOUT_numpad_5x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS ), + [3] = LAYOUT_numpad_5x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, 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/coseyfannitutti/discipad/keymaps/via/rules.mk b/keyboards/coseyfannitutti/discipad/keymaps/via/rules.mk new file mode 100644 index 00000000000..00c11acccda --- /dev/null +++ b/keyboards/coseyfannitutti/discipad/keymaps/via/rules.mk @@ -0,0 +1,4 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes +EXTRAKEY_ENABLE = no +MOUSEKEY_ENABLE = no diff --git a/keyboards/coseyfannitutti/mysterium/config.h b/keyboards/coseyfannitutti/mysterium/config.h index 1d0094b8b88..968794da99e 100644 --- a/keyboards/coseyfannitutti/mysterium/config.h +++ b/keyboards/coseyfannitutti/mysterium/config.h @@ -18,7 +18,7 @@ along with this program. If not, see . #include "config_common.h" -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0x6B62 #define PRODUCT_ID 0x8769 #define DEVICE_VER 0x0001 #define MANUFACTURER coseyfannitutti @@ -237,4 +237,8 @@ along with this program. If not, see . #define LCD_E_PORT LCD_PORT //< port for Enable line #define LCD_E_PIN 1 //< pin for Enable line #endif -*/ \ No newline at end of file +*/ + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/coseyfannitutti/mysterium/keymaps/via/keymap.c b/keyboards/coseyfannitutti/mysterium/keymaps/via/keymap.c new file mode 100644 index 00000000000..bd8de69a04a --- /dev/null +++ b/keyboards/coseyfannitutti/mysterium/keymaps/via/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_tkl_ansi( + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + + [1] = LAYOUT_tkl_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS), + + [2] = LAYOUT_tkl_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [3] = LAYOUT_tkl_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/coseyfannitutti/mysterium/keymaps/via/rules.mk b/keyboards/coseyfannitutti/mysterium/keymaps/via/rules.mk new file mode 100644 index 00000000000..d0e4977b849 --- /dev/null +++ b/keyboards/coseyfannitutti/mysterium/keymaps/via/rules.mk @@ -0,0 +1,4 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes +EXTRAKEY_ENABLE = no +MOUSEKEY_ENABLE = no \ No newline at end of file diff --git a/keyboards/cospad/config.h b/keyboards/cospad/config.h index cfc2d59f60c..362f6c38b18 100644 --- a/keyboards/cospad/config.h +++ b/keyboards/cospad/config.h @@ -65,7 +65,7 @@ along with this program. If not, see . // #define RGBLIGHT_SAT_STEP 8 // #define RGBLIGHT_VAL_STEP 8 // #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ -// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ // /*== all animations enable ==*/ #define RGBLIGHT_ANIMATIONS // /*== or choose animations ==*/ @@ -193,10 +193,9 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + /* * MIDI options */ diff --git a/keyboards/crkbd/config.h b/keyboards/crkbd/config.h index 4357a218d4a..fb1cdf3962a 100644 --- a/keyboards/crkbd/config.h +++ b/keyboards/crkbd/config.h @@ -24,11 +24,5 @@ along with this program. If not, see . #define USE_I2C #define USE_SERIAL -#ifdef USE_Link_Time_Optimization - // LTO has issues with macros (action_get_macro) and "functions" (fn_actions), - // so just disable them - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION - - #define DISABLE_LEADER -#endif // USE_Link_Time_Optimization +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/crkbd/keymaps/bcat/keymap.c b/keyboards/crkbd/keymaps/bcat/keymap.c index 57fd2606565..b4c347181f5 100644 --- a/keyboards/crkbd/keymaps/bcat/keymap.c +++ b/keyboards/crkbd/keymaps/bcat/keymap.c @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [LAYER_LOWER] = LAYOUT( KC_CAPS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TILD, - _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_APP, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_GRV, + _______, KC_APP, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_GRV, _______, _______, _______, _______, _______, _______ ), diff --git a/keyboards/crkbd/keymaps/bcat/readme.md b/keyboards/crkbd/keymaps/bcat/readme.md index 71a9d93c954..fa6b5af37fa 100644 --- a/keyboards/crkbd/keymaps/bcat/readme.md +++ b/keyboards/crkbd/keymaps/bcat/readme.md @@ -1,9 +1,24 @@ # bcat's Corne layout -This split ergo layout mirrors -[my Lily58 layout](https://github.com/qmk/qmk_firmware/tree/master/keyboards/lily58/keymaps/bcat) -with the number row removed and RGB controls added. See that layout's docs for -more details on the principles that went into the layout. +This is my favorite split ergo layout for typing, featuring the traditional +four ortho/ergo layers (Default, Lower, Raise, Adjust). It is loosely inspired +by the default Planck (numbers on Lower, symbols on Raise) and Crkbd (Space on +left, Enter on right) layouts, but has since been redesigned heavily according +to the principles described below: + +* Since most of the modifiers are on the left half, keys frequently pressed +together with mods (e.g., numbers, function keys, etc.) are on the Raise layer +activated by the right thumb. + +* Navigation can be done on the right half alone, to enable simultaneous +left-handed mousing. Additionally, Web pages can be scrolled with Space or +Shift+Space on the left half alone, to enable taking notes with the right hand +at the same time. + +* Other than Right Shift (which I seldom use), mods aren't rebound on layers. + +* Likewise, Backspace is not rebound on layers to avoid having to let go of +layer-switch keys to correct mistakes. ## Default layer @@ -11,20 +26,97 @@ more details on the principles that went into the layout. ([KLE](http://www.keyboard-layout-editor.com/#/gists/08d9827d916662a9414f48805aa895a5)) +* The alpha keys are a standard QWERTY layout, no funny business there. + +* Tab and Backspace are in familiar locations from my row-staggered boards +(almost all of which use HHKB-style split backspace). + +* Likewise, the Ctrl key is in the same place as on my row-staggered boards +(where I've been remapping Caps Lock as Ctrl since before even using QMK). + +* There are two Shift keys, because I do use Right Shift on occasion (even +though I'm predominately a Left Shift-er). + +* Lower and Raise layer-switch keys are below the left and right thumb, +respectively, when resting my fingers on the home row. + +* Space and Enter are on the big thumb keys so they're easy to press. + +* Alt is on the left so I can navigate back (Alt+Raise+H) and forward +(Alt+Raise+L) without having to uncomfortably hit two thumb keys on the same +half. This puts Super on the right by the process of elimination. + +* Escape shares a mod-tap key with Ctrl, which is convenient for Vim, but not +something I'm totally in love with, as even after tweaking `TAPPING_TERM` I +still get occasional spurious Esc taps. (I might move Esc up a key and put Tab +on a layer, but that'd take some getting used to....) + ## Lower layer -![Lower layer layout](https://i.imgur.com/rDlSmrA.png) +![Lower layer layout](https://i.imgur.com/SsxvCgy.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/c3fba5eaa2cd70fdfbdbc0f9e34d3bc0)) +* This could also be called the "symbol layer". + +* Shifted numbers are bound in their usual positions on the top row. + +* Hyphen/Underscore and Equals/Plus are in the right index- and middle-finger +columns for easy reach. They share the same relative position as on a +row-staggered keyboard, and the shifted versions are physically above the +unshifted versions as a mnemonic device. + +* Brackets and braces are placed below the parens for easy recall. Once again, +the shifted versions are on the home row and the unshifted versions are on the +bottom row. + +* Forward Slash/Pipe and Backtick/Tilde fill out the remaining positions on the +right half, with the same relative positions as on a row-staggered HHKB layout. +And yup, the shifted versions are above the unshifted versions. + +* Caps Lock is bound in the same position as on an HHKB, for lack of an obvious +better location. + +* Some extra keys are placed on the bottom row of the left half, ensuring every +key on a TKL has a binding. + +* The left-half home row is reversed for future use. (It's free real estate.) + ## Raise layer ![Raise layer layout](https://i.imgur.com/cVoKygg.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/08b44355d4ca85d294bad9e2821f91d7)) +* This could also be called the "number layer". + +* Unshifted numbers are bound in their usual positions on the top row. + +* Arrow keys are on VIM-style HJKL keys. + +* Home/End and Page Up/Page Down are in the same column as the arrow keys, but +translated down one row. (This means that the comma and period keys are not +bound on the number layer, which makes data entry a bit funky. I might add a +dedicated numpad layer to compensate.) + +* Function keys F1–F10 take up most of remaining space on the left half, with +F11 and F12 spilling over to the right half. (This puts the most used function +keys (F1–F5) on the home row.) + +* Insert and Delete are on the rightmost column, because there didn't seem to +be a better place to put them. + ## Adjust layer ![Adjust layer layout](https://i.imgur.com/LEHM4DU.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/77e7572e077b36a23eb2086017e16fee)) + +* Media keys are centered around the ESDF cluster, just like I arrange them on +row-staggered keyboards. (It's even more sensible with columnar stagger.) + +* The navigation keys are replaced by RGB controls. Again, this mirrors the +positioning I use on my row-staggered keyboards. + +* Finally, reset keys live at the top-left corner of the right half where it's +reasonably hard to press them by accident. diff --git a/keyboards/daisy/config.h b/keyboards/daisy/config.h index 4ee4d242fc0..ea03d116bda 100644 --- a/keyboards/daisy/config.h +++ b/keyboards/daisy/config.h @@ -192,10 +192,9 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + /* * MIDI options */ diff --git a/keyboards/dmqdesign/spin/config.h b/keyboards/dmqdesign/spin/config.h new file mode 100644 index 00000000000..63a3aa94b87 --- /dev/null +++ b/keyboards/dmqdesign/spin/config.h @@ -0,0 +1,58 @@ +/* +Copyright 2019-2020 DMQ Design + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xA455 +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER DMQ Design +#define PRODUCT SPIN +#define DESCRIPTION The SPIN Macro Pad is a 12 key Macro Pad by DMQ Design with 3 rotary encoders, inspired by the Plaid & RoMac. + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 5 +//Matrix is 3x5 instead of 3x4, as the 3 encoders are wired into the matrix + +#define MATRIX_ROW_PINS { F0, F1, F4 } +#define MATRIX_COL_PINS { F5, F6, F7, C7, C6 } +#define UNUSED_PINS { D5, D2, D1, D0, B7, B3, B2, B0, E6 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +//rotary encoder setup +#define ENCODERS_PAD_A { B6, B4, D6 } +#define ENCODERS_PAD_B { B5, D7, D4 } +#define ENCODER_RESOLUTION 4 + +//Data pin for the 3 RGB LEDs +#define RGB_DI_PIN D3 +//Number of RGB LEDs +#define RGBLED_NUM 3 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/dmqdesign/spin/info.json b/keyboards/dmqdesign/spin/info.json new file mode 100644 index 00000000000..032ff39908b --- /dev/null +++ b/keyboards/dmqdesign/spin/info.json @@ -0,0 +1,28 @@ +{ + "keyboard_name": "SPIN", + "url": "https://www.DMQdesign.com", + "maintainer": "Quarren42", + "width": 4.5, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3.5, "y":0}, + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3.5, "y":1.5}, + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3.5, "y":3}, + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3} + ] + } + } +} diff --git a/keyboards/dmqdesign/spin/keymaps/default/config.h b/keyboards/dmqdesign/spin/keymaps/default/config.h new file mode 100644 index 00000000000..a6d4ee43198 --- /dev/null +++ b/keyboards/dmqdesign/spin/keymaps/default/config.h @@ -0,0 +1,21 @@ +/* Copyright 2019-2020 DMQ Design + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define RGBLIGHT_HUE_STEP 8 + +// place overrides here diff --git a/keyboards/dmqdesign/spin/keymaps/default/keymap.c b/keyboards/dmqdesign/spin/keymaps/default/keymap.c new file mode 100644 index 00000000000..0b5e6bd0b90 --- /dev/null +++ b/keyboards/dmqdesign/spin/keymaps/default/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2019-2020 DMQ Design + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_7, KC_8, KC_9, KC_TRNS, + KC_4, KC_5, KC_6, KC_TRNS, + KC_1, KC_2, KC_3, KC_TRNS, + KC_0, RGB_TOG, KC_ENTER + ), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + rgblight_increase_hue(); //Cycle through the RGB hue + } else { + rgblight_decrease_hue(); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + tap_code(KC_VOLU); //Example of using tap_code which lets you use keycodes outside of the keymap + } else { + tap_code(KC_VOLD); + } + } else if (index == 2) { /* Third encoder */ + if (clockwise) { + rgblight_increase_val(); //Change brightness on the RGB LEDs + } else { + rgblight_decrease_val(); + } + } +} diff --git a/keyboards/dmqdesign/spin/keymaps/default/readme.md b/keyboards/dmqdesign/spin/keymaps/default/readme.md new file mode 100644 index 00000000000..384b1a7d8af --- /dev/null +++ b/keyboards/dmqdesign/spin/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for the SPIN Macro Pad, it includes basic encoder & rgb functionality. \ No newline at end of file diff --git a/keyboards/dmqdesign/spin/keymaps/encoderlayers/config.h b/keyboards/dmqdesign/spin/keymaps/encoderlayers/config.h new file mode 100644 index 00000000000..feedd68eb44 --- /dev/null +++ b/keyboards/dmqdesign/spin/keymaps/encoderlayers/config.h @@ -0,0 +1,23 @@ +/* Copyright 2019-2020 DMQ Design + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_HUE_STEP 8 +#define MIDI_ENABLE_STRICT 1 +#define MIDI_ADVANCED + diff --git a/keyboards/dmqdesign/spin/keymaps/encoderlayers/keymap.c b/keyboards/dmqdesign/spin/keymaps/encoderlayers/keymap.c new file mode 100644 index 00000000000..cb2a21f5575 --- /dev/null +++ b/keyboards/dmqdesign/spin/keymaps/encoderlayers/keymap.c @@ -0,0 +1,151 @@ +/* Copyright 2019-2020 DMQ Design + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H +#include "midi.h" +#include "qmk_midi.h" + +enum layers +{ + _BL, + _FL, + _TL +}; + +uint8_t currentLayer; + +//The below layers are intentionally empty in order to give a good starting point for how to configure multiple layers. +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT(/* Base */ + KC_KP_7, KC_KP_8, KC_KP_9, TO(_BL), + KC_KP_4, KC_KP_5, KC_KP_6, TO(_FL), + KC_KP_1, KC_KP_2, KC_KP_3, TO(_TL), + KC_KP_0, RGB_TOG, RGB_MOD + ), + + [_FL] = LAYOUT(/* Base */ + KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_MS_BTN1, KC_NO, KC_MS_BTN2 + ), + + [_TL] = LAYOUT(/* Base */ + KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_NO, KC_NO, KC_NO + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + switch (currentLayer) { //break each encoder update into a switch statement for the current layer + case _BL: + if (clockwise) { + rgblight_increase_hue(); + } else { + rgblight_decrease_hue(); + } + break; + case _FL: + if (clockwise) { + midi_send_cc(&midi_device, 0, 0x14, 1); + } else { + midi_send_cc(&midi_device, 0, 0x15, 1); + } + break; + case _TL: + if (clockwise) { + midi_send_cc(&midi_device, 0, 0x1A, 1); + } else { + midi_send_cc(&midi_device, 0, 0x1B, 1); + } + break; + } + } else if (index == 1) { /* Second encoder */ + switch (currentLayer) { + case _BL: + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + break; + case _FL: + if (clockwise) { + midi_send_cc(&midi_device, 0, 0x16, 1); + } else { + midi_send_cc(&midi_device, 0, 0x17, 1); + } + break; + case _TL: + if (clockwise) { + midi_send_cc(&midi_device, 0, 0x1C, 1); + } else { + midi_send_cc(&midi_device, 0, 0x1D, 1); + } + break; + } + } else if (index == 2) { /* Third encoder */ + switch (currentLayer) { + case _BL: + if (clockwise) { + rgblight_increase_val(); + } else { + rgblight_decrease_val(); + } + break; + case _FL: + if (clockwise) { + midi_send_cc(&midi_device, 0, 0x18, 1); + } else { + midi_send_cc(&midi_device, 0, 0x19, 1); + } + break; + case _TL: + if (clockwise) { + midi_send_cc(&midi_device, 0, 0x1E, 1); + } else { + midi_send_cc(&midi_device, 0, 0x1F, 1); + } + break; + } + } +} + +layer_state_t layer_state_set_user(layer_state_t state) { //This will run every time the layer is updated + currentLayer = get_highest_layer(state); + + switch (currentLayer) { + case _BL: + setrgb(RGB_WHITE, &led[0]); //Set the top LED to white for the bottom layer + setrgb(0, 0, 0, &led[1]); + setrgb(0, 0, 0, &led[2]); + break; + case _FL: + setrgb(0, 0, 0, &led[0]); //Set the middle LED to white for the middle layer + setrgb(RGB_WHITE, &led[1]); + setrgb(0, 0, 0, &led[2]); + break; + case _TL: + setrgb(0, 0, 0, &led[0]); + setrgb(0, 0, 0, &led[1]); + setrgb(RGB_WHITE, &led[2]); //Set the bottom LED to white for the top layer + break; + } + rgblight_set(); + return state; +} diff --git a/keyboards/dmqdesign/spin/keymaps/encoderlayers/readme.md b/keyboards/dmqdesign/spin/keymaps/encoderlayers/readme.md new file mode 100644 index 00000000000..256fb16d47c --- /dev/null +++ b/keyboards/dmqdesign/spin/keymaps/encoderlayers/readme.md @@ -0,0 +1 @@ +# This keymap is intended to demonstrate how to implement different encoder functions dependent on layer, and on how to implement MIDI control with encoders. \ No newline at end of file diff --git a/keyboards/dmqdesign/spin/readme.md b/keyboards/dmqdesign/spin/readme.md new file mode 100644 index 00000000000..8f856a81d90 --- /dev/null +++ b/keyboards/dmqdesign/spin/readme.md @@ -0,0 +1,17 @@ +# SPIN + +![SPIN](https://i.imgur.com/5oYg1WD.jpg) + +The SPIN Macro Pad is a USB-C, hotswappable Macro Pad with 3 encoders designed by Nick from DMQ Design. + +* Keyboard Maintainer: [Nicholas Junker](https://github.com/Quarren42) +* Hardware Supported: SPIN Macro Pad PCB/kit +* Hardware Availability: The macro pad is available at [DMQdesign.com](www.dmqdesign.com) + +Make example for this keyboard (after setting up your build environment): + + make dmqdesign/spin:default + +I have two example keymaps available, both the default and the encoderlayers keymap which demonstrates using different encoder functions based on the layer chosen. + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/dmqdesign/spin/rules.mk b/keyboards/dmqdesign/spin/rules.mk new file mode 100644 index 00000000000..f8dc59afaa7 --- /dev/null +++ b/keyboards/dmqdesign/spin/rules.mk @@ -0,0 +1,34 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = yes # MIDI support +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 +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +ENCODER_ENABLE = yes # Enable rotary encoder support diff --git a/keyboards/dmqdesign/spin/spin.c b/keyboards/dmqdesign/spin/spin.c new file mode 100644 index 00000000000..fe3f267d1a9 --- /dev/null +++ b/keyboards/dmqdesign/spin/spin.c @@ -0,0 +1,16 @@ +/* Copyright 2019-2020 DMQ Design + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "spin.h" diff --git a/keyboards/dmqdesign/spin/spin.h b/keyboards/dmqdesign/spin/spin.h new file mode 100644 index 00000000000..d60dbe82fb6 --- /dev/null +++ b/keyboards/dmqdesign/spin/spin.h @@ -0,0 +1,29 @@ +/* Copyright 2019-2020 DMQ Design + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32 \ +) { \ + {k00, k10, k20, k30, k23}, \ + {k01, k11, k21, k31, k13}, \ + {k02, k12, k22, k32, k03} \ +} diff --git a/keyboards/dp60/config.h b/keyboards/dp60/config.h index 29d5e3c2a4a..3875d303ea4 100644 --- a/keyboards/dp60/config.h +++ b/keyboards/dp60/config.h @@ -16,7 +16,7 @@ /* key matrix size */ #define MATRIX_ROWS 5 -#define MATRIX_COLS 14 +#define MATRIX_COLS 15 #define UNUSED_PINS #define DIODE_DIRECTION COL2ROW @@ -49,7 +49,3 @@ #define DRIVER_1_LED_TOTAL 36 #define DRIVER_2_LED_TOTAL 36 #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) - -#if defined(VIA_ENABLE) -# define DYNAMIC_KEYMAP_LAYER_COUNT 2 -#endif diff --git a/keyboards/dp60/keymaps/via/keymap.c b/keyboards/dp60/keymaps/via/keymap.c index 2e2694326c3..8227055766e 100644 --- a/keyboards/dp60/keymaps/via/keymap.c +++ b/keyboards/dp60/keymaps/via/keymap.c @@ -14,4 +14,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME,KC_END,_______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, _______, _______,_______,TG(0),_______), + + [2] = LAYOUT_60_ansi_split_bs_rshift( + _______, _______,_______, _______,_______, _______,_______, _______,_______, _______,_______, _______,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______,_______,_______,_______), + + [3] = LAYOUT_60_ansi_split_bs_rshift( + _______, _______,_______, _______,_______, _______,_______, _______,_______, _______,_______, _______,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______,_______,_______,_______) }; \ No newline at end of file diff --git a/keyboards/dp60/keymaps/via/rules.mk b/keyboards/dp60/keymaps/via/rules.mk index 036bd6d1c3e..36b7ba9cbc9 100644 --- a/keyboards/dp60/keymaps/via/rules.mk +++ b/keyboards/dp60/keymaps/via/rules.mk @@ -1 +1,2 @@ -VIA_ENABLE = yes \ No newline at end of file +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/dztech/dz60rgb/v1/config.h b/keyboards/dztech/dz60rgb/v1/config.h index d6f46242597..fb4e6224582 100644 --- a/keyboards/dztech/dz60rgb/v1/config.h +++ b/keyboards/dztech/dz60rgb/v1/config.h @@ -33,10 +33,8 @@ #define DEBOUNCE 3 /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE -# define NO_ACTION_MACRO -# define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects diff --git a/keyboards/dztech/dz60rgb/v2/config.h b/keyboards/dztech/dz60rgb/v2/config.h index b344e34b37a..6c5484fc8ad 100644 --- a/keyboards/dztech/dz60rgb/v2/config.h +++ b/keyboards/dztech/dz60rgb/v2/config.h @@ -33,10 +33,8 @@ #define DEBOUNCE 3 /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE -# define NO_ACTION_MACRO -# define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects diff --git a/keyboards/dztech/dz60rgb_ansi/v1/config.h b/keyboards/dztech/dz60rgb_ansi/v1/config.h index fb76ee7df9a..f34226efc65 100644 --- a/keyboards/dztech/dz60rgb_ansi/v1/config.h +++ b/keyboards/dztech/dz60rgb_ansi/v1/config.h @@ -33,10 +33,8 @@ #define DEBOUNCE 3 /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE -# define NO_ACTION_MACRO -# define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects diff --git a/keyboards/dztech/dz60rgb_ansi/v2/config.h b/keyboards/dztech/dz60rgb_ansi/v2/config.h index 3bd287b5f24..b9710805a69 100644 --- a/keyboards/dztech/dz60rgb_ansi/v2/config.h +++ b/keyboards/dztech/dz60rgb_ansi/v2/config.h @@ -33,10 +33,8 @@ #define DEBOUNCE 3 /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE -# define NO_ACTION_MACRO -# define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects diff --git a/keyboards/dztech/dz60rgb_wkl/v1/config.h b/keyboards/dztech/dz60rgb_wkl/v1/config.h index b5d267640bc..49ce1123604 100644 --- a/keyboards/dztech/dz60rgb_wkl/v1/config.h +++ b/keyboards/dztech/dz60rgb_wkl/v1/config.h @@ -33,10 +33,8 @@ #define DEBOUNCE 3 /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE -# define NO_ACTION_MACRO -# define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects diff --git a/keyboards/dztech/dz60rgb_wkl/v2/config.h b/keyboards/dztech/dz60rgb_wkl/v2/config.h index 4ae9b939511..e46495d73b7 100644 --- a/keyboards/dztech/dz60rgb_wkl/v2/config.h +++ b/keyboards/dztech/dz60rgb_wkl/v2/config.h @@ -33,10 +33,8 @@ #define DEBOUNCE 3 /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE -# define NO_ACTION_MACRO -# define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects diff --git a/keyboards/dztech/dz65rgb/v1/config.h b/keyboards/dztech/dz65rgb/v1/config.h index bf700a2384a..9cd7d293ce4 100644 --- a/keyboards/dztech/dz65rgb/v1/config.h +++ b/keyboards/dztech/dz65rgb/v1/config.h @@ -29,10 +29,8 @@ #define DIODE_DIRECTION COL2ROW /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE -# define NO_ACTION_MACRO -# define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_LED_PROCESS_LIMIT 4 diff --git a/keyboards/dztech/dz65rgb/v2/config.h b/keyboards/dztech/dz65rgb/v2/config.h index 6a55f876674..83cf0110abe 100644 --- a/keyboards/dztech/dz65rgb/v2/config.h +++ b/keyboards/dztech/dz65rgb/v2/config.h @@ -29,10 +29,8 @@ #define DIODE_DIRECTION COL2ROW /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE -# define NO_ACTION_MACRO -# define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_LED_PROCESS_LIMIT 4 diff --git a/keyboards/ergodash/rev1/keymaps/333fred/config.h b/keyboards/ergodash/rev1/keymaps/333fred/config.h index e48702fd6b0..862f306d015 100644 --- a/keyboards/ergodash/rev1/keymaps/333fred/config.h +++ b/keyboards/ergodash/rev1/keymaps/333fred/config.h @@ -1,7 +1,6 @@ #pragma once #include QMK_KEYBOARD_CONFIG_H -#include "333fred_config.h" #define USE_SERIAL #define MASTER_LEFT diff --git a/keyboards/ergodash/rev1/keymaps/333fred/rules.mk b/keyboards/ergodash/rev1/keymaps/333fred/rules.mk index 9d8ff37e11d..2a91ad3ba48 100644 --- a/keyboards/ergodash/rev1/keymaps/333fred/rules.mk +++ b/keyboards/ergodash/rev1/keymaps/333fred/rules.mk @@ -1,7 +1,5 @@ BACKLIGHT_ENABLE = no RGBLIGHT_ENABLE = yes AUDIO_ENABLE = no -NKRO_ENABLE = yes KEY_LOCK_ENABLE = yes -TAP_DANCE_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/ergodox_ez/keymaps/danielo515/config.h b/keyboards/ergodox_ez/keymaps/danielo515/config.h index 8982e765361..ff201caa908 100644 --- a/keyboards/ergodox_ez/keymaps/danielo515/config.h +++ b/keyboards/ergodox_ez/keymaps/danielo515/config.h @@ -25,9 +25,7 @@ # define NO_PRINT #endif -#ifndef LINK_TIME_OPTIMIZATION_ENABLE -# define NO_ACTION_MACRO -# define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION #undef RGBLIGHT_ANIMATIONS diff --git a/keyboards/ergodox_ez/keymaps/pvinis/keymap.c b/keyboards/ergodox_ez/keymaps/pvinis/keymap.c index dc804d632c5..c4b1b3b82c4 100644 --- a/keyboards/ergodox_ez/keymaps/pvinis/keymap.c +++ b/keyboards/ergodox_ez/keymaps/pvinis/keymap.c @@ -1,38 +1,36 @@ // pvinis ergodox ez -// ,------------------------------------. ,------------------------------------. -// | | | | | | | | | | | | | | | | -// |------+----+----+----+----+---------| |----+----+----+----+----+----+------| -// | | | | | | | | | | | | | | | | -// |------+----+----+----x----x----| | | |----x----x----+----+----+------| -// | | | | | | |----| |----| | | | | | | -// |------+----+----+----x----x----| | | |----x----x----+----+----+------| -// | | | | | | | | | | | | | | | | -// `------+----+----+----+----+---------' `---------+----+----+----+----+------' -// | | | | | | | | | | | | -// `------------------------' `------------------------' -// ,---------. ,---------. -// | | | | | | -// ,----+----+----| |----+----+----. -// | | | | | | | | -// | | |----| |----| | | -// | | | | | | | | -// `--------------' `--------------' - +// ,------------------------------------. ┌────┬────┬────┬────┬────┬────┬──────┐ +// | | | | | | | | │ │ │ │ │ │ │ │ +// |------+----+----+----+----+---------| ├────┼────┼────┼────┼────┼────┼──────┤ +// | | | | | | | | │ │ │ │ │ │ │ │ +// |------+----+----+----x----x----| | │ ├────╆━━━━╅────┼────┼────┼──────┤ +// | | | | | | |----| ├────┤ ┃ ┃ │ │ │ │ +// |------+----+----+----x----x----| | │ ├────╄━━━━╃────┼────┼────┼──────┤ +// | | | | | | | | │ │ │ │ │ │ │ │ +// `------+----+----+----+----+---------' └────┴────┼────┼────┼────┼────┼────┬─┘ +// | | | | | | │ │ │ │ │ │ +// `------------------------' └────┴────┴────┴────┴────┘ +// ,---------. ┌────┬────┐ +// | | | │ │ │ +// ,----+----+----| ├────┼────┼────┐ +// | | | | │ │ │ │ +// | | |----| ├────┤ │ │ +// | | | | │ │ │ │ +// `--------------' └────┴────┴────┘ #include QMK_KEYBOARD_H #include "pvinis.h" #include "mousekey.h" - // layers enum { - MOUSE = 8, + MOUSE = 8, }; // extra keys enum { - NONE = 30, - TD_LAYR, // SYSCTL and MOUSE layer switch + NONE = 30, + TD_LAYR, // SYSCTL and MOUSE layer switch }; // application selection @@ -41,158 +39,170 @@ enum { #define AP_XCOD ALLM(KC_X) #define AP_MSGR ALLM(KC_M) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - // ,------------------------------------. ,------------------------------------. - // |4xFLSH| | | | | |Opt | | | | | | | | | - // |------+----+----+----+----+---------| |----+----+----+----+----+----+------| - // | Tab | | | | | | | | | | | | | | | - // |------+----+----+----x----x----| | | |----x----x----+----+----+------| - // |EscCtl| | | | | |----| |----| | | | | | Ent | - // |------+----+----+----x----x----| | | |----x----x----+----+----+------| - // |LShift| | | | | | | | | | | | | |RShift| - // `------+----+----+----+----+---------' `---------+----+----+----+----+------' - // | | | | |Cmd | | | | | | | - // `------------------------' `------------------------' - // ,---------. ,---------. - // |QWER| | | | | - // ,----+----+----| |----+----+----. - // | Ba | L | | | | | | - // | ck |Shi |----| |----| |Spc | - // | spc| ft | | | | | | - // `--------------' `--------------' - [LR_BASE] = LAYOUT_ergodox_pretty_wrapper( - TD_3FLS, _______, _______, _______, _______, _______, KC_LALT, _______, _______, _______, _______, _______, _______, _______, - KC_TAB , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - PV_ESCC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT , - KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, - _______, _______, _______, KC_LGUI, SYMBOL , SYSCTL , KC_RALT, _______, _______, _______, - QWERTY , CARPALX, _______, _______, - _______, _______, - KC_BSPC, _______, _______, _______, _______, KC_SPC - ), + // ,------------------------------------. ,------------------------------------. + // |4xFLSH| | | | | |Opt | | | | | | | | | + // |------+----+----+----+----+---------| |----+----+----+----+----+----+------| + // | Tab | | | | | | | | | | | | | | | + // |------+----+----+----x----x----| | | |----x----x----+----+----+------| + // |EscCtl| | | | | |----| |----| | | | | | Ent | + // |------+----+----+----x----x----| | | |----x----x----+----+----+------| + // |LShift| | | | | | | | | | | | | |RShift| + // `------+----+----+----+----+---------' `---------+----+----+----+----+------' + // | | | |Cmd |LOWR| |RASE|RAlt| | | | + // `------------------------' `------------------------' + // ,---------. ,---------. + // |QWER| | | | | + // ,----+----+----| |----+----+----. + // | Ba | L | | | | | | + // | ck |Shi |----| |----| |Spc | + // | spc| ft | | | | | | + // `--------------' `--------------' + [LR_BASE] = LAYOUT_ergodox_pretty_wrapper( + // clang-format off + TD_3FLS, _______, _______, _______, _______, _______, KC_LALT, _______, _______, _______, _______, _______, _______, _______, + KC_TAB , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + PV_ESCC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT , + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, + _______, _______, _______, KC_LGUI, SYMBOL , SYSCTL , KC_RALT, _______, _______, _______, + QWERTY , CARPALX, _______, _______, + _______, _______, + KC_BSPC, _______, _______, _______, _______, KC_SPC + // clang-format on + ), - // ,------------------------------------. ,------------------------------------. - // | | NUMBERS_L | | | - | NUMBERS_R | = | - // |------+----+----+----+----+---------| |----+----+----+----+----+----+------| - // | | | [ | | ] | | | - // |------+ | | | | +------| - // | | QWERTY_L |----| |----| QWERTY_R | | - // |------+ | ( | | ) | +------| - // | | | | | | | | - // `------+----+----+----+----+---------' `---------+----+----+----+----+------' - // | | ` | | | | | | | | ' | | - // `------------------------' `------------------------' - // ,---------. ,---------. - // | | | | | | - // ,----+----+----| |----+----+----. - // | | | | | | | | - // | | |----| |----| | | - // | | | | | | | | - // `--------------' `--------------' - // See `users/pvinis/pvinis.h` - [LR_QWERTY] = LAYOUT_ergodox_pretty_wrapper( - _______, ________________NUMBERS_L__________________, _______, KC_MINS, ________________NUMBERS_R__________________, KC_EQL , - _______, _________________QWERTY_L1_________________, KC_LBRC, KC_RBRC, _________________QWERTY_R1_________________, _______, - _______, _____________MOD_QWERTY_L2_________________, _____________MOD_QWERTY_R2_________________, _______, - _______, _________________QWERTY_L3_________________, KC_LPRN, KC_RPRN, _________________QWERTY_R3_________________, _______, - _______, KC_GRV, _______, _______, _______, _______, _______, _______, KC_QUOT , _______, - _______, _______, _______, _______, - _______, _______, - _______, _______, _______, _______, _______, _______ + // ,------------------------------------. ,------------------------------------. + // | | NUMBERS_L | | | - | NUMBERS_R | = | + // |------+----+----+----+----+---------| |----+----+----+----+----+----+------| + // | | | [ | | ] | | | + // |------+ | | | | +------| + // | | QWERTY_L |----| |----| QWERTY_R | | + // |------+ | ( | | ) | +------| + // | | | | | | | | + // `------+----+----+----+----+---------' `---------+----+----+----+----+------' + // | | ` | | | | | | | | ' | | + // `------------------------' `------------------------' + // ,---------. ,---------. + // | | | | | | + // ,----+----+----| |----+----+----. + // | | | | | | | | + // | | |----| |----| | | + // | | | | | | | | + // `--------------' `--------------' + // See `users/pvinis/pvinis.h` + [LR_QWERTY] = LAYOUT_ergodox_pretty_wrapper( + // clang-format off + _______, ________________NUMBERS_L__________________, _______, KC_MINS, ________________NUMBERS_R__________________, KC_EQL , + _______, _________________QWERTY_L1_________________, KC_LBRC, KC_RBRC, _________________QWERTY_R1_________________, _______, + _______, _____________MOD_QWERTY_L2_________________, _____________MOD_QWERTY_R2_________________, _______, + _______, _________________QWERTY_L3_________________, KC_LPRN, KC_RPRN, _________________QWERTY_R3_________________, _______, + _______, KC_GRV, _______, _______, _______, _______, _______, _______, KC_QUOT , _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ + // clang-format off ), - // ,------------------------------------. ,------------------------------------. - // | | NUMBERS_L | | | | NUMBERS_R | | - // |------+----+----+----+----+---------| |----+----+----+----+----+----+------| - // | | | | | | | | - // |------+ | | | | +------| - // | | CARPALX_L |----| |----| CARPALX_R | | - // |------+ | | | | +------| - // | | | | | | | | - // `------+----+----+----+----+---------' `---------+----+----+----+----+------' - // | | | | | | | | | | | | - // `------------------------' `------------------------' - // ,---------. ,---------. - // | | | | | | - // ,----+----+----| |----+----+----. - // | | | | | | | | - // | | |----| |----| | | - // | | | | | | | | - // `--------------' `--------------' - // See `users/pvinis/pvinis.h` + // ,------------------------------------. ,------------------------------------. + // | | NUMBERS_L | | | | NUMBERS_R | | + // |------+----+----+----+----+---------| |----+----+----+----+----+----+------| + // | | | | | | | | + // |------+ | | | | +------| + // | | CARPALX_L |----| |----| CARPALX_R | | + // |------+ | | | | +------| + // | | | | | | | | + // `------+----+----+----+----+---------' `---------+----+----+----+----+------' + // | | | | | | | | | | | | + // `------------------------' `------------------------' + // ,---------. ,---------. + // | | | | | | + // ,----+----+----| |----+----+----. + // | | | | | | | | + // | | |----| |----| | | + // | | | | | | | | + // `--------------' `--------------' + // See `users/pvinis/pvinis.h` [LR_CARPALX] = LAYOUT_ergodox_pretty_wrapper( - _______, ________________NUMBERS_L__________________, _______, _______, ________________NUMBERS_R__________________, _______, - _______, ________________CARPALX_L1_________________, _______, _______, ________________CARPALX_R1_________________, _______, - _______, ________________CARPALX_L2_________________, ________________CARPALX_R2_________________, _______, - _______, ________________CARPALX_L3_________________, _______, _______, ________________CARPALX_R3_________________, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, - _______, _______, _______, _______, _______, _______ - ), + // clang-format off + _______, ________________NUMBERS_L__________________, _______, _______, ________________NUMBERS_R__________________, _______, + _______, ________________CARPALX_L1_________________, _______, _______, ________________CARPALX_R1_________________, _______, + _______, ________________CARPALX_L2_________________, ________________CARPALX_R2_________________, _______, + _______, ________________CARPALX_L3_________________, _______, _______, ________________CARPALX_R3_________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ + // clang-format on + ), - // See `users/pvinis/pvinis.h` - [LR_SYMBOL] = LAYOUT_ergodox_pretty_wrapper( - _______, ______________________F_L__________________, KC_F11 , KC_F12 , ______________________F_R__________________, _______, - _______, _________________SYMBOL_L1_________________, _______, _______, _________________SYMBOL_R1_________________, _______, - _______, _________________SYMBOL_L2_________________, _________________SYMBOL_R2_________________, _______, - _______, _________________SYMBOL_L3_________________, _______, _______, _________________SYMBOL_R3_________________, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, - _______, _______, _______, _______, _______, _______ + // See `users/pvinis/pvinis.h` + [LR_SYMBOL] = LAYOUT_ergodox_pretty_wrapper( + // clang-format off + _______, ______________________F_L__________________, KC_F11 , KC_F12 , ______________________F_R__________________, _______, + _______, _________________SYMBOL_L1_________________, _______, _______, _________________SYMBOL_R1_________________, _______, + _______, _________________SYMBOL_L2_________________, _________________SYMBOL_R2_________________, _______, + _______, _________________SYMBOL_L3_________________, _______, _______, _________________SYMBOL_R3_________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ + // clang-format off ), - // See `users/pvinis/pvinis.h` + // See `users/pvinis/pvinis.h` [LR_SYSCTL] = LAYOUT_ergodox_pretty_wrapper( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _________________SYSCTL_R1_________________, _______, - _______, _______, _______, _______, _______, _______, _________________SYSCTL_R2_________________, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _________________SYSCTL_R3_________________, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + // clang-format off + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _________________SYSCTL_R1_________________, _______, + _______, _______, _______, _______, _______, _______, _________________SYSCTL_R2_________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _________________SYSCTL_R3_________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, - _______, _______, _______, _______, _______, _______ - ), + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ + // clang-format on + ), - // See `users/pvinis/pvinis.h` - [LR_KBCTL] = LAYOUT_ergodox_pretty_wrapper( - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, __________________KBCTL_R1_________________, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, __________________KBCTL_R2_________________, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, __________________KBCTL_R3_________________, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // See `users/pvinis/pvinis.h` + [LR_KBCTL] = LAYOUT_ergodox_pretty_wrapper( + // clang-format off + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, __________________KBCTL_R1_________________, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, __________________KBCTL_R2_________________, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, __________________KBCTL_R3_________________, 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 + // clang-format on + ), -/* MOUSE - * a keymap to control my system. - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | ^ | | | | | | | | | | | | | | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | | | | | | | | | MsUp | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | |------| |------| |MsLeft| MsDn |MsRght| | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | |MidClk| - * ,------|------|------| |------+------+------. - * | | | | | |Left |Right | - * | | |------| |------| Click| Click| - * | | | ^ | | | | | - * `--------------------' `--------------------' - */ - [MOUSE] = LAYOUT_ergodox_pretty( + /* MOUSE + * a keymap to control my system. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ^ | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | MsUp | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| |MsLeft| MsDn |MsRght| | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | |MidClk| + * ,------|------|------| |------+------+------. + * | | | | | |Left |Right | + * | | |------| |------| Click| Click| + * | | | ^ | | | | | + * `--------------------' `--------------------' + */ + [MOUSE] = LAYOUT_ergodox_pretty( + // clang-format off KC_TRNS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO @@ -212,53 +222,54 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ), + // clang-format on + ), }; - // keyboard initialization -void keyboard_post_init_user_local(void) { - ergodox_led_all_on(); - for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) { - ergodox_led_all_set(i); - wait_ms(5); - } - wait_ms(1000); - for (int i = LED_BRIGHTNESS_LO; i > 0; i--) { - ergodox_led_all_set(i); - wait_ms(10); - } - ergodox_led_all_off(); +void keyboard_post_init_user_keymap(void) { + ergodox_led_all_on(); + for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) { + ergodox_led_all_set(i); + wait_ms(5); + } + wait_ms(1000); + for (int i = LED_BRIGHTNESS_LO; i > 0; i--) { + ergodox_led_all_set(i); + wait_ms(10); + } + ergodox_led_all_off(); - // restore default brightness for future use - ergodox_led_all_set(LED_BRIGHTNESS_HI); + // restore default brightness for future use + ergodox_led_all_set(LED_BRIGHTNESS_HI); } // light up leds based on the layer -uint32_t layer_state_set_user_local(uint32_t state) { - ergodox_right_led_1_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); - switch (biton32(state)) { - case LR_SYSCTL: - ergodox_right_led_3_on(); // blue - break; - case LR_KBCTL: - ergodox_right_led_1_on(); // red - break; - case LR_SYMBOL: - ergodox_right_led_2_on(); // green - break; - default: break; - } - return state; +uint32_t layer_state_set_user_keymap(uint32_t state) { + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (biton32(state)) { + case LR_SYSCTL: + ergodox_right_led_3_on(); // blue + break; + case LR_KBCTL: + ergodox_right_led_1_on(); // red + break; + case LR_SYMBOL: + ergodox_right_led_2_on(); // green + break; + default: + break; + } + return state; } // extra keys // const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - // switch (id) { - // } - // return MACRO_NONE; +// switch (id) { +// } +// return MACRO_NONE; // } // tap dances @@ -325,6 +336,6 @@ uint32_t layer_state_set_user_local(uint32_t state) { // } // qk_tap_dance_action_t tap_dance_actions[] = { - // [TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED( flash_each_tap, flash_dance_finished, flash_dance_reset ), - // [TD_LAYR] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, layers_dance_finished, NULL ), +// [TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED( flash_each_tap, flash_dance_finished, flash_dance_reset ), +// [TD_LAYR] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, layers_dance_finished, NULL ), // }; diff --git a/keyboards/ergodox_ez/keymaps/toshi0383/keymap.c b/keyboards/ergodox_ez/keymaps/toshi0383/keymap.c new file mode 100644 index 00000000000..77242596d2c --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/toshi0383/keymap.c @@ -0,0 +1,98 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, LGUI(KC_LCTL), + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_SPC, KC_Z, KC_X, KC_C, KC_V, KC_B, LGUI(KC_LALT), + _______, _______, _______, _______, LOWER, + KC_LGUI, _______, + _______, + KC_ENT, RGUI(KC_RCTL), _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + RGUI(KC_RCTL), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_H, KC_J, KC_K, KC_L, KC_RSFT, KC_RGUI, + RGUI(KC_RALT), KC_N, KC_M, KC_RCTL, KC_DOT, KC_RALT, RGUI(KC_RSFT), + RAISE, _______, _______, _______, _______, + _______, KC_RGUI, + _______, + _______, KC_BSPC, KC_ENT + ), + + [_LOWER] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, + _______, KC_LT, KC_GT, KC_LPRN, KC_RPRN, KC_GRV, + KC_LALT, _______, _______, _______, KC_EQL, KC_QUES, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + KC_NO, KC_NO, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + KC_NO, KC_CIRC, KC_AMPR, KC_ASTR, _______, _______, _______, + KC_MINS, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_PIPE, + KC_NO, KC_UNDS, KC_PLUS, KC_COMM, _______, KC_SLSH, _______, + KC_RGUI, _______, _______, _______, _______, + _______, KC_NO, + _______, + _______, KC_NO, KC_NO + ), + + [_RAISE] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, _______, + KC_NO, KC_COLN, KC_SCLN, KC_DQT, KC_QUOT, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KC_LGUI, + _______, _______, + _______, + KC_NO, KC_NO, _______, + // right hand + _______, _______, _______, _______, _______, _______, KC_NO, + KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NO, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_NO, + _______, ADJUST, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, KC_NO, + _______, + _______, KC_NO, KC_NO + ), + + [_ADJUST] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + KC_MUTE, KC_VOLD, KC_VOLU, KC_BRID, KC_BRIU, RESET, _______, + _______, _______, _______, _______, KC_LGUI, + _______, _______, + _______, + KC_NO, KC_NO, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, _______, _______, _______, KC_LANG1, KC_LANG2, + _______, _______, _______, _______, _______, + _______, KC_NO, + _______, + _______, KC_NO, KC_NO + ) +}; diff --git a/keyboards/exclusive/e7v1se/config.h b/keyboards/exclusive/e7v1se/config.h index f11a7009204..8784828ed82 100644 --- a/keyboards/exclusive/e7v1se/config.h +++ b/keyboards/exclusive/e7v1se/config.h @@ -192,10 +192,9 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + /* * MIDI options */ diff --git a/keyboards/gergo/keymaps/gotham/config.h b/keyboards/gergo/keymaps/gotham/config.h new file mode 100644 index 00000000000..6393d46f14b --- /dev/null +++ b/keyboards/gergo/keymaps/gotham/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/gergo/keymaps/gotham/keymap.c b/keyboards/gergo/keymaps/gotham/keymap.c new file mode 100644 index 00000000000..ff6df266f20 --- /dev/null +++ b/keyboards/gergo/keymaps/gotham/keymap.c @@ -0,0 +1,155 @@ +/* Good on you for modifying your layout! if you don't have + * time to read the QMK docs, a list of keycodes can be found at + * + * https://github.com/qmk/qmk_firmware/blob/master/docs/keycodes.md + * + * There's also a template for adding new layers at the bottom of this file! + */ + +#include QMK_KEYBOARD_H + +enum layers { + BASE, // default layer + SYMB, // symbols + NUMB, // number/navigation + MOUS, // mouse navigation +}; + +#define KC_ANGL LSFT(KC_COMM) +#define KC_ANGR LSFT(KC_DOT) + +// Blank template at the bottom + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | ESC | Q | W | E | R | T | | Y | U | I | O | P | \ | | + * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------| + * | LShift | A | S | D | F | G | | | VolUp| H | J | K | L | ; : |RSft/' "| + * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------| + * | LCtrl | Z | X | C | V | B | | | VolDn| N | M | , < | . > | / ? |RCtl/- _| + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * .----------. .----------. .-----------. .------. + * | LAlt | |SYMB/Space| | NUMB/Bksp | | MOUS | + * '----------' '----------' `-----------' '------' + * ,-------. ,-------. + * | | |VolMute| + * ,------|-------| |-------|------. + * | NUMB | | | | SYMB | + * | Tab | LGui | | = | Enter| + * | | | | | | + * `--------------' `--------------' + */ +[BASE] = LAYOUT_gergo( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, KC_VOLU, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_QUOT), + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLD, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RCTL, KC_MINS), + KC_LALT, LT(SYMB, KC_SPC), LT(NUMB, KC_TAB), KC_LGUI, KC_EQL, LT(SYMB, KC_ENT), LT(NUMB, KC_BSPC), MO(MOUS) + ), +/* Keymap 1: Symbols layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | # | $ | { | } | | | | < | > | | | | | + * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------| + * | | ! | @ | ( | ) | ` | | | | - | & | + | * | ; | ' " | + * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | _ | | | , | . | / ? | - _ | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * .----------. .----------. .-----. .------. + * | LAlt | |SYMB/Space| | Del | | MOUS | + * '----------' '----------' `-----' '------' + * ,-------. ,-------. + * | | | | + * ,------|-------| |-------|------. + * | NUMB | | | | SYMB | + * | Tab | LGui | | = | Enter| + * | | | | | | + * `--------------' `--------------' + */ +[SYMB] = LAYOUT_gergo( + _______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, XXXXXXX, XXXXXXX, KC_ANGL, KC_ANGR, XXXXXXX, XXXXXXX, KC_PIPE, + _______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_GRV, XXXXXXX, XXXXXXX, KC_MINS, KC_AMPR, KC_PLUS, KC_ASTR, KC_SCLN, KC_QUOT, + _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PIPE, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + _______, _______, _______, _______, _______, _______, KC_DEL, _______ + ), +/* Keymap 2: Pad/Function layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | | | PgUp | LEFT | UP | RIGHT| | | + * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | |PgDown| HOME | DOWN | END | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * .----------. .----------. .-----------. .------. + * | LAlt | |SYMB/Space| | NUMB/Bksp | | MOUS | + * '----------' '----------' `-----------' '------' + * ,-------. ,-------. + * | | | | + * ,------|-------| |-------|------. + * | NUMB | | | | SYMB | + * | Tab | LGui | | = | Enter| + * | | | | | | + * `--------------' `--------------' + */ +[NUMB] = LAYOUT_gergo( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXXXX, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, KC_PGUP, KC_LEFT, KC_UP, KC_RIGHT, XXXXXXX, XXXXXXX, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, KC_HOME, KC_DOWN, KC_END, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* Keymap 3: Mouse layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | | | | M_L | M_U | M_R | M_Clk| | + * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | L_Clk| M_D | R_Clk| | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * .----------. .----------. .-----------. .------. + * | LAlt | |SYMB/Space| | NUMB/Bksp | | MOUS | + * '----------' '----------' `-----------' '------' + * ,-------. ,-------. + * | | | | + * ,------|-------| |-------|------. + * | NUMB | | | | SYMB | + * | Tab | LGui | | = | Enter| + * | | | | | | + * `--------------' `--------------' + */ +[MOUS] = LAYOUT_gergo( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_MS_L, KC_MS_U, KC_MS_R, KC_BTN3, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_BTN1, KC_MS_D, KC_BTN2, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + +/* Keymap template + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | | | | | | | | | | | + * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * .------. .------. .------. .-----. + * | | | | | | | | + * '------' '------' `------. '-----' + * ,-------. ,-------. + * | | | | + * ,------|-------| |-------|------. + * | | | | | | + * | | | | | | + * | | | | | | + * `--------------' `--------------' +[SYMB] = LAYOUT_gergo( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/gergo/keymaps/gotham/readme.md b/keyboards/gergo/keymaps/gotham/readme.md new file mode 100644 index 00000000000..2b1c5ab1dab --- /dev/null +++ b/keyboards/gergo/keymaps/gotham/readme.md @@ -0,0 +1,8 @@ +This is a modified version of the default keymap for Gergo with some changes. + +## Changes: + - Rehaul thumb keys. For my hand size, the L and R thumbs rest on space and backspace, and one finger outward, are tab and enter. + - = has its own dedicated key to facilitate typing "=", which is a very common trigram in programming. + - Change navigation into a T-shaped cluster and add Home and End keys. T-shaped, because it's similar to arrow key cluster and most keys are on the home row, while sharing the number layer. + - Separated mouse navigation into a separate layer (in favor of T-shaped arrows, which require 2 rows). + - Difficult-to-reach key positions are mostly unused. diff --git a/keyboards/gergo/keymaps/gotham/rules.mk b/keyboards/gergo/keymaps/gotham/rules.mk new file mode 100644 index 00000000000..351c5255835 --- /dev/null +++ b/keyboards/gergo/keymaps/gotham/rules.mk @@ -0,0 +1,37 @@ +#---------------------------------------------------------------------------- +# make gergo:germ:dfu +# Make sure you have dfu-programmer installed! +#---------------------------------------------------------------------------- +# Firmware options +BALLER = no # Enable to ball out +BALLSTEP = 20 # Multiple in px to move, multiplied by layer number +SCROLLSTEP = 1 # Lines to scroll with ball +MOUSEKEY_ENABLE = yes # Mouse keys, needed for baller + +#Debug options +VERBOSE = yes +DEBUG_MATRIX_SCAN_RATE = no +DEBUG_BALLER = no +DEBUG_MATRIX = yes + +# A bunch of stuff that you shouldn't touch unless you +# know what you're doing. +# +# No touchy, capiche? +SRC += matrix.c i2c_master.c +ifneq ($(strip $(BALLSTEP)),) + OPT_DEFS += -DTRKSTEP=$(strip $(BALLSTEP)) +endif +ifneq ($(strip $(SCROLLSTEP)),) + OPT_DEFS += -DSCROLLSTEP=$(strip $(SCROLLSTEP)) +endif +ifeq ($(strip $(BALLER)), yes) + POINTING_DEVICE_ENABLE = yes + OPT_DEFS += -DBALLER +endif +ifeq ($(strip $(DEBUG_BALLER)), yes) + OPT_DEFS += -DDEBUG_BALLER +endif +ifeq ($(strip $(DEBUG_MATRIX)), yes) + OPT_DEFS += -DDEBUG_MATRIX +endif diff --git a/keyboards/handwired/bdn9_ble/bdn9_ble.c b/keyboards/handwired/bdn9_ble/bdn9_ble.c new file mode 100644 index 00000000000..75fe7fff718 --- /dev/null +++ b/keyboards/handwired/bdn9_ble/bdn9_ble.c @@ -0,0 +1 @@ +#include "bdn9_ble.h" diff --git a/keyboards/handwired/bdn9_ble/bdn9_ble.h b/keyboards/handwired/bdn9_ble/bdn9_ble.h new file mode 100644 index 00000000000..8a451132647 --- /dev/null +++ b/keyboards/handwired/bdn9_ble/bdn9_ble.h @@ -0,0 +1,37 @@ +/* Copyright 2019 Danny Nguyen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + KA1, KA2, KA3, \ + KB1, KB2, KB3, \ + KC1, KC2, KC3 \ +) \ +{ \ + { KA1, KA2, KA3 }, \ + { KB1, KB2, KB3 }, \ + { KC1, KC2, KC3 } \ +} diff --git a/keyboards/handwired/bdn9_ble/config.h b/keyboards/handwired/bdn9_ble/config.h new file mode 100644 index 00000000000..8db9253dd45 --- /dev/null +++ b/keyboards/handwired/bdn9_ble/config.h @@ -0,0 +1,52 @@ +/* +Copyright 2019 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCB10 +#define PRODUCT_ID 0x1134 +#define DEVICE_VER 0x0100 +#define MANUFACTURER KeyPCB/Keebio +#define PRODUCT BDN9-BLE +#define DESCRIPTION 3x3 Bluetooth Macropad + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 3 + +/* Keyboard Matrix Assignments */ +#define DIRECT_PINS { \ + { D1, D0, C6 }, \ + { D7, B5, B6 }, \ + { B7, D6, F7 } \ +} + +#define BACKLIGHT_PIN F6 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 +#define BACKLIGHT_ON_STATE 1 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/handwired/bdn9_ble/info.json b/keyboards/handwired/bdn9_ble/info.json new file mode 100644 index 00000000000..49bf627197f --- /dev/null +++ b/keyboards/handwired/bdn9_ble/info.json @@ -0,0 +1,22 @@ +{ + "keyboard_name": "KeyPCB/Keeb.io BDN9-BLE", + "url": "", + "maintainer": "merlin04", + "width": 3, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2} + ] + } + } +} diff --git a/keyboards/handwired/bdn9_ble/keymaps/default/keymap.c b/keyboards/handwired/bdn9_ble/keymaps/default/keymap.c new file mode 100644 index 00000000000..40684214677 --- /dev/null +++ b/keyboards/handwired/bdn9_ble/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2019 Danny Nguyen + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + + +// Enable test mode, which sets the keys to letters A-I. +//#define TESTMODE + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + #ifndef TESTMODE + // MEH - hold down ctrl, alt, shift, and press key + [0] = LAYOUT( + MEH(KC_1), MEH(KC_2), MEH(KC_3), + MEH(KC_4), MEH(KC_5), MEH(KC_6), + MEH(KC_7), MEH(KC_8), LT(1, MEH(KC_9)) + ), + #else + [0] = LAYOUT( + KC_A, KC_B, KC_C, + KC_D, KC_E, KC_F, + KC_G, KC_H, KC_I + ), + #endif + /* + * ------------------------------------------------------------------------ + * | | Automatic BLE output detection | Reset | + * | Backlight Step | Use USB port for output | | + * | Backlight Tgl | Use Bluetooth for output | (currently pressed) | + * ------------------------------------------------------------------------ + */ + [1] = LAYOUT( + _______, OUT_AUTO, RESET, + BL_STEP, OUT_USB, _______, + BL_TOGG, OUT_BT, _______ + ) +}; diff --git a/keyboards/handwired/bdn9_ble/readme.md b/keyboards/handwired/bdn9_ble/readme.md new file mode 100644 index 00000000000..eaeab59ad87 --- /dev/null +++ b/keyboards/handwired/bdn9_ble/readme.md @@ -0,0 +1,14 @@ +# BDN9-BLE + +![BDN9](https://cdn.shopify.com/s/files/1/1851/5125/products/image_bd8d9423-950e-4aad-bea5-665d896f879a_530x@2x.jpg?v=1547909493) + +A handwired modified version of the Keebio BDN9 macropad to support BLE through the Adafruit Feather 32u4 Bluefruit LE. + +* Keyboard Maintainer: [merlin04/KeyPCB](https://github.com/merlin04) +* Hardware Supported: Adafruit Feather 32u4 Bluefruit LE + +Make example for this keyboard (after setting up your build environment): + + make handwired/bdn9_ble:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/bdn9_ble/rules.mk b/keyboards/handwired/bdn9_ble/rules.mk new file mode 100644 index 00000000000..4fabf1c89d0 --- /dev/null +++ b/keyboards/handwired/bdn9_ble/rules.mk @@ -0,0 +1,37 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency +F_CPU = 8000000 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +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 = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH = AdafruitBLE # Enable Bluetooth +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +ENCODER_ENABLE = no diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/config.h b/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/config.h index 10b96932677..3190132085e 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/config.h @@ -1,7 +1,5 @@ #pragma once -#include "333fred_config.h" - #define USE_SERIAL #define EE_HANDS diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/keymap.c b/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/keymap.c index bc61579de8a..d8ac1910bfc 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/keymap.c +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/keymap.c @@ -1,12 +1,6 @@ #include QMK_KEYBOARD_H #include "333fred.h" -enum custom_macros { - DLEFT, - DRIGHT, - PSCREEN_APP -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_5x6( diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/rules.mk b/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/rules.mk index 79ef33e7c36..6d2e27cb41c 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/rules.mk +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/rules.mk @@ -1,7 +1,3 @@ - -NKRO_ENABLE = yes KEY_LOCK_ENABLE = yes -TAP_DANCE_ENABLE = yes CONSOLE_ENABLE = no -PERMISSIVE_HOLD = yes EXTRAFLAGS += -flto diff --git a/keyboards/handwired/ddg_56/config.h b/keyboards/handwired/ddg_56/config.h new file mode 100644 index 00000000000..de4c94e6590 --- /dev/null +++ b/keyboards/handwired/ddg_56/config.h @@ -0,0 +1,39 @@ +/* Copyright 2019 Spaceman + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xB195 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Spaceman +#define PRODUCT DDG_56 +#define DESCRIPTION DDG_56 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +#define DIODE_DIRECTION COL2ROW + +#define MATRIX_ROW_PINS { B5, B15, B9, B10, A14 } +#define MATRIX_COL_PINS { A2, B8, B13, B14, B4, B11, B12, A13, A15, A8, A7, A6, B0, B1 } + +#define QMK_SPEAKER A5 + +#define ENCODERS_PAD_A { A1, B3 } +#define ENCODERS_PAD_B { A0, B2 } diff --git a/keyboards/handwired/ddg_56/ddg_56.c b/keyboards/handwired/ddg_56/ddg_56.c new file mode 100644 index 00000000000..5d24bc74b55 --- /dev/null +++ b/keyboards/handwired/ddg_56/ddg_56.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Spaceman + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "ddg_56.h" \ No newline at end of file diff --git a/keyboards/handwired/ddg_56/ddg_56.h b/keyboards/handwired/ddg_56/ddg_56.h new file mode 100644 index 00000000000..dd0c78bea0b --- /dev/null +++ b/keyboards/handwired/ddg_56/ddg_56.h @@ -0,0 +1,32 @@ +/* Copyright 2019 Spaceman + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k1D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k2D, k3D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k4B, \ + k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4C, k4D \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ + { k30, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D } \ +} diff --git a/keyboards/handwired/ddg_56/info.json b/keyboards/handwired/ddg_56/info.json new file mode 100644 index 00000000000..1b0509b0ec3 --- /dev/null +++ b/keyboards/handwired/ddg_56/info.json @@ -0,0 +1,17 @@ +{ + "keyboard_name": "ddg_56", + "url": "", + "maintainer": "spaceman", + "width": 16.5, + "height": 5.25, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0.25}, {"x":1.25, "y":0}, {"x":2.25, "y":0}, {"x":3.25, "y":0}, {"x":4.25, "y":0}, {"x":5.25, "y":0}, {"x":6.25, "y":0}, {"x":7.25, "y":0}, {"x":8.25, "y":0}, {"x":9.25, "y":0}, {"x":10.25, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":14, "y":1}, {"x":15, "y":1}, + {"x":0, "y":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}, {"x":12.25, "y":1}, {"x":14, "y":2}, {"x":15, "y":2}, + {"x":0, "y":2.25}, {"x":1.25, "y":2}, {"x":2.25, "y":2}, {"x":3.25, "y":2}, {"x":4.25, "y":2}, {"x":5.25, "y":2}, {"x":6.25, "y":2}, {"x":7.25, "y":2}, {"x":8.25, "y":2}, {"x":9.25, "y":2}, {"x":10.25, "y":2}, {"x":11.25, "y":2}, {"x":12.25, "y":2}, + {"x":0, "y":3.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}, + {"x":14.5, "y":3.25}, {"x":1.3333, "y":4, "w":1.5}, {"x":2.8333, "y":4}, {"x":3.8333, "y":4, "w":1.25}, {"x":5.0833, "y":4}, {"x":6.0833, "y":4, "w":2.25}, {"x":8.3333, "y":4}, {"x":9.3333, "y":4, "w":1.25}, {"x":10.5833, "y":4}, {"x":11.5833, "y":4, "w":1.5}, {"x":13.5, "y":4.25}, {"x":14.5, "y":4.25}, {"x":15.5, "y":4.25}] + } + } +} diff --git a/keyboards/handwired/ddg_56/keymaps/default/keymap.c b/keyboards/handwired/ddg_56/keymaps/default/keymap.c new file mode 100644 index 00000000000..fd0f2a25728 --- /dev/null +++ b/keyboards/handwired/ddg_56/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +#include QMK_KEYBOARD_H +enum layers { + _DEFAULT, + _LOWER, + _RAISE +}; + +#define LOWER LT(2,KC_BSPC) +#define RAISE LT(1,KC_ENT) +#define KC_DSPACE SFT_T(KC_SPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_DEFAULT] = LAYOUT( + KC_HOME, 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_MINS, KC_EQL, + KC_PGUP, 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_LBRC, KC_RBRC, + KC_PGDN, 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_END, 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_UP, + KC_LCTL, KC_LGUI, KC_LALT, RAISE, KC_DSPACE, LOWER, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [_RAISE] = LAYOUT( + KC_HOME, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, KC_PGUP, KC_HOME, + KC_PGUP, KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS, KC_PGDN, KC_END, + KC_PGDN, 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_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_UP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT), + + [_LOWER] = LAYOUT( + RESET, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MSTP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT) + +}; diff --git a/keyboards/handwired/ddg_56/readme.md b/keyboards/handwired/ddg_56/readme.md new file mode 100644 index 00000000000..de4277c00a0 --- /dev/null +++ b/keyboards/handwired/ddg_56/readme.md @@ -0,0 +1,9 @@ +# DDG-56 + +* Keyboard Maintainer: [Rionlion100](https://github.com/rionlion100) + +Make example for this keyboard (after setting up your build environment): + + make handwired/ddg_56:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/ddg_56/rules.mk b/keyboards/handwired/ddg_56/rules.mk new file mode 100644 index 00000000000..0604f117639 --- /dev/null +++ b/keyboards/handwired/ddg_56/rules.mk @@ -0,0 +1,17 @@ +# MCU name +MCU = STM32F303 + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = no # Unicode \ No newline at end of file diff --git a/keyboards/handwired/fc200rt_qmk/config.h b/keyboards/handwired/fc200rt_qmk/config.h new file mode 100644 index 00000000000..12c40360b1b --- /dev/null +++ b/keyboards/handwired/fc200rt_qmk/config.h @@ -0,0 +1,133 @@ +/* +Copyright 2020 NaCly + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xBEEF +#define PRODUCT_ID 0xFFFF +#define DEVICE_VER 0x0001 +#define MANUFACTURER NaCly +#define PRODUCT fc200rt_qmk +#define DESCRIPTION Leopold FC200RT QMK enbabled with Teensy 2.0 + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 16 + +#define MATRIX_ROW_PINS { B0, B1, B2, B3, E6, B7, D0, D1 } +#define MATRIX_COL_PINS { D2, D3, C6, C7, D5, D4, D6, D7, B4, B5, B6, F7, F6, F5, F4, F1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 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 */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* 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_HELP H +//#define MAGIC_KEY_HELP_ALT 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 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#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 B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/handwired/fc200rt_qmk/fc200rt_qmk.c b/keyboards/handwired/fc200rt_qmk/fc200rt_qmk.c new file mode 100644 index 00000000000..3e38e5e2fd2 --- /dev/null +++ b/keyboards/handwired/fc200rt_qmk/fc200rt_qmk.c @@ -0,0 +1,17 @@ +/* Copyright 2020 NaCly + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "fc200rt_qmk.h" diff --git a/keyboards/handwired/fc200rt_qmk/fc200rt_qmk.h b/keyboards/handwired/fc200rt_qmk/fc200rt_qmk.h new file mode 100644 index 00000000000..f9abbf38357 --- /dev/null +++ b/keyboards/handwired/fc200rt_qmk/fc200rt_qmk.h @@ -0,0 +1,46 @@ +/* Copyright 2020 NaCly + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k31, k62, k63, k13, k33, k70, k36, k17, k67, k6A, k7A, k3A, k5A, k79, k09, k00, \ + k61, k71, k72, k73, k74, k64, k65, k75, k76, k77, k78, k68, k66, k1A, k6C, k6E, k6D, \ + k11, k01, k02, k03, k04, k14, k15, k05, k06, k07, k08, k18, k16, k2A, k6B, k7E, k7D, \ + k12, k21, k22, k23, k24, k34, k35, k25, k26, k27, k28, k38, k4A, \ + k1F, k41, k42, k43, k44, k54, k55, k45, k46, k47, k58, k2F, k3E, \ + k60, k10, k39, k3B, k59, k29, k57, k40, k5E, k5B, k5C \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, KC_NO, k1A, KC_NO, KC_NO, KC_NO, KC_NO, k1F }, \ + { KC_NO, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, KC_NO, KC_NO, KC_NO, KC_NO, k2F }, \ + { KC_NO, k31, KC_NO, k33, k34, k35, k36, KC_NO, k38, k39, k3A, k3B, KC_NO, KC_NO, k3E, KC_NO }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, KC_NO, KC_NO, k4A, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, k54, k55, KC_NO, k57, k58, k59, k5A, k5B, k5C, KC_NO, k5E, KC_NO }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, KC_NO, k6A, k6B, k6C, k6D, k6E, KC_NO }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7A, KC_NO, KC_NO, k7D, k7E, KC_NO }, \ +} diff --git a/keyboards/handwired/fc200rt_qmk/info.json b/keyboards/handwired/fc200rt_qmk/info.json new file mode 100644 index 00000000000..2a8bf3dd9f7 --- /dev/null +++ b/keyboards/handwired/fc200rt_qmk/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "fc200rt_qmk", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] + } + } +} \ No newline at end of file diff --git a/keyboards/handwired/fc200rt_qmk/keymaps/default/keymap.c b/keyboards/handwired/fc200rt_qmk/keymaps/default/keymap.c new file mode 100644 index 00000000000..eb72c08d62e --- /dev/null +++ b/keyboards/handwired/fc200rt_qmk/keymaps/default/keymap.c @@ -0,0 +1,28 @@ +/* Copyright 2019 NaCly + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ) + +}; \ No newline at end of file diff --git a/keyboards/handwired/fc200rt_qmk/readme.md b/keyboards/handwired/fc200rt_qmk/readme.md new file mode 100644 index 00000000000..6490227806a --- /dev/null +++ b/keyboards/handwired/fc200rt_qmk/readme.md @@ -0,0 +1,35 @@ +# fc200rt_qmk + +![fc200rt_qmk](https://i.imgur.com/UWKdIcZ.jpg) +![fc200rt_qmk](https://i.imgur.com/0d8U8NE.jpg) +A Leopold FC200RT rewired with Teensy 2.0 + +Uses original row and column matrix, so you can wire the teensy 2.0 to the corrosposnding column and row numbers and flash this firmware to the teensy. + +Pinout of Leopold's matrix: + +| | c0 | c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 | c10 | c11 | c12 | c13 | c14 | c15 | +|----|------|-----|------|----|----|----|------|-----|------|------|------|------|------|------|------|------| +| r0 | PAUS | Q | W | E | R | U | I | O | P | SLCK | | | | | | | +| r1 | LGUI | TAB | CAPS | F3 | T | Y | RBRC | F7 | LBRC | | BSPC | | | | | LSFT | +| r2 | | A | | D | F | J | K | L | SCLN | RGUI | BSLS | | | | | RSFT | +| r3 | | ESC | X | F4 | G | H | F6 | | QUOT | LALT | F11 | SPC | | | UP | | +| r4 | | Z | | C | V | M | COMM | DOT | | | ENT | | | | | | +| r5 | | | | | B | N | | APP | SLSH | RALT | F12 | DOWN | RGHT | | LEFT | | +| r6 | LCTL | GRV | F1 | F2 | 5 | 6 | EQL | F8 | MINS | | F9 | DEL | INS | PGUP | HOME | | +| r7 | F5 | 1 | 2 | 3 | 4 | 7 | 8 | 9 | 0 | PSCR | F10 | | | PGDN | END | | +| | | | | | | | | | | | | | | | | | + +Choose any key from the corrosponding row and column and solder it to the pin on the Teensy listed in the firmware config.h + +_NOTE: Some of the keys had mislabled columns and rows, so make sure the columns are all connected without diodes to one another, and that the rows are soldered after the diode_ + +* Keyboard Maintainer: [NaCly](https://github.com/Na-Cly) +* Hardware Supported: The PCBs, controllers supported +* Hardware Availability: Leopold FC200RT + Teensy 2.0 + +Make example for this keyboard (after setting up your build environment): + + make handwired/fc200rt_qmk:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/fc200rt_qmk/rules.mk b/keyboards/handwired/fc200rt_qmk/rules.mk new file mode 100644 index 00000000000..8ef9dbd6c38 --- /dev/null +++ b/keyboards/handwired/fc200rt_qmk/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +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 +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/handwired/floorboard/config.h b/keyboards/handwired/floorboard/config.h index 6f2e9d0c0bd..bf8646f39af 100644 --- a/keyboards/handwired/floorboard/config.h +++ b/keyboards/handwired/floorboard/config.h @@ -192,10 +192,9 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + /* * MIDI options */ diff --git a/keyboards/handwired/jotpad16/config.h b/keyboards/handwired/jotpad16/config.h index 075f9649c77..dc6bb795939 100644 --- a/keyboards/handwired/jotpad16/config.h +++ b/keyboards/handwired/jotpad16/config.h @@ -16,13 +16,14 @@ /* pro_micro pin-out */ #define MATRIX_ROW_PINS { B6, B2, D2, D3 } -#define MATRIX_COL_PINS { B5, B4, B3, B1 } +#define MATRIX_COL_PINS { E6, D7, B3, B1 } #define UNUSED_PINS /* leds */ -#define QMK_LED E6 -#define BACKLIGHT_LEVELS 3 -#define BACKLIGHT_PIN D7 +#define JOTPAD16_LEDS +#define JOTPAD16_LED1 B5 +#define JOTPAD16_LED2 B4 +#define QMK_LED B5 /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/jotpad16/jotpad16.c b/keyboards/handwired/jotpad16/jotpad16.c index 512234b9177..2f112a6101d 100644 --- a/keyboards/handwired/jotpad16/jotpad16.c +++ b/keyboards/handwired/jotpad16/jotpad16.c @@ -4,3 +4,10 @@ void matrix_init_kb(void) { matrix_init_user(); } + +void keyboard_pre_init_kb() { + setPinOutput(JOTPAD16_LED1); + setPinOutput(JOTPAD16_LED2); + + keyboard_pre_init_user(); +} diff --git a/keyboards/handwired/jotpad16/readme.md b/keyboards/handwired/jotpad16/readme.md index 3d971a51548..c8773cf1833 100644 --- a/keyboards/handwired/jotpad16/readme.md +++ b/keyboards/handwired/jotpad16/readme.md @@ -1,7 +1,5 @@ # JotPad16 -![JotPad16](https://i.imgur.com/RwmqWuS.jpg) - A ortholinear keypad (4x4) made by jotix. Keyboard Maintainer: [jotix](https://github.com/jotix) @@ -16,13 +14,13 @@ Hardware Supported: Arduino Pro Micro | columns | 0 | 1 | 2 | 3 | |-------------|----|----|----|----| -| arduino pin | 9 | 8 | 14 | 15 | -| qmk pin | B5 | B4 | B3 | C3 | +| arduino pin | 7 | 6 | 14 | 15 | +| qmk pin | E6 | D7 | B3 | C3 | -| | QMK led | Backlight | -|-------------|-----------|-----------| -| Arduino pin | 7 | 6 | -| qmk pin | E6 | D7 | +| | LED1 | LED2 | +|-------------|------|------| +| Arduino pin | 9 | 8 | +| QMK pin | B5 | B4 | ### Compiling the Firmware @@ -32,8 +30,12 @@ Make example for this keyboard (after setting up your build environment): ### The Default Keymap -![Default Keymap](https://i.imgur.com/VJZcFRN.jpg) +| 7 | 8 | 9 | - | +|---|---|---|---| +| 4 | 5 | 6 | + | +|---|---|---|---| +| 1 | 2 | 3 |ent| +|---|---|---|---| +| 0 | . | / | * | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). - - diff --git a/keyboards/handwired/jotpad16/rules.mk b/keyboards/handwired/jotpad16/rules.mk index 0c9370f1c1d..79c32c5c352 100644 --- a/keyboards/handwired/jotpad16/rules.mk +++ b/keyboards/handwired/jotpad16/rules.mk @@ -22,7 +22,7 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode diff --git a/keyboards/handwired/jtallbean/split_65/config.h b/keyboards/handwired/jtallbean/split_65/config.h index a2c8d22bf79..5c7a9d54ba0 100644 --- a/keyboards/handwired/jtallbean/split_65/config.h +++ b/keyboards/handwired/jtallbean/split_65/config.h @@ -195,10 +195,9 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + /* * MIDI options */ diff --git a/keyboards/handwired/novem/config.h b/keyboards/handwired/novem/config.h new file mode 100644 index 00000000000..a8c012a45f8 --- /dev/null +++ b/keyboards/handwired/novem/config.h @@ -0,0 +1,60 @@ +/* +Copyright 2020 Jose I. Martinez + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Jose I. Martinez +#define PRODUCT novem +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 3 + +/* + * 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, B4, B5 } +#define MATRIX_COL_PINS { B3, B2, B6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + + + diff --git a/keyboards/handwired/novem/info.json b/keyboards/handwired/novem/info.json new file mode 100644 index 00000000000..df0b6932010 --- /dev/null +++ b/keyboards/handwired/novem/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "novem", + "url": "", + "maintainer": "Jose I. Martinez", + "width": 3, + "height": 2, + "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, "w":1.5}, + {"label":"k12", "x":1.5, "y":1, "w":1.5} + ] + } + } +} diff --git a/keyboards/handwired/novem/keymaps/default/keymap.c b/keyboards/handwired/novem/keymaps/default/keymap.c new file mode 100644 index 00000000000..ca6f3188826 --- /dev/null +++ b/keyboards/handwired/novem/keymaps/default/keymap.c @@ -0,0 +1,77 @@ +/* Copyright 2020 Jose I. Martinez + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + GITSTTS = SAFE_RANGE, + GITPULL, + GITPUSH, + GITCOM +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT( + KC_ESCAPE, KC_HOME, KC_DEL, + MO(_FN) , KC_UP , KC_ENTER, + KC_LEFT , KC_DOWN, KC_RIGHT + ), + [_FN] = LAYOUT( + KC_TRNS, GITCOM, GITPUSH, + KC_TRNS, GITSTTS, GITPULL, + KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case GITSTTS: + if (record->event.pressed) { + // when keycode GITSTTS is pressed + SEND_STRING("git status"); + } + break; + case GITPULL: + if (record->event.pressed) { + // when keycode GITPULL is pressed + SEND_STRING("git pull"); + } + break; + case GITPUSH: + if (record->event.pressed) { + // when keycode GITPUSH is pressed + SEND_STRING("git push"); + } + break; + case GITCOM: + if (record->event.pressed) { + // when keycode GITCOM is pressed + SEND_STRING("git commit -m "); + } + break; + default: + return true; + } + return true; +} + diff --git a/keyboards/handwired/novem/keymaps/default/readme.md b/keyboards/handwired/novem/keymaps/default/readme.md new file mode 100644 index 00000000000..0f833a09d32 --- /dev/null +++ b/keyboards/handwired/novem/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for novem diff --git a/keyboards/handwired/novem/novem.c b/keyboards/handwired/novem/novem.c new file mode 100644 index 00000000000..967ec828f09 --- /dev/null +++ b/keyboards/handwired/novem/novem.c @@ -0,0 +1,18 @@ +/* Copyright 2020 Jose I. Martinez + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "novem.h" + diff --git a/keyboards/handwired/novem/novem.h b/keyboards/handwired/novem/novem.h new file mode 100644 index 00000000000..b1040094e0f --- /dev/null +++ b/keyboards/handwired/novem/novem.h @@ -0,0 +1,31 @@ +/* Copyright 2020 Jose I. Martinez + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" + + +#define LAYOUT( \ + k00, k01, k02, \ + k03, k04, k05, \ + k06, k07, k08 \ +) \ +{ \ + { k00, k01, k02 }, \ + { k03, k04, k05 }, \ + { k06, k07, k08 }, \ +} diff --git a/keyboards/handwired/novem/readme.md b/keyboards/handwired/novem/readme.md new file mode 100644 index 00000000000..c259c2cb828 --- /dev/null +++ b/keyboards/handwired/novem/readme.md @@ -0,0 +1,16 @@ +# novem + +![novem](https://i.imgur.com/nPjBE9b.jpg) + +A short description of the keyboard/project + +* Keyboard Maintainer: [Jose I. Martinez](https://github.com/mechanicalguy21) +* Hardware Supported: This is a handwired keyboard created over a 3d printed case. +STL will be shared soon. +* Hardware Availability: STL files will be shared soon. + +Make example for this keyboard (after setting up your build environment): + + make handwired/novem:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/novem/rules.mk b/keyboards/handwired/novem/rules.mk new file mode 100644 index 00000000000..3891651f3b0 --- /dev/null +++ b/keyboards/handwired/novem/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +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 +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/handwired/p1800fl/config.h b/keyboards/handwired/p1800fl/config.h new file mode 100644 index 00000000000..c2022a6b27c --- /dev/null +++ b/keyboards/handwired/p1800fl/config.h @@ -0,0 +1,72 @@ +/* +Copyright 2020 marhalloweenvt + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3EAE +#define DEVICE_VER 0x0001 +#define MANUFACTURER marhalloweenvt +#define PRODUCT p1800fl +#define DESCRIPTION A compact 1800 layout keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B6, B5, B4, D7, D6, D4 } +#define MATRIX_COL_PINS { C7, F7, F6, F5, F4, F1, F0, E6, B0, B1, B2, B3, D0, D1, D2} +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 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 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* QMK DFU key configuration */ +#define QMK_ESC_OUTPUT C7 // usually COL +#define QMK_ESC_INPUT B6 // usually ROW \ No newline at end of file diff --git a/keyboards/handwired/p1800fl/info.json b/keyboards/handwired/p1800fl/info.json new file mode 100644 index 00000000000..1509b59d96a --- /dev/null +++ b/keyboards/handwired/p1800fl/info.json @@ -0,0 +1,99 @@ +{ + "keyboard_name": "p1800fl", + "url": "", + "maintainer": "marhalloweenvt", + "width": 19.5, + "height": 5.25, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"@", "x":2, "y":0}, + {"label":"#", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0}, + {"label":"Backspace", "x":14, "y":0}, + {"label":"Num Lock", "x":15.5, "y":0}, + {"label":"/", "x":16.5, "y":0}, + {"label":"*", "x":17.5, "y":0}, + {"label":"-", "x":18.5, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"7", "x":15.5, "y":1}, + {"label":"8", "x":16.5, "y":1}, + {"label":"9", "x":17.5, "y":1}, + {"label":"+", "x":18.5, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"\"", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2}, + {"label":"Enter", "x":13.75, "y":2, "w":1.25}, + {"label":"4", "x":15.5, "y":2}, + {"label":"5", "x":16.5, "y":2}, + {"label":"6", "x":17.5, "y":2}, + {"label":"+", "x":18.5, "y":2}, + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"Shift", "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":"1", "x":15.5, "y":3}, + {"label":"2", "x":16.5, "y":3}, + {"label":"3", "x":17.5, "y":3}, + {"label":"Enter", "x":18.5, "y":3}, + {"label":"Up", "x":14.25, "y":3.25}, + {"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}, + {"label":"6.25x", "x":3.75, "y":4, "w":6.25}, + {"label":"Ctrl", "x":10, "y":4}, + {"label":"Win", "x":11, "y":4}, + {"label":"Alt", "x":12, "y":4}, + {"label":"0", "x":16.5, "y":4}, + {"label":".", "x":17.5, "y":4}, + {"label":"Enter", "x":18.5, "y":4}, + {"label":"Left", "x":13.25, "y":4.25}, + {"label":"Down", "x":14.25, "y":4.25}, + {"label":"Right", "x":15.25, "y":4.25} + ] + } + } +} diff --git a/keyboards/handwired/p1800fl/keymaps/default/keymap.c b/keyboards/handwired/p1800fl/keymaps/default/keymap.c new file mode 100644 index 00000000000..03b6a1efd0c --- /dev/null +++ b/keyboards/handwired/p1800fl/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2020 marhalloweenvt + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = 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_NLCK, KC_PSLS, KC_PAST, KC_PEQL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, + 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_P4, KC_P5, KC_P6, KC_PPLS, + 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_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + ), + [_FN] = 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, BL_TOGG, BL_INC, KC_PAST, RESET, + _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, BL_BRTG, BL_DEC, _______, EEP_RST, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/handwired/p1800fl/keymaps/default/readme.md b/keyboards/handwired/p1800fl/keymaps/default/readme.md new file mode 100644 index 00000000000..268d3992248 --- /dev/null +++ b/keyboards/handwired/p1800fl/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for p1800fl diff --git a/keyboards/handwired/p1800fl/p1800fl.c b/keyboards/handwired/p1800fl/p1800fl.c new file mode 100644 index 00000000000..e0fc16a5e7d --- /dev/null +++ b/keyboards/handwired/p1800fl/p1800fl.c @@ -0,0 +1,28 @@ +/* Copyright 2020 marhalloweenvt + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "p1800fl.h" + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(D3, led_state.num_lock); + writePin(D5, led_state.caps_lock); + writePin(C6, led_state.scroll_lock); + } + return res; +} + diff --git a/keyboards/handwired/p1800fl/p1800fl.h b/keyboards/handwired/p1800fl/p1800fl.h new file mode 100644 index 00000000000..7b8f3dcffde --- /dev/null +++ b/keyboards/handwired/p1800fl/p1800fl.h @@ -0,0 +1,42 @@ +/* Copyright 2020 marhalloweenvt + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k50, k51, k52, k53, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k54, k55, k56, k57, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k58, k59, k5a, k5b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k5c, k5d, k5e, k4e, \ + k40, k41, k42, k43, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO }, \ + { k40, k41, k42, k43, KC_NO, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, k5c, k5d, k5e }, \ +} diff --git a/keyboards/handwired/p1800fl/readme.md b/keyboards/handwired/p1800fl/readme.md new file mode 100644 index 00000000000..545bd691a42 --- /dev/null +++ b/keyboards/handwired/p1800fl/readme.md @@ -0,0 +1,15 @@ +# p1800fl + +![p1800fl](https://i.imgur.com/GQd28rN.jpg) + +A 1800 Frow-less keyboard project from our local makers. + +* Keyboard Maintainer: [marhalloweenvt](https://github.com/marhalloweenvt) +* Hardware Supported: p1800fl +* Hardware Availability: p1800fl + +Make example for this keyboard (after setting up your build environment): + + make handwired/p1800fl:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/p1800fl/rules.mk b/keyboards/handwired/p1800fl/rules.mk new file mode 100644 index 00000000000..b8601f0f105 --- /dev/null +++ b/keyboards/handwired/p1800fl/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = qmk-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +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 +HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/handwired/sick68/config.h b/keyboards/handwired/sick68/config.h index 3d7d413fa19..9f050c361e9 100644 --- a/keyboards/handwired/sick68/config.h +++ b/keyboards/handwired/sick68/config.h @@ -194,10 +194,9 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE -# define NO_ACTION_MACRO -# define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + /* * MIDI options */ diff --git a/keyboards/handwired/slash/rules.mk b/keyboards/handwired/slash/rules.mk index 4aba5bdeb9a..092115db127 100644 --- a/keyboards/handwired/slash/rules.mk +++ b/keyboards/handwired/slash/rules.mk @@ -5,6 +5,13 @@ MCU = atmega32u4 F_CPU = 8000000 # Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = caterina # Build Options diff --git a/keyboards/handwired/videowriter/config.h b/keyboards/handwired/videowriter/config.h index d392564eb9e..bcf059b62b3 100644 --- a/keyboards/handwired/videowriter/config.h +++ b/keyboards/handwired/videowriter/config.h @@ -130,10 +130,8 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 diff --git a/keyboards/handwired/xealousbrown/README.md b/keyboards/handwired/xealousbrown/README.md index e6092ebb059..970f9444c43 100644 --- a/keyboards/handwired/xealousbrown/README.md +++ b/keyboards/handwired/xealousbrown/README.md @@ -7,5 +7,11 @@ https://sites.google.com/site/xaelous/keyboards/handwired-keyboard Make example for this keyboard (after setting up your build environment): - make handwired/xealous-brown:default + make handwired/xealousbrown:default + +The brief list of speedhacks to make this keyboard blazing fast: +1) bit-bash implementation of scanning rows, columns. Very short delay between pin waiting. +2) Compiling with a few extra flags +3) Eager-per-key Debouncing algorithm (no 5ms delay before message is sent) +4) 1000hz polling diff --git a/keyboards/handwired/xealousbrown/config.h b/keyboards/handwired/xealousbrown/config.h index 17aa6c94ee5..bf15637a4d1 100644 --- a/keyboards/handwired/xealousbrown/config.h +++ b/keyboards/handwired/xealousbrown/config.h @@ -29,7 +29,10 @@ along with this program. If not, see . /* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 13 - +#define DEBOUNCE 10 +#define USB_POLLING_INTERVAL_MS 1 +/* layer optimization */ +#define LAYER_STATE_8BIT /* * Keyboard Matrix Assignments * diff --git a/keyboards/handwired/xealousbrown/keymaps/default/keymap.c b/keyboards/handwired/xealousbrown/keymaps/default/keymap.c index 6597c56673e..908e54133c0 100644 --- a/keyboards/handwired/xealousbrown/keymaps/default/keymap.c +++ b/keyboards/handwired/xealousbrown/keymaps/default/keymap.c @@ -10,8 +10,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [1] = LAYOUT( /* FN_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, \ - KC_CAPS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK,KC_PAUS,\ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_DEL, KC_TRNS, \ + KC_CAPS, KC_PGUP, KC_UP, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK,KC_PAUS,\ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_HOME, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_DEL, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL \ ) diff --git a/keyboards/handwired/xealousbrown/matrix.c b/keyboards/handwired/xealousbrown/matrix.c new file mode 100644 index 00000000000..cce0d06ebb8 --- /dev/null +++ b/keyboards/handwired/xealousbrown/matrix.c @@ -0,0 +1,112 @@ +/* +Copyright 2019 Alex Ong + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 "wait.h" +#include "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" + +/* matrix state(1:on, 0:off) */ +extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values +extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values + +// matrix code +// super fast read_cols code. +static matrix_row_t read_cols(void) { + return (PINC & (1 << 6) ? 0 : (1UL << 0)) | + (PIND & (1 << 7) ? 0 : (1UL << 1)) | + (PINE & (1 << 6) ? 0 : (1UL << 2)) | + (PINB & (1 << 4) ? 0 : (1UL << 3)) | + (PINB & (1 << 5) ? 0 : (1UL << 4)) | + (PINB & (1 << 6) ? 0 : (1UL << 5)) | + (PINB & (1 << 2) ? 0 : (1UL << 6)) | + (PINB & (1 << 3) ? 0 : (1UL << 7)) | + (PINB & (1 << 1) ? 0 : (1UL << 8)) | + (PINF & (1 << 7) ? 0 : (1UL << 9)) | + (PINF & (1 << 6) ? 0 : (1UL << 10)) | + (PINF & (1 << 5) ? 0 : (1UL << 11)) | + (PINF & (1 << 4) ? 0 : (1UL << 12)); +} + +static void unselect_rows(void) { + DDRD &= ~0b00011111; + PORTD &= ~0b00011111; +} + +static void select_row(uint8_t row) { + switch (row) { + case 0: + DDRD |= (1 << 3); + PORTD &= ~(1 << 3); + break; + case 1: + DDRD |= (1 << 2); + PORTD &= ~(1 << 2); + break; + case 2: + DDRD |= (1 << 1); + PORTD &= ~(1 << 1); + break; + case 3: + DDRD |= (1 << 0); + PORTD &= ~(1 << 0); + break; + case 4: + DDRD |= (1 << 4); + PORTD &= ~(1 << 4); + break; + } +} + +static void init_pins(void) { + DDRC &= ~(1 << 6); + PORTC |= (1 << 6); + DDRD &= ~(1 << 7); + PORTD |= (1 << 7); + DDRE &= ~(1 << 6); + PORTE |= (1 << 6); + DDRB &= ~(1 << 4 | 1 << 5 | 1 << 6 | 1 << 2 | 1 << 3 | 1 << 1); + PORTB |= (1 << 4 | 1 << 5 | 1 << 6 | 1 << 2 | 1 << 3 | 1 << 1); + DDRF &= ~(1 << 7 | 1 << 6 | 1 << 5 | 1 << 4); + PORTF |= (1 << 7 | 1 << 6 | 1 << 5 | 1 << 4); +} + +// Only need to init the pins. Debounce / raw matrix are initialized already for us. +void matrix_init_custom(void) { + // initialize key pins + init_pins(); +} + +// Only need to scan the result into current_matrix, and return changed. +uint8_t matrix_scan_custom(matrix_row_t current_matrix[]) { + bool changed = false; + + // Set row, read cols + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { + select_row(current_row); + asm volatile("nop"); + asm volatile("nop"); + matrix_row_t cols = read_cols(); + changed |= (current_matrix[current_row] != cols); + current_matrix[current_row] = cols; + unselect_rows(); + } + + return changed; +} diff --git a/keyboards/handwired/xealousbrown/rules.mk b/keyboards/handwired/xealousbrown/rules.mk index c346ef6c988..88766358006 100644 --- a/keyboards/handwired/xealousbrown/rules.mk +++ b/keyboards/handwired/xealousbrown/rules.mk @@ -14,17 +14,27 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -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 +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +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 +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 +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 +SPACE_CADET_ENABLE = no # Unneeded feature. + + +# special sauce for this keyboard +DEBOUNCE_TYPE = eager_pk # Debounce using eager_pk. +CUSTOM_MATRIX = lite # Custom matrix that polls at 7000hz instead of a measly 2000hz. +LTO_ENABLE = yes # smaller binary +SRC += matrix.c + +# Also remember to open tmk's rules.mk and set compilation optimization to 3 diff --git a/keyboards/handwired/xealousbrown/xealousbrown.c b/keyboards/handwired/xealousbrown/xealousbrown.c index 5c8e2fb18a5..39def8ade43 100644 --- a/keyboards/handwired/xealousbrown/xealousbrown.c +++ b/keyboards/handwired/xealousbrown/xealousbrown.c @@ -6,3 +6,44 @@ void matrix_init_kb(void) { matrix_init_user(); } + + + +#ifdef BENCHMARK_MATRIX +# include "timer.h" +# include +# include +# include "wait.h" +# include "util.h" +# include "matrix.h" +# include "quantum.h" + +static int scans = 0; +static uint16_t last_print_out = 0; +static int last_timer = 0; +void matrix_scan_user(void) { + scans++; + uint16_t timer = timer_read(); + + if (timer != last_timer && timer != last_timer + 1) { + print("MS:\n"); + print_dec(timer); + print("->"); + print_dec(last_timer); + print("\n"); + } + + last_timer = timer; + if ((timer % 1000 == 0) && (timer != last_print_out)) { + print("Benchmark:"); + print("\n"); + print_dec(timer); + print("\n"); + print_dec(scans); + print("\n"); + print("-------"); + scans = 0; + last_print_out = timer; + } +} +#endif diff --git a/keyboards/hineybush/hbcp/config.h b/keyboards/hineybush/hbcp/config.h index 8a5b96ec367..4f3f2a1cd6b 100644 --- a/keyboards/hineybush/hbcp/config.h +++ b/keyboards/hineybush/hbcp/config.h @@ -45,8 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, F1, F2, F3, F4, F5, F6, F7, A0, A1, A2, A3, A4, A5, B5, B4, B3, B2 } #define UNUSED_PINS -/* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION COL2ROW +#define DIODE_DIRECTION EITHERWAY #define BACKLIGHT_PIN B7 #define BACKLIGHT_BREATHING diff --git a/keyboards/hineybush/hbcp/matrix.c b/keyboards/hineybush/hbcp/matrix.c new file mode 100644 index 00000000000..d493a7e9ef6 --- /dev/null +++ b/keyboards/hineybush/hbcp/matrix.c @@ -0,0 +1,139 @@ +/* +Copyright 2012-2020 Jun Wako, Jack Humbert, Yiancar, Ein Terakawa, Drashna, Josh Hinnebusch + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" + +static const pin_t row_pins[] = MATRIX_ROW_PINS; +static const pin_t col_pins[] = MATRIX_COL_PINS; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t last_matrix[MATRIX_ROWS]; // raw values of last scan + +// matrix code + + void select_row(uint8_t row) { + setPinOutput(row_pins[row]); + writePinLow(row_pins[row]); +} + + void unselect_row(uint8_t row) { setPinInputHigh(row_pins[row]); } + + bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + matrix_io_delay(); + + // For each col... + for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + // Select the col pin to read (active low) + uint8_t pin_state = readPin(col_pins[col_index]); + + // Populate the matrix row with the state of the col pin + current_matrix[current_row] |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); + } + + // Unselect row + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); +} + + void select_col(uint8_t col) { + setPinOutput(col_pins[col]); + writePinLow(col_pins[col]); +} + + void unselect_col(uint8_t col) { setPinInputHigh(col_pins[col]); } + + bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) { + bool matrix_changed = false; + + // Select col and wait for col selecton to stabilize + select_col(current_col); + matrix_io_delay(); + + // For each row... + for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[row_index]; + + // Check row pin state + if (readPin(row_pins[row_index]) == 0) { + // Pin LO, set col bit + current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) { + matrix_changed = true; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + + void unselect_rows(void) { + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_pins[x]); + } +} + + void unselect_cols(void) { + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } +} + + void init_pins(void) { + unselect_rows(); + unselect_cols(); +} + +void matrix_init_custom(void) { + // initialize key pins + init_pins(); +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool changed = false; + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { + last_matrix[current_row] = current_matrix[current_row]; + read_cols_on_row(current_matrix, current_row); + } + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { + read_rows_on_col(current_matrix, current_col); + } + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { + if (last_matrix[current_row] != current_matrix[current_row]) { + changed = true; + } + } + return (uint8_t)changed; +} diff --git a/keyboards/hineybush/hbcp/rules.mk b/keyboards/hineybush/hbcp/rules.mk index 869fa029c93..1e973bc858e 100644 --- a/keyboards/hineybush/hbcp/rules.mk +++ b/keyboards/hineybush/hbcp/rules.mk @@ -31,3 +31,5 @@ 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 HD44780_ENABLE = no # Enable support for HD44780 based LCDs +CUSTOM_MATRIX = lite +SRC += matrix.c diff --git a/keyboards/hineybush/physix/config.h b/keyboards/hineybush/physix/config.h index cc6e185321e..ccdb18fd212 100644 --- a/keyboards/hineybush/physix/config.h +++ b/keyboards/hineybush/physix/config.h @@ -192,10 +192,9 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + /* * MIDI options */ diff --git a/keyboards/id80/config.h b/keyboards/id80/config.h new file mode 100644 index 00000000000..12ee5400cde --- /dev/null +++ b/keyboards/id80/config.h @@ -0,0 +1,88 @@ +/* +Copyright 2020 Sergey Vlasov + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6964 /* "id" */ +#define PRODUCT_ID 0x0080 +#define DEVICE_VER 0x0001 +#define MANUFACTURER IDOBAO +#define PRODUCT ID80 +#define DESCRIPTION A 75% hotswap keyboard + +/* key matrix size */ +#define MATRIX_ROWS 11 +#define MATRIX_COLS 9 + +/* + * 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) + * + * The matrix description in the vendor-supplied JSON file for kbfirmware.com + * had 12 rows: + * { B7, B3, B2, B1, B0, E6, F0, F1, F4, F5, F6, F7 } + * However, the row 6 was completely empty, and the pin F0 was not actually + * routed anywhere on the PCB, therefore this row was removed to save some + * resources (the EEPROM space for dynamic keymaps is especially scarce). + */ +#define MATRIX_ROW_PINS { B7, B3, B2, B1, B0, E6, F1, F4, F5, F6, F7 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4 } + +#define DIODE_DIRECTION ROW2COL + +#define BACKLIGHT_PIN B6 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +#define CAPS_LOCK_LED_PIN C7 + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 20 /* 16 underglow LEDs, 4 top LEDs */ + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +/* Bootmagic Lite key configuration: use the Esc key */ +#define BOOTMAGIC_LITE_ROW 5 +#define BOOTMAGIC_LITE_COLUMN 0 + +// partially generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/id80/id80.c b/keyboards/id80/id80.c new file mode 100644 index 00000000000..5e5dbc31249 --- /dev/null +++ b/keyboards/id80/id80.c @@ -0,0 +1,36 @@ +/* Copyright 2020 Sergey Vlasov + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "id80.h" + +void matrix_init_kb(void) { + led_init_ports(); + matrix_init_user(); +} + +void led_init_ports(void) { + setPinOutput(CAPS_LOCK_LED_PIN); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if (res) { + writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock); + } + return res; +} + +// partially generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/id80/id80.h b/keyboards/id80/id80.h new file mode 100644 index 00000000000..2f2cab71ba6 --- /dev/null +++ b/keyboards/id80/id80.h @@ -0,0 +1,42 @@ +/* Copyright 2020 Sergey Vlasov + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K50, K51, K52, K53, K54, K55, K56, K57, K58, KA7, KA5, KA4, KA3, KA6, KA2, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K98, K97, K95, K94, K96, K92, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K88, K87, K85, K84, K83, K82, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K78, K77, K75, K74, \ + K10, K12, K13, K14, K15, K16, K17, K18, K68, K67, K65, K64, K63, \ + K00, K01, K02, K06, K08, K07, K05, K04, K03 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \ + { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \ + { KC_NO, KC_NO, KC_NO, K63, K64, K65, KC_NO, K67, K68 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, K74, K75, KC_NO, K77, K78 }, \ + { KC_NO, KC_NO, K82, K83, K84, K85, KC_NO, K87, K88 }, \ + { KC_NO, KC_NO, K92, KC_NO, K94, K95, K96, K97, K98 }, \ + { KC_NO, KC_NO, KA2, KA3, KA4, KA5, KA6, KA7, KC_NO }, \ +} + +// generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/id80/info.json b/keyboards/id80/info.json new file mode 100644 index 00000000000..986d967a192 --- /dev/null +++ b/keyboards/id80/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "ID80", + "url": "", + "maintainer": "qmk", + "width": 16.25, + "height": 6.5, + "layouts": { + "LAYOUT": { + "key_count": 80, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"Fn", "x":14, "y":0}, {"label":"Insert", "x":15.25, "y":0}, {"label":"`", "x":0, "y":1.25}, {"label":"1", "x":1, "y":1.25}, {"label":"2", "x":2, "y":1.25}, {"label":"3", "x":3, "y":1.25}, {"label":"4", "x":4, "y":1.25}, {"label":"5", "x":5, "y":1.25}, {"label":"6", "x":6, "y":1.25}, {"label":"7", "x":7, "y":1.25}, {"label":"8", "x":8, "y":1.25}, {"label":"9", "x":9, "y":1.25}, {"label":"0", "x":10, "y":1.25}, {"label":"-", "x":11, "y":1.25}, {"label":"=", "x":12, "y":1.25}, {"label":"Backspace", "x":13, "y":1.25, "w":2}, {"label":"Home", "x":15.25, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"[", "x":11.5, "y":2.25}, {"label":"]", "x":12.5, "y":2.25}, {"label":"\\", "x":13.5, "y":2.25, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":";", "x":10.75, "y":3.25}, {"label":"'", "x":11.75, "y":3.25}, {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, {"label":"Shift", "x":0, "y":4.25, "w":2.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":",", "x":9.25, "y":4.25}, {"label":".", "x":10.25, "y":4.25}, {"label":"/", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, {"label":"\u2191", "x":14.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"label":"Alt", "x":10, "y":5.25, "w":1.5}, {"label":"Ctrl", "x":11.5, "y":5.25, "w":1.5}, {"label":"\u2190", "x":13.25, "y":5.5}, {"label":"\u2193", "x":14.25, "y":5.5}, {"label":"\u2192", "x":15.25, "y":5.5}] + } + } +} diff --git a/keyboards/id80/keymaps/default/keymap.c b/keyboards/id80/keymaps/default/keymap.c new file mode 100644 index 00000000000..696fb303e29 --- /dev/null +++ b/keyboards/id80/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* Copyright 2020 Sergey Vlasov + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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( + 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(1), KC_INS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, NK_TOGG, _______, _______, _______, _______, _______, BL_INC, + _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC, BL_STEP + ), +}; diff --git a/keyboards/id80/keymaps/default/readme.md b/keyboards/id80/keymaps/default/readme.md new file mode 100644 index 00000000000..8ae9f656cd0 --- /dev/null +++ b/keyboards/id80/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for id80 diff --git a/keyboards/id80/keymaps/via/keymap.c b/keyboards/id80/keymaps/via/keymap.c new file mode 100644 index 00000000000..686ce9ce739 --- /dev/null +++ b/keyboards/id80/keymaps/via/keymap.c @@ -0,0 +1,51 @@ +/* Copyright 2020 Sergey Vlasov + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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( + 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(1), KC_INS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, NK_TOGG, _______, _______, _______, _______, _______, BL_INC, + _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC, BL_STEP + ), + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/id80/keymaps/via/rules.mk b/keyboards/id80/keymaps/via/rules.mk new file mode 100644 index 00000000000..ea9a831e174 --- /dev/null +++ b/keyboards/id80/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +LINK_TIME_OPTIMIZATION_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/id80/readme.md b/keyboards/id80/readme.md new file mode 100644 index 00000000000..3d2b934c329 --- /dev/null +++ b/keyboards/id80/readme.md @@ -0,0 +1,15 @@ +# IDOBAO ID80 + +![ID80](https://ae01.alicdn.com/kf/H0f617c6129c24cfaa26a8c9e8e54851aj.jpg) + +A 75% hotswap keyboard from IDOBAO. + +* Keyboard Maintainer: [Sergey Vlasov](https://github.com/sigprof) +* Hardware Supported: IDOBAO ID80 +* Hardware Availability: [AliExpress](https://www.aliexpress.com/item/4000590804514.html), [Drop](https://drop.com/buy/idobao-id80-75-hot-swappable-mechanical-keyboard-kit?mode=guest_open) + +Make example for this keyboard (after setting up your build environment): + + make id80:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/id80/rules.mk b/keyboards/id80/rules.mk new file mode 100644 index 00000000000..37aa911568b --- /dev/null +++ b/keyboards/id80/rules.mk @@ -0,0 +1,36 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +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 +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +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 +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +# partially generated by KBFirmware JSON to QMK Parser +# https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/idb/idb_60/idb_60.c b/keyboards/idb/idb_60/idb_60.c index d280f644b5c..18ce690431d 100644 --- a/keyboards/idb/idb_60/idb_60.c +++ b/keyboards/idb/idb_60/idb_60.c @@ -1,11 +1,5 @@ #include "idb_60.h" -extern inline void _idb_60_caps_led_on(void); -extern inline void _idb_60_esc_led_on(void); - -extern inline void _idb_60_caps_led_off(void); -extern inline void _idb_60_esc_led_off(void); - void keyboard_pre_init_kb(void) { setPinOutput(C4); setPinOutput(C5); diff --git a/keyboards/idb/idb_60/idb_60.h b/keyboards/idb/idb_60/idb_60.h index c47d6b29272..5d61ac464af 100644 --- a/keyboards/idb/idb_60/idb_60.h +++ b/keyboards/idb/idb_60/idb_60.h @@ -3,21 +3,24 @@ #include "quantum.h" inline void _idb_60_caps_led_on(void) { - writePinLow(C5); + writePinHigh(C5); } -inline void _idb_60_esc_led_on(void) { - writePinLow(C4); +inline void _idb_60_fn_led_on(void) { + writePinHigh(C4); } inline void _idb_60_caps_led_off(void) { writePinLow(C5); } -inline void _idb_60_esc_led_off(void) { +inline void _idb_60_fn_led_off(void) { writePinLow(C4); } +#define _idb_60_esc_led_on _idb_60_fn_led_on +#define _idb_60_esc_led_off _idb_60_fn_led_off + #define LAYOUT( \ K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K07,\ K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36,\ @@ -57,4 +60,3 @@ inline void _idb_60_esc_led_off(void) { { K80, K81, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ { KC_NO, KC_NO, KC_NO, K93, KC_NO, K95, K96 } \ } - diff --git a/keyboards/idb/idb_60/keymaps/all_keys/keymap.c b/keyboards/idb/idb_60/keymaps/all_keys/keymap.c index 9f2ef36a1f2..2edde98c26d 100644 --- a/keyboards/idb/idb_60/keymaps/all_keys/keymap.c +++ b/keyboards/idb/idb_60/keymaps/all_keys/keymap.c @@ -37,10 +37,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { layer_state_t layer_state_set_user(layer_state_t state) { if (layer_state_cmp(state, 1)) { - _idb_60_esc_led_on(); + _idb_60_fn_led_on(); } else { - _idb_60_esc_led_off(); + _idb_60_fn_led_off(); } - + return state; -} \ No newline at end of file +} diff --git a/keyboards/idb/idb_60/keymaps/default/keymap.c b/keyboards/idb/idb_60/keymaps/default/keymap.c index 22f208caaca..1bf25867f94 100644 --- a/keyboards/idb/idb_60/keymaps/default/keymap.c +++ b/keyboards/idb/idb_60/keymaps/default/keymap.c @@ -37,10 +37,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { layer_state_t layer_state_set_user(layer_state_t state) { if (layer_state_cmp(state, 1)) { - _idb_60_esc_led_on(); + _idb_60_fn_led_on(); } else { - _idb_60_esc_led_off(); + _idb_60_fn_led_off(); } - + return state; -} \ No newline at end of file +} diff --git a/keyboards/idb/idb_60/keymaps/pngu/keymap.c b/keyboards/idb/idb_60/keymaps/pngu/keymap.c index de336e5fa4d..ac0ad10d342 100644 --- a/keyboards/idb/idb_60/keymaps/pngu/keymap.c +++ b/keyboards/idb/idb_60/keymaps/pngu/keymap.c @@ -6,8 +6,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NO, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Z, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, LT(2, 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_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_MENU, MO(1) + KC_LSFT, KC_NUBS, KC_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_MENU, KC_RGUI ), [1] = LAYOUT( RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, _______, @@ -30,10 +30,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { layer_state_t layer_state_set_user(layer_state_t state) { if (layer_state_cmp(state, 1)) { - _idb_60_esc_led_on(); + _idb_60_fn_led_on(); } else { - _idb_60_esc_led_off(); + _idb_60_fn_led_off(); } - + return state; -} \ No newline at end of file +} diff --git a/keyboards/idb/idb_60/keymaps/via/keymap.c b/keyboards/idb/idb_60/keymaps/via/keymap.c index 22f208caaca..1bf25867f94 100644 --- a/keyboards/idb/idb_60/keymaps/via/keymap.c +++ b/keyboards/idb/idb_60/keymaps/via/keymap.c @@ -37,10 +37,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { layer_state_t layer_state_set_user(layer_state_t state) { if (layer_state_cmp(state, 1)) { - _idb_60_esc_led_on(); + _idb_60_fn_led_on(); } else { - _idb_60_esc_led_off(); + _idb_60_fn_led_off(); } - + return state; -} \ No newline at end of file +} diff --git a/keyboards/idb/idb_60/readme.md b/keyboards/idb/idb_60/readme.md index 13a4841b4ae..bd2f76ae689 100644 --- a/keyboards/idb/idb_60/readme.md +++ b/keyboards/idb/idb_60/readme.md @@ -2,9 +2,10 @@ Firmware for the idb 60 PCB -* Keyboard Maintainer: [/u/omgitspngu](https://github.com/itspngu) +* Keyboard Maintainer: [pngu](https://github.com/itspngu) * Hardware Supported: idb 60 PCB -* Hardware Availability: [/u/omgitspngu](https://www.reddit.com/user/omgitspngu/) +* Hardware Availability: [Case & PCB Files (CC-by-SA 4.0)](https://github.com/itspngu/idb_60) +* Project Website: [idb Keyboards » 60](https://idb-keyboards.xyz/60) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/idb/idb_60/rules.mk b/keyboards/idb/idb_60/rules.mk index 289e77f7716..7e11d4be750 100644 --- a/keyboards/idb/idb_60/rules.mk +++ b/keyboards/idb/idb_60/rules.mk @@ -25,4 +25,3 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -DEBOUNCE_TYPE = eager_pk # Eager debounce type diff --git a/keyboards/j80/config.h b/keyboards/j80/config.h index a4a10bff429..c4276431cf3 100644 --- a/keyboards/j80/config.h +++ b/keyboards/j80/config.h @@ -39,10 +39,8 @@ along with this program. If not, see . #define BACKLIGHT_PIN D4 /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION /* key combination for magic key command */ /* defined by default; to change, uncomment and set to the combination you want */ diff --git a/keyboards/jae/j01/config.h b/keyboards/jae/j01/config.h index 8faa651aa7c..9c05a98766b 100644 --- a/keyboards/jae/j01/config.h +++ b/keyboards/jae/j01/config.h @@ -165,10 +165,9 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + /* * MIDI options */ diff --git a/keyboards/jj4x4/config.h b/keyboards/jj4x4/config.h index 8c5b1988d69..45c8671cc5c 100644 --- a/keyboards/jj4x4/config.h +++ b/keyboards/jj4x4/config.h @@ -19,8 +19,8 @@ along with this program. If not, see . #include "config_common.h" -#define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422D +#define VENDOR_ID 0x4B50 // "KP" +#define PRODUCT_ID 0x0044 // 4x4 #define DEVICE_VER 0x0200 #define MANUFACTURER KPrepublic #define PRODUCT JJ4x4 diff --git a/keyboards/jj4x4/info.json b/keyboards/jj4x4/info.json index 602fdc90a37..0fff9b9c883 100644 --- a/keyboards/jj4x4/info.json +++ b/keyboards/jj4x4/info.json @@ -1,30 +1,30 @@ { - "keyboard_name": "jj4x4", - "url": "", - "maintainer": "qmk", - "width": 4, - "height": 4, - "layouts": { - "LAYOUT_ortho_4x4": { - "key_count": 16, - "layout": [ - {"x":0, "y":0}, - {"x":1, "y":0}, - {"x":2, "y":0}, - {"x":3, "y":0}, - {"x":0, "y":1}, - {"x":1, "y":1}, - {"x":2, "y":1}, - {"x":3, "y":1}, - {"x":0, "y":2}, - {"x":1, "y":2}, - {"x":2, "y":2}, - {"x":3, "y":2}, - {"x":0, "y":3}, - {"x":1, "y":3}, - {"x":2, "y":3}, - {"x":3, "y":3} - ] + "keyboard_name": "JJ4x4", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x4": { + "key_count": 16, + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3} + ] + } } - } -} \ No newline at end of file +} diff --git a/keyboards/jj4x4/jj4x4.h b/keyboards/jj4x4/jj4x4.h index 7b8cb81835e..ee17e896dd3 100644 --- a/keyboards/jj4x4/jj4x4.h +++ b/keyboards/jj4x4/jj4x4.h @@ -28,14 +28,13 @@ along with this program. If not, see . * represents the switch matrix. */ #define LAYOUT_ortho_4x4( \ - K01, K02, K03, K04, \ - K11, K12, K13, K14, \ - K21, K22, K23, K24, \ - K31, K32, K33, K34 \ -) \ -{ \ - { K01, K02, K03, K04 }, \ - { K11, K12, K13, K14 }, \ - { K21, K22, K23, K24 }, \ - { K31, K32, K33, K34 } \ -} + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 } \ +} diff --git a/keyboards/jj4x4/keymaps/default/keymap.c b/keyboards/jj4x4/keymaps/default/keymap.c index a0b06ee92a3..ae2c6b54170 100644 --- a/keyboards/jj4x4/keymaps/default/keymap.c +++ b/keyboards/jj4x4/keymaps/default/keymap.c @@ -13,61 +13,56 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include QMK_KEYBOARD_H enum layers { - _BASE = 0, - _FN1, - _FN2, + _BASE = 0, + _FN1, + _FN2 }; // Defines the keycodes used by our macros in process_record_user enum custom_keycodes { - QMKBEST = SAFE_RANGE, - QMKURL + QMKBEST = SAFE_RANGE, + QMKURL }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_BASE] = LAYOUT_ortho_4x4( - KC_PGUP, KC_HOME, KC_UP, KC_END , \ - KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, \ - MO(_FN2), KC_VOLU, KC_MPLY, KC_MPRV, \ - MO(_FN1), KC_VOLD, KC_MUTE, KC_MNXT \ - ), - [_FN1] = LAYOUT_ortho_4x4( - KC_ESC, KC_P7, KC_P8, KC_P9, \ - KC_TAB, KC_P4, KC_P5, KC_P6, \ - KC_ENT, KC_P1, KC_P2, KC_P3, \ - _______, KC_P0, KC_P0, KC_DOT \ - ), - [_FN2] = LAYOUT_ortho_4x4( - RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ - RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, \ - _______, _______, _______, RESET, \ - BL_STEP, _______, QMKBEST, QMKURL \ - ) - + [_BASE] = LAYOUT_ortho_4x4( + KC_PGUP, KC_HOME, KC_UP, KC_END, + KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, + MO(_FN2), KC_VOLU, KC_MPLY, KC_MPRV, + MO(_FN1), KC_VOLD, KC_MUTE, KC_MNXT + ), + [_FN1] = LAYOUT_ortho_4x4( + KC_ESC, KC_P7, KC_P8, KC_P9, + KC_TAB, KC_P4, KC_P5, KC_P6, + KC_ENT, KC_P1, KC_P2, KC_P3, + _______, KC_P0, KC_P0, KC_DOT + ), + [_FN2] = LAYOUT_ortho_4x4( + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, + _______, _______, _______, RESET, + BL_STEP, _______, QMKBEST, QMKURL + ) }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QMKBEST: - if (record->event.pressed) { - // when keycode QMKBEST is pressed - SEND_STRING("QMK is the best thing ever!"); - } else { - // when keycode QMKBEST is released - } - break; - case QMKURL: - if (record->event.pressed) { - // when keycode QMKURL is pressed - SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); - } else { - // when keycode QMKURL is released - } - break; - } - return true; + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/\n"); + } + break; + } + return true; } diff --git a/keyboards/jj4x4/keymaps/via/keymap.c b/keyboards/jj4x4/keymaps/via/keymap.c new file mode 100644 index 00000000000..35ca0e361da --- /dev/null +++ b/keyboards/jj4x4/keymaps/via/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2020 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_ortho_4x4( + KC_P7, KC_P8, KC_P9, KC_PSLS, + KC_P4, KC_P5, KC_P6, KC_PAST, + KC_P1, KC_P2, KC_P3, KC_PMNS, + KC_P0, KC_PDOT, KC_PPLS, LT(1, KC_ENT) + ), + LAYOUT_ortho_4x4( + RESET, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), + LAYOUT_ortho_4x4( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), + LAYOUT_ortho_4x4( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ) +}; diff --git a/keyboards/jj4x4/keymaps/via/rules.mk b/keyboards/jj4x4/keymaps/via/rules.mk new file mode 100644 index 00000000000..82fb80d5e77 --- /dev/null +++ b/keyboards/jj4x4/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +EXTRAKEY_ENABLE = no +MOUSEKEY_ENABLE = no diff --git a/keyboards/jj4x4/README.md b/keyboards/jj4x4/readme.md similarity index 73% rename from keyboards/jj4x4/README.md rename to keyboards/jj4x4/readme.md index 24212bc9905..714e8e88f7f 100644 --- a/keyboards/jj4x4/README.md +++ b/keyboards/jj4x4/readme.md @@ -1,8 +1,8 @@ -# jj4x4 +# JJ4x4 ![jj4x4](https://cdn.shopify.com/s/files/1/2711/4238/products/JJ4x4case-1_1024x1024.jpg?v=1532325339) -A 4x4 keypad kit made and KPRepublic on AliExpress. This is a chopped off version of the jj40 with rearranged keys. +A 4x4 keypad kit made and KPRepublic on AliExpress. This is a chopped off version of the JJ40 with rearranged keys. * Keyboard Maintainer: [QMK Community](https://github.com/qmk) * Hardware Supported: Atmega32A @@ -18,22 +18,22 @@ Flashing example for this keyboard ([after setting up the bootloadHID flashing e **Reset Key**: -Hold down the key located at *K12*, commonly programmed as *8* while plugging in the keyboard USB cable. +Hold down the key located at *K11*, commonly programmed as *8* while plugging in the keyboard USB cable. -Key *K12* is in the above picture: +Key *K11* is in the above picture: Row 2 from the top, Column 2 from the left, see the schematic below: ``` - ,-----------------------. - | | | | | - |-----`-----`-----`-----| - | | K12 | | | - |-----`-----`-----`-----| - | | | | | - |-----`-----`-----`-----| - | | | | | - `-----`-----`-----`-----' +,-----------------------. +| | | | | +|-----`-----`-----`-----| +| | K11 | | | +|-----`-----`-----`-----| +| | | | | +|-----`-----`-----`-----| +| | | | | +`-----`-----`-----`-----' ``` See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/jj4x4/rules.mk b/keyboards/jj4x4/rules.mk index 82e25e6a7a6..5ff5c37692d 100644 --- a/keyboards/jj4x4/rules.mk +++ b/keyboards/jj4x4/rules.mk @@ -31,6 +31,6 @@ 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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs +HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = ortho_4x4 diff --git a/keyboards/just60/config.h b/keyboards/just60/config.h index ef0af7c6108..66e5bf7b671 100644 --- a/keyboards/just60/config.h +++ b/keyboards/just60/config.h @@ -48,7 +48,5 @@ along with this program. If not, see . #define LOCKING_RESYNC_ENABLE /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c index 71aed2b37bb..22943357b32 100644 --- a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c @@ -5,7 +5,7 @@ enum layer { LAYER_FUNCTION, }; -#define LY_FUNC LT(LAYER_FUNCTION, KC_APP) +#define LY_FN MO(LAYER_FUNCTION) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Default layer: http://www.keyboard-layout-editor.com/#/gists/dd675b40cc4df2c7bb78847ac29f5988 */ @@ -14,7 +14,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LY_FUNC, KC_LEFT, KC_DOWN, KC_RGHT + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LY_FN, KC_LEFT, KC_DOWN, KC_RGHT ), /* Function layer: http://www.keyboard-layout-editor.com/#/gists/f29128427f674c43777f045e363d1b44 */ @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, _______, KC_CAPS, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_APP, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; diff --git a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md index a0c2d97dfe3..16effc38155 100644 --- a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md @@ -1,17 +1,16 @@ # bcat's KBD67 hotswap layout -This is pretty much a stock 65% split keyboard layout, with an HHKB-style -(split) backspace and media keys in the function layer centered around the ESDF -cluster. +This is a standard 65% keyboard layout, with an HHKB-style (split) backspace +and media controls in the function layer (centered around the ESDF cluster). ## Default layer -![Default layer layout](https://i.imgur.com/QNJ0HhY.png) +![Default layer layout](https://i.imgur.com/Vdnw2mp.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/dd675b40cc4df2c7bb78847ac29f5988)) ## Function layer -![Function layer layout](https://i.imgur.com/E7Pf1gS.png) +![Function layer layout](https://i.imgur.com/Q304GlI.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/f29128427f674c43777f045e363d1b44)) diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/config.h b/keyboards/kbdfans/kbd67/mkii_soldered/config.h index df0607b249a..b72866c6633 100644 --- a/keyboards/kbdfans/kbd67/mkii_soldered/config.h +++ b/keyboards/kbdfans/kbd67/mkii_soldered/config.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xA103 +#define VENDOR_ID 0xA103 // ai03 #define PRODUCT_ID 0x0013 #define DEVICE_VER 0x0001 #define MANUFACTURER KBDfans @@ -48,205 +48,17 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -/* - * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. - */ -//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 - #define BACKLIGHT_PIN B7 #ifdef BACKLIGHT_PIN #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 #endif -//#define RGB_DI_PIN B3 -//#ifdef RGB_DI_PIN -// #define RGBLED_NUM 20 -// #define RGBLIGHT_HUE_STEP 8 -// #define RGBLIGHT_SAT_STEP 8 -// #define RGBLIGHT_VAL_STEP 8 -// #define RGBLIGHT_LIMIT_VAL 200 /* The maximum brightness level */ -// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ -/*== all animations enable ==*/ -// #define RGBLIGHT_ANIMATIONS -// /*== or choose animations ==*/ -// #define RGBLIGHT_EFFECT_BREATHING -// #define RGBLIGHT_EFFECT_RAINBOW_MOOD -// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL -// #define RGBLIGHT_EFFECT_SNAKE -// #define RGBLIGHT_EFFECT_KNIGHT -// #define RGBLIGHT_EFFECT_CHRISTMAS -// #define RGBLIGHT_EFFECT_STATIC_GRADIENT -// #define RGBLIGHT_EFFECT_RGB_TEST -// #define RGBLIGHT_EFFECT_ALTERNATING -// /*== customize breathing effect ==*/ -// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ -// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 -// /*==== use exp() and sin() ====*/ -// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 -// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 -//#endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 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 */ -/* defined by default; to change, uncomment and set to the combination you want */ -// #define IS_COMMAND() (get_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_HELP H -//#define MAGIC_KEY_HELP_ALT 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 0 -//#define MAGIC_KEY_LAYER0_ALT GRAVE -//#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 B -//#define MAGIC_KEY_BOOTLOADER_ALT ESC -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_EEPROM_CLEAR BSPACE -//#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 - -/* - * HD44780 LCD Display Configuration - */ -/* -#define LCD_LINES 2 //< number of visible lines of the display -#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - -#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - -#if LCD_IO_MODE -#define LCD_PORT PORTB //< port for the LCD lines -#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 -#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 -#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 -#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 -#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 -#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 -#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 -#define LCD_RS_PORT LCD_PORT //< port for RS line -#define LCD_RS_PIN 3 //< pin for RS line -#define LCD_RW_PORT LCD_PORT //< port for RW line -#define LCD_RW_PIN 2 //< pin for RW line -#define LCD_E_PORT LCD_PORT //< port for Enable line -#define LCD_E_PIN 1 //< pin for Enable line -#endif -*/ - -/* Bootmagic Lite key configuration */ -// #define BOOTMAGIC_LITE_ROW 0 -// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/via/keymap.c b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/via/keymap.c new file mode 100644 index 00000000000..eebd077dbe7 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/via/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2020 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( /* 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_DEL, 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(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_BSLS, 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_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_all( /* FN */ + 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, _______, _______, BL_INC, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), + + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/via/rules.mk b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/via/rules.mk new file mode 100644 index 00000000000..36b7ba9cbc9 --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h index f1be48510d4..afe5e51a2e4 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h +++ b/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h @@ -19,6 +19,7 @@ #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects #define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN #define DISABLE_RGB_MATRIX_BAND_SAT #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT @@ -35,10 +36,9 @@ #define DISABLE_RGB_MATRIX_SOLID_SPLASH #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH #define DISABLE_RGB_MATRIX_DIGITAL_RAIN -#define DISABLE_RGB_MATRIX_CYCLE_ALL #define DISABLE_RGB_MATRIX_RAINDROPS #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 160 +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 #define DRIVER_ADDR_1 0b1110100 #define DRIVER_ADDR_2 0b1110111 #define DRIVER_COUNT 2 diff --git a/keyboards/kbdfans/kbd67/rev2/config.h b/keyboards/kbdfans/kbd67/rev2/config.h index 931f5714b8b..4e1352c4138 100644 --- a/keyboards/kbdfans/kbd67/rev2/config.h +++ b/keyboards/kbdfans/kbd67/rev2/config.h @@ -20,9 +20,9 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 +#define VENDOR_ID 0x4B42 +#define PRODUCT_ID 0x6067 +#define DEVICE_VER 0x0002 #define MANUFACTURER KBDFans #define PRODUCT KBD67v2 #define DESCRIPTION 65% Keyboard diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/jscatena88/keymap.c b/keyboards/kbdfans/kbd67/rev2/keymaps/jscatena88/keymap.c new file mode 100644 index 00000000000..625b768e66f --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/jscatena88/keymap.c @@ -0,0 +1,58 @@ +/* Copyright 2018 jscatena88 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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] = { +/* Keymap (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | `~ | + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del | + * |----------------------------------------------------------------| + * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn| + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ +[0] = LAYOUT_65_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, + 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_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(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap Fn Layer + * ,----------------------------------------------------------------. + * |~ `|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Ins | + * |----------------------------------------------------------------| + * |Caps | |Up | | | | | |PSc|SLk|Pau|Up | | | | + * |----------------------------------------------------------------| + * | |Lef|Dow|Rig| | | | |Hom|PUp|Lef|Rig| | | + * |----------------------------------------------------------------| + * | | | | | | | | |End|PDn|Dow| |PUp| | + * |----------------------------------------------------------------| + * | | | | | | | |Hom|PDn|End | + * `----------------------------------------------------------------' + */ + +[1] = LAYOUT_65_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_TRNS, KC_VOLU, + KC_CAPS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, KC_VOLD, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, KC_MUTE, + KC_TRNS, RGB_TOG, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_PGUP, KC_MPLY, + LCTL(KC_LALT), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END), +}; diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/jscatena88/readme.md b/keyboards/kbdfans/kbd67/rev2/keymaps/jscatena88/readme.md new file mode 100644 index 00000000000..21b28de90d5 --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/jscatena88/readme.md @@ -0,0 +1,4 @@ +# Jscatena88's KBD67 Layout +![Layout Visual](https://i.imgur.com/7IsPDjR.png) + +This modifies the far right column on layer 1, adds RGB control to the second layer, and creates a CTRL+ALT button on the second layer for switching between Linux TTYs (this is the key labelled LCTL(LC_L), it is actually LCTL(KC_LALT) but the visualization software didn't support that) \ No newline at end of file diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/via/config.h b/keyboards/kbdfans/kbd67/rev2/keymaps/via/config.h new file mode 100644 index 00000000000..579212d4a3a --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/via/config.h @@ -0,0 +1 @@ +#define DYNAMIC_KEYMAP_LAYER_COUNT 2 diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/via/keymap.c b/keyboards/kbdfans/kbd67/rev2/keymaps/via/keymap.c new file mode 100644 index 00000000000..e2f3a664b5e --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/via/keymap.c @@ -0,0 +1,45 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Home| + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |PgUp| + * |----------------------------------------------------------------| + * |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return |PgDn| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|End | + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ +[0] = LAYOUT_65_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT +), + + /* Keymap Fn Layer + * ,----------------------------------------------------------------. + * |~ `|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Ins | + * |----------------------------------------------------------------| + * | | |Up | | | | | |PSc|SLk|Pau|Up | | | | + * |----------------------------------------------------------------| + * | |Lef|Dow|Rig| | | | |Hom|PUp|Lef|Rig| | | + * |----------------------------------------------------------------| + * | | | | | | | | |End|PDn|Dow| |PUp| | + * |----------------------------------------------------------------| + * | | | | | | | |Hom|PDn|End | + * `----------------------------------------------------------------' + */ +[1] = LAYOUT_65_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_INS, + _______, _______, KC_UP, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END +) +}; diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/via/rules.mk b/keyboards/kbdfans/kbd67/rev2/keymaps/via/rules.mk new file mode 100644 index 00000000000..36b7ba9cbc9 --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/kbdfans/kbd8x_mk2/readme.md b/keyboards/kbdfans/kbd8x_mk2/readme.md index 3655ac1c75f..fbd65046096 100644 --- a/keyboards/kbdfans/kbd8x_mk2/readme.md +++ b/keyboards/kbdfans/kbd8x_mk2/readme.md @@ -6,7 +6,7 @@ A fairly typical TKL Keyboard Maintainer: [ai03](https://github.com/ai03-2725) / [KBDfans](https://kbdfans.cn/) Hardware Supported: KBD8X MKII PCB/case -Hardware Availability: [KBDfans](https://kbdfans.cn/collections/new-arrival/products/coming-soon-kbd8x-mkii-custom-mechanical-keyboard-kit) +Hardware Availability: [KBDfans](https://kbdfans.com/collections/90-kbd19x/products/gb-kbd8x-mkii-pcb) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/kc60/config.h b/keyboards/kc60/config.h index 7e9cdaa086f..7c6e695a456 100644 --- a/keyboards/kc60/config.h +++ b/keyboards/kc60/config.h @@ -15,18 +15,17 @@ 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 +#pragma once #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 +#define VENDOR_ID 0x530A +#define PRODUCT_ID 0x6FFC #define DEVICE_VER 0x0001 -#define MANUFACTURER You -#define PRODUCT kc60v2 -#define DESCRIPTION A custom keyboard +#define MANUFACTURER NPKC +#define PRODUCT KC60 +#define DESCRIPTION QMK Firmware: KC60 /* key matrix size */ #define MATRIX_ROWS 5 @@ -41,19 +40,45 @@ along with this program. If not, see . * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * -*/ - -// Possible pins for columns include: F1 F0 E6 D7 D6 D4 C7 C6 B7 B5 B4 B3 B1 B0 -// Pins for rows include: D0 D1 F6 F7 D5 -// KC60 Version 2 + */ #define MATRIX_ROW_PINS { D0, D1, F6, F7, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3 } #define UNUSED_PINS +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + #define BACKLIGHT_PIN B6 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW +#ifdef RGBLIGHT_ENABLE +# define RGB_DI_PIN F5 +# define RGBLED_NUM 16 // Number of LEDs. Change this to match your use case. +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ +# define RGBLIGHT_ANIMATIONS +/*== or choose animations ==*/ +// # define RGBLIGHT_EFFECT_BREATHING +// # define RGBLIGHT_EFFECT_RAINBOW_MOOD +// # define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// # define RGBLIGHT_EFFECT_SNAKE +// # define RGBLIGHT_EFFECT_KNIGHT +// # define RGBLIGHT_EFFECT_CHRISTMAS +// # define RGBLIGHT_EFFECT_STATIC_GRADIENT +// # define RGBLIGHT_EFFECT_RGB_TEST +// # define RGBLIGHT_EFFECT_ALTERNATING +/*== customize breathing effect ==*/ +/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +/*==== use exp() and sin() ====*/ +// # define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// # define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 @@ -61,99 +86,14 @@ along with this program. If not, see . /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST -/* number of backlight levels */ -#define BACKLIGHT_LEVELS 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 -/* - * 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. - * - */ - -/* 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/kc60/info.json b/keyboards/kc60/info.json index adc3355eb1d..bd21b6a6c55 100644 --- a/keyboards/kc60/info.json +++ b/keyboards/kc60/info.json @@ -1,16 +1,212 @@ { - "keyboard_name": "KC60", - "url": "", - "maintainer": "qmk", - "width": 15, - "height": 5, - "layouts": { - "LAYOUT": { - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":5}, {"x":8.75, "y":4, "w":1.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}] - } - } + "keyboard_name": "KC60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + {"label":"7", "x":7, "y":0}, + {"label":"8", "x":8, "y":0}, + {"label":"9", "x":9, "y":0}, + {"label":"0", "x":10, "y":0}, + {"label":"-", "x":11, "y":0}, + {"label":"=", "x":12, "y":0}, + {"label":"Backspace", "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":"\\", "x":13.5, "y":1, "w":1.5}, + {"label":"CapsLock", "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":"ISO#", "x":12.75, "y":2}, + {"label":"Enter", "x":13.75, "y":2, "w":1.25}, + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"ISO\\", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",", "x":9.25, "y":3}, + {"label":".", "x":10.25, "y":3}, + {"label":"/", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"HHKBFn", "x":14, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"GUI", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"GUI", "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": { + "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":"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":"K49", "x":14, "y":0}, + {"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":"~", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + {"label":"7", "x":7, "y":0}, + {"label":"8", "x":8, "y":0}, + {"label":"9", "x":9, "y":0}, + {"label":"0", "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":"CapsLock", "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}, + {"label":"Space", "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/kc60/kc60.h b/keyboards/kc60/kc60.h index b8e16c0b30e..2f26b2c0e13 100644 --- a/keyboards/kc60/kc60.h +++ b/keyboards/kc60/kc60.h @@ -1,25 +1,53 @@ -#ifndef KC60_H -#define KC60_H +#pragma once #include "quantum.h" -// K49 key is for the key at row 1 and column 15 when you split the backspace in 2 1U key. +/* LAYOUT_all + * ,-----------------------------------------------------------. + * |00 |01 |02 |03 |04 |05 |06 |07 |08 |09 |0A |0B |0C |0D |49 | + * |-----------------------------------------------------------| ,-----. + * |10 |11 |12 |13 |14 |15 |16 |17 |18 |19 |1A |1B |1C |1D | | | + * |-----------------------------------------------------------| ,---. | + * |20 |21 |22 |23 |24 |25 |26 |17 |28 |29 |2A |2B |2D | |2C |2D | + * |-----------------------------------------------------------| `--------' + * |30 |31 |32 |33 |34 |35 |36 |37 |38 |39 |3A |3B |3D |3C | + * |-----------------------------------------------------------| + * |40 |41 |42 | 45 |4A |4B |4C |4D | + * `-----------------------------------------------------------' + * 2u Backspace = K0D + * 2.25u left Shift = K30 + * 2.75u right Shift = K3D + */ +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D } \ +} -// 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 multi-dimensional array -/* - * ,-----------------------------------------------------------------------------------------. - * | 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 | K17 | K28 | K29 | K2A | K2B | K2C | - * |-----------------------------------------------------------------------------------------+ - * | K30 | K32 | K33 | K34 | K35 | K36 | K37 | K38 | K39 | K3A | K3B | K3D | K3C | - * |-----------------------------------------------------------------------------------------+ - * | K40 | K41 | K42 | K45 | K4A | K4B | K4C | K4D | - * `-----------------------------------------------------------------------------------------' +/* LAYOUT + * Present for backwards compatibility with older keymaps. The commit that added + * split Backspace support put the right 1u key of the split on the bottom row, + * next to right Alt. The arguments for 1.75/1u right Shift are also in reverse + * order. + * ,-----------------------------------------------------------. + * |00 |01 |02 |03 |04 |05 |06 |07 |08 |09 |0A |0B |0C |0D |49 | + * |-----------------------------------------------------------| ,-----. + * |10 |11 |12 |13 |14 |15 |16 |17 |18 |19 |1A |1B |1C |1D | | | + * |-----------------------------------------------------------| ,---. | + * |20 |21 |22 |23 |24 |25 |26 |17 |28 |29 |2A |2B |2D | |2C |2D | + * |-----------------------------------------------------------| `--------' + * |30 |31 |32 |33 |34 |35 |36 |37 |38 |39 |3A |3B |3D |3C | + * |-----------------------------------------------------------| + * |40 |41 |42 | 45 |4A |4B |4C |4D | + * `-----------------------------------------------------------' */ #define LAYOUT( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ @@ -27,82 +55,37 @@ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ K40, K41, K42, K45, K49, K4A, K4B, K4C, K4D \ - ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ - { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D } \ -} +) LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ +) -/* Default layout - * ,-----------------------------------------------------------------------------------------. - * | 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 | K17 | K28 | K29 | K2A | K2B | K2D | - * |-----------------------------------------------------------------------------------------+ - * | K30 | K32 | K33 | K34 | K35 | K36 | K37 | K38 | K39 | K3A | K3B | K3D | - * |-----------------------------------------------------------------------------------------+ - * | K40 | K41 | K42 | K45 | K4A | K4B | K4C | K4D | - * `-----------------------------------------------------------------------------------------' +/* LAYOUT_60_ansi + * ,-----------------------------------------------------------. + * |00 |01 |02 |03 |04 |05 |06 |07 |08 |09 |0A |0B |0C |0D | + * |-----------------------------------------------------------| + * |10 |11 |12 |13 |14 |15 |16 |17 |18 |19 |1A |1B |1C |1D | + * |-----------------------------------------------------------| + * |20 |21 |22 |23 |24 |25 |26 |17 |28 |29 |2A |2B |2D | + * |-----------------------------------------------------------| + * |30 |32 |33 |34 |35 |36 |37 |38 |39 |3A |3B |3D | + * |-----------------------------------------------------------| + * |40 |41 |42 | 45 |4A |4B |4C |4D | + * `-----------------------------------------------------------' */ - #define LAYOUT_60_ansi( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K41, K42, K45, K4A, K4B, K4C, K4D \ - ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D }, \ - { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ } - -/* Mini Lshift - * ,-----------------------------------------------------------------------------------------. - * | 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 | K17 | K28 | K29 | K2A | K2B | K2C | - * |-----------------------------------------------------------------------------------------+ - * | K30 |K31| K32 | K33 | K34 | K35 | K36 | K37 | K38 | K39 | K3A | K3B | K3C | - * |-----------------------------------------------------------------------------------------+ - * | K40 | K41 | K42 | K45 | K4A | K4B | K4C | K4D | - * `-----------------------------------------------------------------------------------------' - */ - -/* Mini Rshift - * ,-----------------------------------------------------------------------------------------. - * | 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 | K17 | K28 | K29 | K2A | K2B | K2C | - * |-----------------------------------------------------------------------------------------+ - * | K30 | K32 | K33 | K34 | K35 | K36 | K37 | K38 | K39 | K3A | K3B | K3C | K3D | - * |-----------------------------------------------------------------------------------------+ - * | K40 | K41 | K42 | K45 | K4A | K4B | K4C | K4D | - * `-----------------------------------------------------------------------------------------' - */ - -/* Mini Enter - * ,-----------------------------------------------------------------------------------------. - * | 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 | K17 | K28 | K29 | K2A | K2B | K2C | K2D | - * |-----------------------------------------------------------------------------------------+ - * | K30 | K32 | K33 | K34 | K35 | K36 | K37 | K38 | K39 | K3A | K3B | K3C | - * |-----------------------------------------------------------------------------------------+ - * | K40 | K41 | K42 | K45 | K4A | K4B | K4C | K4D | - * `-----------------------------------------------------------------------------------------' - */ - -#endif diff --git a/keyboards/kc60/keymaps/default/keymap.c b/keyboards/kc60/keymaps/default/keymap.c index a96b9d3770e..d5286e351d4 100644 --- a/keyboards/kc60/keymaps/default/keymap.c +++ b/keyboards/kc60/keymaps/default/keymap.c @@ -1,12 +1,18 @@ - #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( /* Basic QWERTY */ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ - KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_NO, KC_RGUI, KC_RALT, KC_RCTL, RESET \ - ), + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, 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_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, LT(1,KC_APP), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, LT(1,KC_APP), KC_RCTL + ), + [1] = 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, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, + XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, BL_DEC, BL_TOGG, BL_INC, BL_BRTG, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, _______, _______, + _______, _______, _______, XXXXXXX, _______, _______, _______, _______ + ), }; diff --git a/keyboards/kc60/keymaps/default/readme.md b/keyboards/kc60/keymaps/default/readme.md new file mode 100644 index 00000000000..b10124eac9e --- /dev/null +++ b/keyboards/kc60/keymaps/default/readme.md @@ -0,0 +1,5 @@ +# The default keymap for KC60 + +![keymap](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/default/keymap.png) + +Both `Fn` keys trigger `KC_APP` when tapped, and activate Layer 1 when held. diff --git a/keyboards/kc60/keymaps/ws2812/config.h b/keyboards/kc60/keymaps/ws2812/config.h index 43abf6228ef..ef39965b3ba 100644 --- a/keyboards/kc60/keymaps/ws2812/config.h +++ b/keyboards/kc60/keymaps/ws2812/config.h @@ -1,9 +1,4 @@ -#include "../../config.h" +#pragma once -/* WS2812B RGB Underglow LED */ -#define RGB_DI_PIN F5 // Based on wiring depicted in ws2812_wiring.jpg -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 16 // Number of LEDs. Change this to match your use case. -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 +#undef RGBLED_NUM +#define RGBLED_NUM 16 // Number of LEDs. Change this to match your use case. diff --git a/keyboards/kc60/keymaps/ws2812/keymap.c b/keyboards/kc60/keymaps/ws2812/keymap.c index d445df33709..aaefb61ca3f 100644 --- a/keyboards/kc60/keymaps/ws2812/keymap.c +++ b/keyboards/kc60/keymaps/ws2812/keymap.c @@ -1,96 +1,18 @@ - #include QMK_KEYBOARD_H -// Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - -// 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 - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: (Base Layer) Default Layer - * ,-----------------------------------------------------------. - * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | - * |-----------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | - * |-----------------------------------------------------------| - * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | - * |-----------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | - * |-----------------------------------------------------------| - * |Ctrl|Gui |Alt | Space |Alt |Gui |FN |Ctrl | - * `-----------------------------------------------------------' - */ -[_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_BSPC, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_NO, KC_ENT, \ - KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_NO, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, KC_RALT,KC_RGUI, MO(_FL), KC_RCTL), - - /* Keymap _FL: Function Layer - * ,-----------------------------------------------------------. - * |~ |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| DEL | - * |-----------------------------------------------------------| - * | | |UP | | | | | | | | |BL-|BL+|BL | - * |-----------------------------------------------------------| - * | |LFT|DWN|RGT| | | | | | | | | - * |-----------------------------------------------------------| - * | |FN1|FN2|FN3|FN4|FN5|FN6|FN7|FN8| | | | - * |-----------------------------------------------------------| - * | | | | | | | |RSET| - * `-----------------------------------------------------------' - */ -[_FL] = LAYOUT( - #ifdef RGBLIGHT_ENABLE - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ - KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_INC, BL_TOGG, \ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, RESET), - #else - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ - KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_INC, BL_TOGG, \ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, RESET), - #endif + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, 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_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, LT(1,KC_APP), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, LT(1,KC_APP), KC_RCTL + ), + [1] = 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, XXXXXXX, XXXXXXX, + XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, + XXXXXXX, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, BL_DEC, BL_TOGG, BL_INC, BL_BRTG, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, _______, _______, + _______, _______, _______, XXXXXXX, _______, _______, _______, _______ + ), }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/kc60/keymaps/ws2812/readme.md b/keyboards/kc60/keymaps/ws2812/readme.md deleted file mode 100644 index 49357a0f54a..00000000000 --- a/keyboards/kc60/keymaps/ws2812/readme.md +++ /dev/null @@ -1,21 +0,0 @@ -KC60 with WS2812 RGB Underglow -====================== - -![Image of KC60 with RGB Underglow](https://i.imgur.com/LpUkVqG.jpg) - -## Quantum MK Firmware -For the full Quantum feature list, see [the parent readme.md](/readme.md). - -## WS2812 Support -By default, it is now setup for 16 LEDs on the PF5 breakout pin. See [included image](https://i.imgur.com/TcKL2Sn.jpg) for wiring reference. - -### Build -To build this keymap with WS2812 enabled, simply run `make KEYMAP=ws2812`. - -### Reference Images -![Wiring Reference](https://i.imgur.com/TcKL2Sn.jpg) -![RGB Strip turned on](https://i.imgur.com/21POu4l.jpg) -![RGB Strip turned off](https://i.imgur.com/vAOLYNV.jpg) - -### Additional Credits -Keymap based on work by [TerryMatthews](https://github.com/TerryMathews) for GH60 Satan. diff --git a/keyboards/kc60/keymaps/ws2812/rules.mk b/keyboards/kc60/keymaps/ws2812/rules.mk index 393ff863e0d..72a3d6f6c1a 100644 --- a/keyboards/kc60/keymaps/ws2812/rules.mk +++ b/keyboards/kc60/keymaps/ws2812/rules.mk @@ -1,22 +1,2 @@ - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable WS2812 underglow RGB strip -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 -# 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 - +COMMAND_ENABLE = no +RGBLIGHT_ENABLE = yes diff --git a/keyboards/kc60/mod_rgb_underglow.md b/keyboards/kc60/mod_rgb_underglow.md new file mode 100644 index 00000000000..6aab1e1d2e6 --- /dev/null +++ b/keyboards/kc60/mod_rgb_underglow.md @@ -0,0 +1,31 @@ +# Adding RGB Underglow to the KC60 + +![Image of KC60 with RGB Underglow](https://i.imgur.com/LpUkVqGl.jpg) + +The KC60 has breakout pins to which one may wire a strip of WS2812-compatible LEDs. + +By default, the source is set up for 16 LEDs on the F5 breakout pin. See [included image](https://i.imgur.com/TcKL2Sn.jpg) for wiring reference. If you attach a different number of LEDs, configure your source for the correct number of LEDs by adding a `config.h` file alongside your `keymap.c` file, with the following contents: + +```c +#pragma once + +#undef RGBLED_NUM +#define RGBLED_NUM +``` + +To enable RGB Underglow, simply add a `rules.mk` file containing `RGBLIGHT_ENABLE = yes` alongside your `keymap.c` file, and compile as normal: + +```shell +make kc60: +``` + +The [ws2812 keymap](keymaps/ws2812/) may be copied and used as a starting point. + +RGB Underglow is a fairly large feature, and your firmware may be too large to be flashed with it enabled. Adding `CONSOLE_ENABLE = no` or `COMMAND_ENABLE = no` to your `rules.mk` file will reduce the size of the firmware greatly, and if you don't use either feature, is a very low impact change. + + +## Reference Images + +![Wiring Reference](https://i.imgur.com/TcKL2Sn.jpg) +![RGB Strip turned on](https://i.imgur.com/21POu4l.jpg) +![RGB Strip turned off](https://i.imgur.com/vAOLYNV.jpg) diff --git a/keyboards/kc60/readme.md b/keyboards/kc60/readme.md index e152824ccfc..71888e7503f 100644 --- a/keyboards/kc60/readme.md +++ b/keyboards/kc60/readme.md @@ -1,35 +1,19 @@ -KC60 (version 2.0) keyboard firmware -====================== +# KC60 -## Quantum MK Firmware -For the full Quantum feature list, see [the parent readme.md](/readme.md). +![KC60](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/kc60.jpg) -## Building -Download or clone the whole firmware and navigate to the keyboards/kc60 folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. +A 60% PCB supporting in-switch LEDs, formerly available on AliExpress and (Mass)Drop. Supports ANSI, ISO, split Backspace, and both standard and Tsangan bottom row layouts. -Depending on which keymap you would like to use, you will have to compile slightly differently. +* Keyboard Maintainer: [The QMK Community](https://github.com/qmk) +* Hardware Supported: KC60 v1.6, v2.0; ATmega32U4 +* Hardware Availability: [Drop.com](https://drop.com/buy/kc60-mechanical-keyboard?mode=guest_open) (no longer available) -### Default -To build with the default keymap, simply run `make default`. +Make example for this keyboard (after setting up your build environment): -### Other Keymaps -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` in the keymaps folder, and see keymap document (you can find in top readme.md) and existent keymap files. + make kc60:default -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: +## RGB Underglow Support -``` -$ make [default|jack|] -``` +To add RGB Underglow to the KC60, see [Adding RGB Underglow to the KC60](mod_rgb_underglow.md). -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. - -## WS2812 Support - -Build with WS2812 Support by running `make ws2812`. - -## Warning -For those who want to use 2x1U instead of classic backspace you need to use K0D and K49 like this: -* K0D represents the key at the right of =. -* K49 represents the last key of the row (is wired at the right of the space key on the PCB) - -In kc60.h I've put several definitions' examples of possible layouts proposed by online editor (http://123.57.250.164:9128/). +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kc60/rules.mk b/keyboards/kc60/rules.mk index 487b22c38d4..e1c92de9611 100644 --- a/keyboards/kc60/rules.mk +++ b/keyboards/kc60/rules.mk @@ -19,15 +19,17 @@ MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration -KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key # 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 = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -UNICODE_ENABLE = no # Unicode +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support 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 +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key LAYOUTS = 60_ansi diff --git a/keyboards/keebio/bdn9/bdn9.c b/keyboards/keebio/bdn9/bdn9.c index 0ff55fd6d45..f3842d09897 100644 --- a/keyboards/keebio/bdn9/bdn9.c +++ b/keyboards/keebio/bdn9/bdn9.c @@ -1 +1,18 @@ #include "bdn9.h" + +void eeconfig_init_kb(void) { +#ifdef BACKLIGHT_ENABLE + backlight_enable(); + backlight_level(5); +#endif +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness +#ifdef RGBLIGHT_ANIMATIONS + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default +#endif +#endif + + eeconfig_update_kb(0); + eeconfig_init_user(); +} diff --git a/keyboards/keebio/bdn9/keymaps/via/keymap.c b/keyboards/keebio/bdn9/keymaps/via/keymap.c new file mode 100644 index 00000000000..6ef7a06eaf6 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/via/keymap.c @@ -0,0 +1,52 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _ZERO, + _ONE, + _TWO, + _THREE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_ZERO] = LAYOUT( + KC_MPLY, KC_HOME, KC_MUTE, + MO(1), KC_UP, RGB_MOD, + KC_LEFT, KC_DOWN, KC_RGHT +), + +[_ONE] = LAYOUT( + RESET, BL_STEP, KC_STOP, + _______, KC_HOME, RGB_MOD, + KC_MPRV, KC_END , KC_MNXT +), + +[_TWO] = LAYOUT( + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ +), + +[_THREE] = LAYOUT( + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ +) + +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { + if (clockwise) { + tap_code(KC_WH_U); + } else { + tap_code(KC_WH_D); + } + } +} diff --git a/keyboards/keebio/bdn9/keymaps/via/rules.mk b/keyboards/keebio/bdn9/keymaps/via/rules.mk new file mode 100644 index 00000000000..5b604f2b06d --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +VIA_ENABLE = yes +LINK_TIME_OPTIMIZATION_ENABLE = yes +MOUSEKEY_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = no diff --git a/keyboards/keebio/choconum/config.h b/keyboards/keebio/choconum/config.h index 9eee4eca9bb..d3a0da168b2 100644 --- a/keyboards/keebio/choconum/config.h +++ b/keyboards/keebio/choconum/config.h @@ -147,10 +147,9 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + /* * MIDI options */ diff --git a/keyboards/keebio/chocopad/chocopad.c b/keyboards/keebio/chocopad/chocopad.c index f54753af506..db62f02cc58 100644 --- a/keyboards/keebio/chocopad/chocopad.c +++ b/keyboards/keebio/chocopad/chocopad.c @@ -1 +1,18 @@ #include "chocopad.h" + +void eeconfig_init_kb(void) { +#ifdef BACKLIGHT_ENABLE + backlight_enable(); + backlight_level(5); +#endif +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness +#ifdef RGBLIGHT_ANIMATIONS + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default +#endif +#endif + + eeconfig_update_kb(0); + eeconfig_init_user(); +} diff --git a/keyboards/keebio/dilly/dilly.c b/keyboards/keebio/dilly/dilly.c index 89affe85094..da17277f69f 100644 --- a/keyboards/keebio/dilly/dilly.c +++ b/keyboards/keebio/dilly/dilly.c @@ -1 +1,18 @@ #include "dilly.h" + +void eeconfig_init_kb(void) { +#ifdef BACKLIGHT_ENABLE + backlight_enable(); + backlight_level(3); +#endif +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness +#ifdef RGBLIGHT_ANIMATIONS + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default +#endif +#endif + + eeconfig_update_kb(0); + eeconfig_init_user(); +} diff --git a/keyboards/keebio/ergodicity/ergodicity.c b/keyboards/keebio/ergodicity/ergodicity.c index 0bbcf611784..790dc2f61ef 100644 --- a/keyboards/keebio/ergodicity/ergodicity.c +++ b/keyboards/keebio/ergodicity/ergodicity.c @@ -1,51 +1,18 @@ -/* Copyright 2019 Keebio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General 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 "ergodicity.h" -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - -/* - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); +void eeconfig_init_kb(void) { +#ifdef BACKLIGHT_ENABLE + backlight_enable(); + backlight_level(5); +#endif +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness +#ifdef RGBLIGHT_ANIMATIONS + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default +#endif +#endif + + eeconfig_update_kb(0); + eeconfig_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/keebio/iris/keymaps/333fred/config.h b/keyboards/keebio/iris/keymaps/333fred/config.h index 8a866b826d8..c3997b0f47a 100644 --- a/keyboards/keebio/iris/keymaps/333fred/config.h +++ b/keyboards/keebio/iris/keymaps/333fred/config.h @@ -1,7 +1,5 @@ #pragma once -#include "333fred_config.h" - #define USE_SERIAL #define EE_HANDS #define NO_ACTION_MACRO diff --git a/keyboards/keebio/iris/keymaps/333fred/rules.mk b/keyboards/keebio/iris/keymaps/333fred/rules.mk index 2b5da5a22fb..995272e2f22 100644 --- a/keyboards/keebio/iris/keymaps/333fred/rules.mk +++ b/keyboards/keebio/iris/keymaps/333fred/rules.mk @@ -1,7 +1,4 @@ -NKRO_ENABLE = yes KEY_LOCK_ENABLE = yes -TAP_DANCE_ENABLE = yes CONSOLE_ENABLE = no -PERMISSIVE_HOLD = yes EXTRAFLAGS += -flto diff --git a/keyboards/keebio/iris/keymaps/dvorak/config.h b/keyboards/keebio/iris/keymaps/dvorak/config.h new file mode 100644 index 00000000000..d37d3c3123c --- /dev/null +++ b/keyboards/keebio/iris/keymaps/dvorak/config.h @@ -0,0 +1,33 @@ +/* +Copyright 2017 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL + +/* Select hand configuration */ + +#define MASTER_LEFT + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/keebio/iris/keymaps/dvorak/keebio_iris_rev2_layout_dvorak.json b/keyboards/keebio/iris/keymaps/dvorak/keebio_iris_rev2_layout_dvorak.json new file mode 100644 index 00000000000..be5cc37938c --- /dev/null +++ b/keyboards/keebio/iris/keymaps/dvorak/keebio_iris_rev2_layout_dvorak.json @@ -0,0 +1,192 @@ +{ + "author": "", + "layers": [ + [ + "KC_ESC", + "KC_1", + "KC_2", + "KC_3", + "KC_4", + "KC_5", + "KC_6", + "KC_7", + "KC_8", + "KC_9", + "KC_0", + "KC_BSPC", + "KC_TAB", + "KC_QUOT", + "KC_COMM", + "KC_DOT", + "KC_P", + "KC_Y", + "KC_F", + "KC_G", + "KC_C", + "KC_R", + "KC_L", + "KC_SLSH", + "KC_LCTL", + "KC_A", + "KC_O", + "KC_E", + "KC_U", + "KC_I", + "KC_D", + "KC_H", + "KC_T", + "KC_N", + "KC_S", + "KC_MINS", + "KC_LSFT", + "KC_SCLN", + "KC_Q", + "KC_J", + "KC_K", + "KC_X", + "KC_HOME", + "KC_END", + "KC_B", + "KC_M", + "KC_W", + "KC_V", + "KC_Z", + "KC_RSFT", + "MO(1)", + "KC_LGUI", + "KC_ENT", + "KC_SPC", + "KC_RALT", + "MO(2)" + ], + [ + "KC_TILD", + "KC_EXLM", + "KC_AT", + "KC_HASH", + "KC_DLR", + "KC_PERC", + "KC_CIRC", + "KC_AMPR", + "KC_ASTR", + "KC_LPRN", + "KC_RPRN", + "KC_BSPC", + "RESET", + "KC_1", + "KC_2", + "KC_3", + "KC_4", + "KC_5", + "KC_6", + "KC_7", + "KC_8", + "KC_9", + "KC_0", + "KC_GRV", + "KC_DEL", + "KC_NO", + "KC_LEFT", + "KC_RGHT", + "KC_UP", + "KC_LCBR", + "KC_RCBR", + "KC_P4", + "KC_P5", + "KC_P6", + "KC_PPLS", + "KC_BSPC", + "BL_INC", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_DOWN", + "KC_LBRC", + "KC_LPRN", + "KC_RPRN", + "KC_RBRC", + "KC_P1", + "KC_P2", + "KC_P3", + "KC_PMNS", + "KC_PIPE", + "KC_NO", + "KC_NO", + "KC_DEL", + "KC_DEL", + "KC_NO", + "KC_P0" + ], + [ + "KC_F12", + "KC_F1", + "KC_F2", + "KC_F3", + "KC_F4", + "KC_F5", + "KC_F6", + "KC_F7", + "KC_F8", + "KC_F9", + "KC_F10", + "KC_F11", + "RGB_TOG", + "KC_EXLM", + "KC_AT", + "KC_HASH", + "KC_DLR", + "KC_PERC", + "KC_CIRC", + "KC_AMPR", + "KC_ASTR", + "KC_LPRN", + "KC_RPRN", + "KC_NO", + "RGB_MOD", + "KC_MRWD", + "KC_MFFD", + "KC_VOLU", + "KC_PGUP", + "KC_UNDS", + "KC_PEQL", + "KC_HOME", + "RGB_HUI", + "RGB_SAI", + "RGB_VAI", + "KC_BSLS", + "KC_MUTE", + "KC_MSTP", + "KC_MPLY", + "KC_VOLD", + "KC_PGDN", + "KC_PMNS", + "KC_NO", + "KC_NO", + "KC_PPLS", + "KC_END", + "RGB_HUD", + "RGB_SAD", + "RGB_VAD", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO" + ] + ], + "layout": "LAYOUT", + "keymap": "keebio_iris_rev2_layout_dvorak.json", + "keyboard": "keebio/iris/rev2", + "documentation": "\"This file is a QMK Configurator export. You can import this at . It can also be used directly with QMK's source code. + +To setup your QMK environment check out the tutorial: + +You can convert this file to a keymap.c using this command: `qmk json2c {keymap}` + +You can compile this keymap using this command: `qmk compile {keymap}`\" +", + "notes": "", + "version": 1 +} diff --git a/keyboards/keebio/iris/keymaps/dvorak/keymap.c b/keyboards/keebio/iris/keymaps/dvorak/keymap.c new file mode 100644 index 00000000000..3f0886521c7 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/dvorak/keymap.c @@ -0,0 +1,73 @@ +#include QMK_KEYBOARD_H +enum my_layers { + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; + +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_DVORAK] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_HOME, KC_END, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + LOWER, KC_LGUI, KC_ENT, KC_SPC, KC_RALT, RAISE + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_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, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + RESET, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRAVE, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_DEL, _______, KC_LEFT, KC_RGHT, KC_UP, KC_LBRC, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_BSPC, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + BL_STEP, _______, _______, _______, KC_DOWN, KC_LCBR, KC_LPRN, KC_RPRN, KC_RCBR, KC_P1, KC_P2, KC_P3, KC_MINS, KC_PIPE, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, KC_DEL, KC_DEL, _______, KC_P0 + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_RAISE] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + RGB_TOG, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + RGB_MOD, KC_MPRV, KC_MNXT, KC_VOLU, KC_PGUP, KC_UNDS, KC_EQL, KC_HOME, RGB_HUI, RGB_SAI, RGB_VAI, KC_BSLS, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_MUTE, KC_MSTP, KC_MPLY, KC_VOLD, KC_PGDN, KC_MINS, _______, _______, KC_PLUS, KC_END, RGB_HUD, RGB_SAD, RGB_VAD, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, _______, _______, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_ADJUST] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, _______, _______, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/keebio/iris/keymaps/dvorak/readme.md b/keyboards/keebio/iris/keymaps/dvorak/readme.md new file mode 100644 index 00000000000..8397ef84acd --- /dev/null +++ b/keyboards/keebio/iris/keymaps/dvorak/readme.md @@ -0,0 +1,16 @@ + +![Iris Dvorak keymap](https://i.imgur.com/DXESYqV.png) + +# Dvorak + +``` +make keebio/iris/rev2:dvorak +``` +``` +make keebio/iris/rev3:dvorak +``` +``` +make keebio/iris/rev4:dvorak +``` + +Tested with Iris rev. 2 diff --git a/keyboards/keebio/iris/keymaps/dvorak/rules.mk b/keyboards/keebio/iris/keymaps/dvorak/rules.mk new file mode 100644 index 00000000000..d7463419b4f --- /dev/null +++ b/keyboards/keebio/iris/keymaps/dvorak/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = yes diff --git a/keyboards/keebio/iris/keymaps/khitsule/config.h b/keyboards/keebio/iris/keymaps/khitsule/config.h new file mode 100644 index 00000000000..62760cce35c --- /dev/null +++ b/keyboards/keebio/iris/keymaps/khitsule/config.h @@ -0,0 +1,24 @@ +/* +Copyright 2017 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +// #define USE_I2C +#define EE_HANDS +#define IGNORE_MOD_TAP_INTERRUPT + +#undef RGBLED_NUM diff --git a/keyboards/keebio/iris/keymaps/khitsule/keymap.c b/keyboards/keebio/iris/keymaps/khitsule/keymap.c new file mode 100644 index 00000000000..3e99cd6b0ab --- /dev/null +++ b/keyboards/keebio/iris/keymaps/khitsule/keymap.c @@ -0,0 +1,153 @@ +#include QMK_KEYBOARD_H + +enum layers { + _QWERTY, + _GAME, + _LOWER, + _RAISE, + _ADJUST +}; + +// define keycode macros for readability +#define KM_DLEFT LGUI(LCTL(KC_LEFT)) +#define KM_DRIGHT LGUI(LCTL(KC_RIGHT)) +#define TSKMGR LCTL(LSFT(KC_ESC)) +#define KC_LCBR LSFT(KC_LBRC) +#define KC_RCBR LSFT(KC_RBRC) + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + GAME, + LOWER, + RAISE, + ADJUST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_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_ENT, KC_DEL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + KC_LALT, LT(_LOWER, KC_TAB), CTL_T(KC_SPC), SFT_T(KC_BSPC), MO(_RAISE), KC_LGUI + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_GAME] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, MO(_LOWER), KC_SPC, _______, TO(_QWERTY), _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_LOWER] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + LALT(KC_F4), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, KC_LPRN, KC_RPRN, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_MUTE, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, KC_NLCK, KC_LBRC, KC_RBRC, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, _______, KC_LCBR, KC_RCBR, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_VOLD, KC_MPRV, KC_MPLY, KC_MNXT, KM_DLEFT, KM_DRIGHT,_______, _______, _______, _______, _______, _______, _______, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, _______, _______, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_RAISE] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PLUS, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PMNS, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_P1, KC_P2, KC_P3, KC_EQL, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, _______, _______, _______, TO(_GAME) + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + [_ADJUST] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, _______, _______, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + else if (index == 1) { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } +} diff --git a/keyboards/keebio/iris/keymaps/khitsule/readme.md b/keyboards/keebio/iris/keymaps/khitsule/readme.md new file mode 100644 index 00000000000..ad848063174 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/khitsule/readme.md @@ -0,0 +1,31 @@ +# Iris Layout by Khitsule + +![Khitsule](https://i.imgur.com/BIzu3RZ.png) + +[KLE link](http://www.keyboard-layout-editor.com/#/gists/856ad949a89c47fa84c808ba17ae10c5) + +## Layers + +| Layer | Legend | +| ----- | ------ | +| Base | Centre (black) | +| Game | Centre (black) - see below | +| Lower | Bottom (purple) | +| Raise | Top (pink) | + +## Features + +* Raise/lower layers focus first on one-handed use +* Numpad on right hand with raise layer +* Game layer to be used as a gamepad + * Accessed by gui key in raise layer, return with the raise key + * Same as base layer **except** numbers 1-5 replaced with F1-F5; dual function removed from thumb keys (dedicated lower and space) + * Numbers to F1-F5 is designed to be used with a mouse such as the Naga that has numbers + * Lower layer gives one-handed access to arrows and F6-F10 as well +* Navigation on left hand with lower layer + * D refers to desktop left/right on Win 10 (win+ctrl+left/right) +* Use of hold/tap dual function keys + * Ctrl/Space + * Shift/Backspace + * Lower/Tab +* Dedicated ctrl and shift to allow for navigation shortcuts with ctrl+shift+nav diff --git a/keyboards/keebio/iris/keymaps/khitsule/rules.mk b/keyboards/keebio/iris/keymaps/khitsule/rules.mk new file mode 100644 index 00000000000..b6c9a258059 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/khitsule/rules.mk @@ -0,0 +1,2 @@ +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = no diff --git a/keyboards/keebio/iris/keymaps/pvinis/config.h b/keyboards/keebio/iris/keymaps/pvinis/config.h index b2fb43be917..9574f2a837f 100644 --- a/keyboards/keebio/iris/keymaps/pvinis/config.h +++ b/keyboards/keebio/iris/keymaps/pvinis/config.h @@ -1,24 +1,36 @@ #pragma once - #ifdef PRODUCT - #undef PRODUCT - #define PRODUCT Iris Keyboard - pvinis +# undef PRODUCT +# define PRODUCT Iris Keyboard - pvinis #endif - -// Use I2C or Serial, not both +// Use I2C or Serial, not both. #define USE_SERIAL // #define USE_I2C - -// Select hand configuration -#define MASTER_LEFT -// #define MASTER_RIGHT +// Select hand configuration. +// #define MASTER_LEFT +#define MASTER_RIGHT // #define EE_HANDS - -// choose pin to use for audio. c6 is the one iris uses. +// Choose pin to use for audio. C6 is the one iris uses. #ifdef AUDIO_ENABLE - #define C6_AUDIO +# define C6_AUDIO +# define STARTUP_SONG SONG(NO_SOUND) // No startup song. +#endif + +#ifdef RGBLIGHT_ENABLE +# undef RGBLED_NUM +# define RGBLED_NUM 16 +#endif + +#ifdef ENCODER_ENABLE +# define ENCODERS_PAD_A \ + { F5 } // I connected the encoder to F4 and F5. +# define ENCODERS_PAD_B \ + { F4 } +// #define ENCODERS_PAD_A_RIGHT { B5 } +// #define ENCODERS_PAD_B_RIGHT { C6 } +# define ENCODER_RESOLUTION 2 #endif diff --git a/keyboards/keebio/iris/keymaps/pvinis/keymap.c b/keyboards/keebio/iris/keymaps/pvinis/keymap.c index 2f6d5a6b47c..5c61c1321eb 100644 --- a/keyboards/keebio/iris/keymaps/pvinis/keymap.c +++ b/keyboards/keebio/iris/keymaps/pvinis/keymap.c @@ -1,16 +1,16 @@ // pvinis iris -// ,-----------------------------. ,-----------------------------. -// | | | | | | | | | | | | | | -// |----+----+----+----+----+----| |----+----+----+----+----+----| -// | | | | | | | | | | | | | | -// |----+----+----+----x----x----| |----x----x----+----+----+----| -// | | | | | | | | | | | | | | -// |----+----+----+----x----x----+----. ,----|----x----x----+----+----+----| -// | | | | | | | | | | | | | | | | -// `-------------------+----+----+----/ \----+----+----+-------------------' -// | | | | | | | | -// `----+---------' `--------------' - +// make keebio/iris/rev2:pvinis:avrdude +// ,-----------------------------. ┌────┬────┬────┬────┬────┬────┐ +// | | | | | | | │ │ │ │ │ │ │ +// |----+----+----+----+----+----| ├────┼────┼────┼────┼────┼────┤ +// | | | | | | | │ │ │ │ │ │ │ +// |----+----+----+----x----x----| ├────╆━━━━╅────┼────┼────┼────┤ +// | | | | | | | │ ┃ ┃ │ │ │ │ +// |----+----+----+----x----x----+----. ┌────┼────╄━━━━╃────┼────┼────┼────┤ +// | | | | | | | | │ │ │ │ │ │ │ │ +// `-------------------+----+----+----/ └┬───┴┬───┴┬───┴┬───┴────┴────┴────┘ +// | | | | │ │ │ │ +// `----+---------' └────┴────┴────┘ #include QMK_KEYBOARD_H #include "pvinis.h" @@ -19,102 +19,179 @@ //#include "eeconfig.h" #ifdef AUDIO_ENABLE - #include "audio.h" +# include "audio.h" #endif #ifdef AUDIO_ENABLE - // #define STARTUP_SONG SONG(SONIC_RING) +// #define STARTUP_SONG SONG(SONIC_RING) #endif #ifdef AUDIO_ENABLE - float tone_sonic[][2] = SONG(IN_LIKE_FLINT); - float tone_1[][2] = SONG(QWERTY_SOUND); - float tone_2[][2] = SONG(OLD_SPICE); - float tone_3[][2] = SONG(OVERWATCH_THEME); - float tone_4[][2] = SONG(QWERTY_SOUND); +// float n04[][2] = SONG(CLOSE_ENCOUNTERS_5_NOTE); +// float n10[][2] = SONG(STARTUP_SOUND); +// float n11[][2] = SONG(GOODBYE_SOUND); +// float n12[][2] = SONG(PLANCK_SOUND); +// float n19[][2] = SONG(MUSIC_ON_SOUND); +// float n20[][2] = SONG(AUDIO_ON_SOUND); +// float n29[][2] = SONG(CAPS_LOCK_ON_SOUND); +// float n30[][2] = SONG(CAPS_LOCK_OFF_SOUND); +// float n31[][2] = SONG(SCROLL_LOCK_ON_SOUND); +// float n32[][2] = SONG(SCROLL_LOCK_OFF_SOUND); +// float n33[][2] = SONG(NUM_LOCK_ON_SOUND); +// float n34[][2] = SONG(NUM_LOCK_OFF_SOUND); +// float n40[][2] = SONG(ONE_UP_SOUND); +// float n49[][2] = SONG(E1M1_DOOM); +// float n53[][2] = SONG(OLD_SPICE); +// float n56[][2] = SONG(RICK_ROLL); +// float n57[][2] = SONG(FF_PRELUDE); +// RGB_MODE_KNIGHT +// float n78[][2] = SONG(KATAMARI_ROLLING_STAR); #endif - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - // ,-----------------------------. ,-----------------------------. - // | | | | | |QWER| | | | | | | | - // |----+----+----+----+----+----| |----+----+----+----+----+----| - // |Tab | | | | |CARP| | | | | | |Del | - // |----+----+----+----x----x----| |----x----x----+----+----+----| - // |EscC| | | | | | | | | | | |Ent | - // |----+----+----+----x----x----+----. ,----|----x----x----+----+----+----| - // |LSft| | | | | |Home| |End | | | | | |Rsft| - // `-------------------+----+----+----/ \----+----+----+-------------------' - // |Cmd |LOWR|Bspc| |Spc |RASE|RAlt| - // `----+---------' `--------------' - [LR_BASE] = LAYOUT_wrapper( - _______, _______, _______, _______, _______, QWERTY , _______, _______, _______, _______, _______, _______, - KC_TAB , _______, _______, _______, _______, CARPALX, _______, _______, _______, _______, _______, KC_DEL , - PV_ESCC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT , - KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, - KC_LGUI, SYMBOL , KC_BSPC, KC_SPC , SYSCTL , KC_RALT - ), + // ,-----------------------------. ,-----------------------------. + // | | | | |GAME|QWER| | | | | | | | + // |----+----+----+----+----+----| |----+----+----+----+----+----| + // |Tab | | | | |CRPL| | | | | | |Del | + // |----+----+----+----x----x----| |----x----x----+----+----+----| + // |EscC| | | | | | | | | | | |Ent | + // |----+----+----+----x----x----+----. ,----|----x----x----+----+----+----| + // |LSft| | | | | |Home| |End | | | | | |Rsft| + // `-------------------+----+----+----/ \----+----+----+-------------------' + // |Cmd |LOWR|Bspc| |Spc |RASE|RAlt| + // `----+---------' `--------------' + [LR_BASE] = LAYOUT_wrapper( + // clang-format off + KC_MUTE, _______, _______, _______, GAME1 , QWERTY , KC_1 , _______, _______, _______, _______, _______, + KC_TAB , ___________________________________________, ___________________________________________, KC_DEL , + PV_ESCC, ___________________________________________, ___________________________________________, KC_ENT , + KC_LSFT, ___________________________________________, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, + KC_LGUI, SYMBOL , KC_BSPC, KC_SPC , SYSCTL , KC_RALT + // clang-format on + ), + + // ,-----------------------------. ,-----------------------------. + // | | NUMBERS_L | | NUMBERS_R | | + // |----+----+----+----+----+----| |----+----+----+----+----+----| + // | | | | | | + // |----+ | | +----| + // | | QWERTY_L | | QWERTY_R | | + // |----+ +----. ,----| +----| + // | | | | | | | | + // `-------------------+----+----+----/ \----+----+----+-------------------' + // | | | | | | | | + // `----+---------' `--------------' + [LR_QWERTY] = LAYOUT_wrapper( + // clang-format off + _______, ________________NUMBERS_L__________________, ________________NUMBERS_R__________________, _______, + _______, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, _______, + _______, _____________MOD_QWERTY_L2_________________, _________________QWERTY_R2_________________, _______, + _______, _________________QWERTY_L3_________________, _______, _______, _________________QWERTY_R3_________________, _______, + _______, _______, _______, _______, _______, _______ + // clang-format on + ), - // ,-----------------------------. ,-----------------------------. - // | | NUMBERS_L | | NUMBERS_R | | - // |----+----+----+----+----+----| |----+----+----+----+----+----| - // | | | | | | - // |----+ | | +----| - // | | QWERTY_L | | QWERTY_R | | - // |----+ +----. ,----| +----| - // | | | | | | | | - // `-------------------+----+----+----/ \----+----+----+-------------------' - // | | | | | | | | - // `----+---------' `--------------' - [LR_QWERTY] = LAYOUT_wrapper( - _______, ________________NUMBERS_L__________________, ________________NUMBERS_R__________________, _______, - _______, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, _______, - _______, _____________MOD_QWERTY_L2_________________, _____________MOD_QWERTY_R2_________________, _______, - _______, _________________QWERTY_L3_________________, _______, _______, _________________QWERTY_R3_________________, _______, - _______, _______, _______, _______, _______, _______ - ), + // ,-----------------------------. ,-----------------------------. + // | | NUMBERS_L | | NUMBERS_R | | + // |----+----+----+----+----+----| |----+----+----+----+----+----| + // | | | | | | + // |----+ | | +----| + // | | CARPALX_L | | CARPALX_R | | + // |----+ +----. ,----| +----| + // | | | | | | | | + // `-------------------+----+----+----/ \----+----+----+-------------------' + // | | | | | | | | + // `----+---------' `--------------' + [LR_CARPALX] = LAYOUT_wrapper( + // clang-format off + _______, ________________NUMBERS_L__________________, ________________NUMBERS_R__________________, _______, + _______, ________________CARPALX_L1_________________, ________________CARPALX_R1_________________, _______, + _______, ________________CARPALX_L2_________________, ________________CARPALX_R2_________________, _______, + _______, ________________CARPALX_L3_________________, _______, _______, ________________CARPALX_R3_________________, _______, + _______, _______, _______, _______, _______, _______ + // clang-format on + ), - // ,-----------------------------. ,-----------------------------. - // | | NUMBERS_L | | NUMBERS_R | | - // |----+----+----+----+----+----| |----+----+----+----+----+----| - // | | | | | | - // |----+ | | +----| - // | | CARPALX_L | | CARPALX_R | | - // |----+ +----. ,----| +----| - // | | | | | | | | - // `-------------------+----+----+----/ \----+----+----+-------------------' - // | | | | | | | | - // `----+---------' `--------------' - [LR_CARPALX] = LAYOUT_wrapper( - _______, ________________NUMBERS_L__________________, ________________NUMBERS_R__________________, _______, - _______, ________________CARPALX_L1_________________, ________________CARPALX_R1_________________, _______, - _______, ________________CARPALX_L2_________________, ________________CARPALX_R2_________________, _______, - _______, ________________CARPALX_L3_________________, _______, _______, ________________CARPALX_R3_________________, _______, - _______, _______, _______, _______, _______, _______ - ), + [LR_SYMBOL] = LAYOUT_wrapper( + // clang-format off + KC_F12 , ______________________F_L__________________, ______________________F_R__________________, KC_F11 , + _______, _________________SYMBOL_L1_________________, _________________SYMBOL_R1_________________, _______, + _______, _________________SYMBOL_L2_________________, _________________SYMBOL_R2_________________, _______, + _______, _________________SYMBOL_L3_________________, _______, _______, _________________SYMBOL_R3_________________, _______, + _______, _______, _______, _______, _______, _______ + // clang-format on + ), - [LR_SYMBOL] = LAYOUT_wrapper( - KC_F12 , ______________________F_L__________________, ______________________F_R__________________, KC_F11 , - _______, _________________SYMBOL_L1_________________, _________________SYMBOL_R1_________________, _______, - _______, _________________SYMBOL_L2_________________, _________________SYMBOL_R2_________________, _______, - _______, _________________SYMBOL_L3_________________, _______, _______, _________________SYMBOL_R3_________________, _______, - _______, _______, _______, _______, _______, _______ - ), + [LR_SYSCTL] = LAYOUT_wrapper( + // clang-format off + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _________________SYSCTL_L1_________________, _________________SYSCTL_R1_________________, _______, + _______, _________________SYSCTL_L2_________________, _________________SYSCTL_R2_________________, _______, + _______, _________________SYSCTL_L3_________________, _______, _______, _________________SYSCTL_R3_________________, _______, + _______, _______, _______, _______, _______, _______ + // clang-format on + ), - [LR_SYSCTL] = LAYOUT_wrapper( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _________________SYSCTL_R1_________________, _______, - _______, _______, _______, _______, _______, _______, _________________SYSCTL_R2_________________, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _________________SYSCTL_R3_________________, _______, - _______, _______, _______, _______, _______, _______ - ), + [LR_KBCTL] = LAYOUT_wrapper( + // clang-format off + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, __________________KBCTL_L1_________________, __________________KBCTL_R1_________________, XXXXXXX, + XXXXXXX, __________________KBCTL_L2_________________, __________________KBCTL_R2_________________, XXXXXXX, + BASE , __________________KBCTL_L3_________________, XXXXXXX, XXXXXXX, __________________KBCTL_R3_________________, XXXXXXX, + XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX + // clang-format on + ), - [LR_KBCTL] = LAYOUT_wrapper( - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, __________________KBCTL_L1_________________, __________________KBCTL_R1_________________, XXXXXXX, - XXXXXXX, __________________KBCTL_L2_________________, __________________KBCTL_R2_________________, XXXXXXX, - BASE , __________________KBCTL_L3_________________, XXXXXXX, XXXXXXX, __________________KBCTL_R3_________________, XXXXXXX, - XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX - ) + // ,-----------------------------. ,-----------------------------. + // | | NUMBERS_L | | NUMBERS_R | | + // |----+----+----+----+----+----| |----+----+----+----+----+----| + // | | | | | | + // |----+ | | +----| + // |ESC | QWERTY_L | | QWERTY_R | | + // |----+ +----. ,----| +----| + // | | | | | | | | + // `-------------------+----+----+----/ \----+----+----+-------------------' + // | |SPC | | | | | | + // `----+---------' `--------------' + [LR_GAME1] = LAYOUT_wrapper( + // clang-format off + _______, ________________NUMBERS_L__________________, ________________NUMBERS_R__________________, KC_BSPC, + _______, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, QWERTY , + KC_ESC , _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, _______, + _______, _________________QWERTY_L3_________________, _______, _______, _________________QWERTY_R3_________________, _______, + _______, _______, KC_SPC , _______, _______, _______ + // clang-format on + ), + + [LR_GAME2] = LAYOUT_wrapper( + // clang-format off + _______, ________________NUMBERS_L__________________, ________________NUMBERS_R__________________, KC_BSPC, + _______, _________________QWERTY_L1_________________, KC_Y , KC_U , KC_UP , KC_O , KC_P , QWERTY , + KC_ESC , _________________QWERTY_L2_________________, KC_H , KC_LEFT, KC_DOWN, KC_RGHT, KC_SCLN, _______, + _______, _________________QWERTY_L3_________________, _______, _______, _________________QWERTY_R3_________________, _______, + _______, _______, KC_SPC , _______, _______, _______ + // clang-format on + ), }; + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + // if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + // } +} +#endif + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { +#ifdef AUDIO_ENABLE +// case PV_S04: if (record->event.pressed) PLAY_SONG(n04); return false; break; +#endif + } + return true; // Process everything else normally +} diff --git a/keyboards/keebio/iris/keymaps/pvinis/rules.mk b/keyboards/keebio/iris/keymaps/pvinis/rules.mk index 899312894b0..deeb3120363 100644 --- a/keyboards/keebio/iris/keymaps/pvinis/rules.mk +++ b/keyboards/keebio/iris/keymaps/pvinis/rules.mk @@ -1,2 +1,9 @@ -AUDIO_ENABLE = no # off for now -RGBLIGHT_ENABLE = no # off for now +TAP_DANCE_ENABLE = yes +AUDIO_ENABLE = no # piezo speaker sounds +RGBLIGHT_ENABLE = yes # rgb leds underlight +ENCODER_ENABLE = yes # rotary knob + +# Some extra stuff to make firmware smaller. +LINK_TIME_OPTIMIZATION_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = no diff --git a/keyboards/keebio/iris/rev2/rev2.c b/keyboards/keebio/iris/rev2/rev2.c index 8575243f0d2..70c30695ad9 100644 --- a/keyboards/keebio/iris/rev2/rev2.c +++ b/keyboards/keebio/iris/rev2/rev2.c @@ -1,12 +1,5 @@ #include "rev2.h" -#ifdef SSD1306OLED -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - led_set_user(usb_led); -} -#endif - #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) // swap-hands action needs a matrix to define the swap @@ -26,3 +19,19 @@ const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { }; #endif +void eeconfig_init_kb(void) { +#ifdef BACKLIGHT_ENABLE + backlight_enable(); + backlight_level(3); +#endif +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness +#ifdef RGBLIGHT_ANIMATIONS + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default +#endif +#endif + + eeconfig_update_kb(0); + eeconfig_init_user(); +} diff --git a/keyboards/keebio/iris/rev3/rev3.c b/keyboards/keebio/iris/rev3/rev3.c index 7e49330c1da..f58c2093c41 100644 --- a/keyboards/keebio/iris/rev3/rev3.c +++ b/keyboards/keebio/iris/rev3/rev3.c @@ -1,12 +1,5 @@ #include "rev3.h" -#ifdef SSD1306OLED -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - led_set_user(usb_led); -} -#endif - #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) // swap-hands action needs a matrix to define the swap @@ -25,3 +18,20 @@ const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}}, }; #endif + +void eeconfig_init_kb(void) { +#ifdef BACKLIGHT_ENABLE + backlight_enable(); + backlight_level(3); +#endif +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness +#ifdef RGBLIGHT_ANIMATIONS + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default +#endif +#endif + + eeconfig_update_kb(0); + eeconfig_init_user(); +} diff --git a/keyboards/keebio/iris/rev4/rev4.c b/keyboards/keebio/iris/rev4/rev4.c index bd0989acb30..de2ba26db3a 100644 --- a/keyboards/keebio/iris/rev4/rev4.c +++ b/keyboards/keebio/iris/rev4/rev4.c @@ -1 +1,18 @@ #include "rev4.h" + +void eeconfig_init_kb(void) { +#ifdef BACKLIGHT_ENABLE + backlight_enable(); + backlight_level(3); +#endif +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness +#ifdef RGBLIGHT_ANIMATIONS + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default +#endif +#endif + + eeconfig_update_kb(0); + eeconfig_init_user(); +} diff --git a/keyboards/keebio/levinson/rev2/rev2.c b/keyboards/keebio/levinson/rev2/rev2.c index 573fa787baa..8e65af7ade4 100644 --- a/keyboards/keebio/levinson/rev2/rev2.c +++ b/keyboards/keebio/levinson/rev2/rev2.c @@ -1,22 +1,18 @@ #include "levinson.h" -#ifdef SSD1306OLED -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - led_set_user(usb_led); -} +void eeconfig_init_kb(void) { +#ifdef BACKLIGHT_ENABLE + backlight_enable(); + backlight_level(5); +#endif +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness +#ifdef RGBLIGHT_ANIMATIONS + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default +#endif #endif -void matrix_init_kb(void) { - - // // green led on - // DDRD |= (1<<5); - // PORTD &= ~(1<<5); - - // // orange led on - // DDRB |= (1<<0); - // PORTB &= ~(1<<0); - - matrix_init_user(); -}; - + eeconfig_update_kb(0); + eeconfig_init_user(); +} diff --git a/keyboards/keebio/levinson/rev3/rev3.c b/keyboards/keebio/levinson/rev3/rev3.c index 573fa787baa..8e65af7ade4 100644 --- a/keyboards/keebio/levinson/rev3/rev3.c +++ b/keyboards/keebio/levinson/rev3/rev3.c @@ -1,22 +1,18 @@ #include "levinson.h" -#ifdef SSD1306OLED -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - led_set_user(usb_led); -} +void eeconfig_init_kb(void) { +#ifdef BACKLIGHT_ENABLE + backlight_enable(); + backlight_level(5); +#endif +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness +#ifdef RGBLIGHT_ANIMATIONS + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default +#endif #endif -void matrix_init_kb(void) { - - // // green led on - // DDRD |= (1<<5); - // PORTD &= ~(1<<5); - - // // orange led on - // DDRB |= (1<<0); - // PORTB &= ~(1<<0); - - matrix_init_user(); -}; - + eeconfig_update_kb(0); + eeconfig_init_user(); +} diff --git a/keyboards/keebio/nyquist/keymaps/georgepetri3/config.h b/keyboards/keebio/nyquist/keymaps/georgepetri3/config.h new file mode 100644 index 00000000000..2e84fa0d531 --- /dev/null +++ b/keyboards/keebio/nyquist/keymaps/georgepetri3/config.h @@ -0,0 +1,25 @@ +/* +Copyright 2017 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#define RGBLIGHT_LAYERS + +#define TAPPING_TOGGLE 2 +#define TAPPING_TERM 150 + +#define USE_I2C diff --git a/keyboards/keebio/nyquist/keymaps/georgepetri3/keymap.c b/keyboards/keebio/nyquist/keymaps/georgepetri3/keymap.c new file mode 100644 index 00000000000..a20c0d9351a --- /dev/null +++ b/keyboards/keebio/nyquist/keymaps/georgepetri3/keymap.c @@ -0,0 +1,106 @@ +#include QMK_KEYBOARD_H +#define _BASE 0 +#define _L 1 +#define _R 2 + +#define KC_TL LCTL(KC_PGUP) +#define KC_TR LCTL(KC_PGDN) +#define KC_TC LCTL(KC_W) +#define KC_TRO LCTL(LSFT(KC_T)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_BASE] = LAYOUT( +//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_BSPC, +//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_DEL , +//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_ESC , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, +//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_ENT , +//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_CAPS, KC_LCTL, KC_LGUI, KC_LALT, MO(_L) , KC_SPC , KC_RSFT, TT(_R) , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT +//└────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_L] = LAYOUT( +//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , _______, +//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_F11 , KC_F12 , _______, _______, _______, _______, KC_MINS, KC_EQL , KC_LBRC, KC_RBRC, KC_BSLS, +//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______, _______, +//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_PGUP, KC_HOME, KC_END , _______, +//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +//└────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_R] = LAYOUT( +//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_TL , KC_TR , KC_TC , KC_TRO , _______, _______, KC_TL , KC_TR , KC_TC , KC_TRO , _______, +//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______, _______, +//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_PGDN, KC_PGUP, KC_HOME, KC_END , _______, _______, KC_PGDN, KC_PGUP, KC_HOME, KC_END , _______, +//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +//└────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┘ + ) +}; + +const rgblight_segment_t PROGMEM left[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 12, HSV_SPRINGGREEN} +); + +const rgblight_segment_t PROGMEM right[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 12, HSV_RED} +); + +const rgblight_segment_t PROGMEM capslock[] = RGBLIGHT_LAYER_SEGMENTS( + {2, 3, HSV_GOLD}, + {6, 1, HSV_GOLD}, + {11, 1, HSV_GOLD} +); + +const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST(left, right, capslock); + +void keyboard_post_init_user(void) { + rgblight_sethsv_noeeprom(HSV_BLUE); + rgblight_layers = rgb_layers; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + rgblight_set_layer_state(0, layer_state_cmp(state, _L)); + rgblight_set_layer_state(1, layer_state_cmp(state, _R)); + return state; +} + +void suspend_power_down_user(void) { + rgblight_disable(); +} + +void suspend_wakeup_init_user(void) { + rgblight_enable(); +} + +bool is_shift_pressed = false; + +bool led_update_user(led_t led_state) { + rgblight_set_layer_state(2, is_shift_pressed != led_state.caps_lock); + return true; +} + +bool process_record_user(uint16_t keycode, keyrecord_t* record) { + switch (keycode) { + case KC_LSFT: + case KC_RSFT: + is_shift_pressed = record->event.pressed; + rgblight_set_layer_state(2, is_shift_pressed != host_keyboard_led_state().caps_lock); + default: + return true; + } +} diff --git a/keyboards/keebio/nyquist/keymaps/georgepetri3/readme.md b/keyboards/keebio/nyquist/keymaps/georgepetri3/readme.md new file mode 100644 index 00000000000..db4af6b314a --- /dev/null +++ b/keyboards/keebio/nyquist/keymaps/georgepetri3/readme.md @@ -0,0 +1,52 @@ +# George Petri's Nyquist rev3 layout + +``` +sudo make keebio/nyquist/rev3:georgepetri3:dfu +``` + +Features a dedicated navigation layer on rise and current layer status on rgb underglow. + +### Base Layer +``` +┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ +│ GRAVE│ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ BSPC │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ TAB │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ DEL │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ ESC │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ SCLN│ QUOT │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ LSFT│ Z │ X │ C │ V │ B │ │ N │ M │ COMM│ DOT │ SLSH│ ENT │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ CAPS│ LCTL│ LGUI │ LALT │MO(_L)│ SPC │ │ RSFT│MO(_R)│ LEFT│ DOWN│ UP │ RGHT │ +└──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┘ +``` + +### Lower +``` +┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ +│ │ F1 │ F2 │ F3 │ F4 │ F5 │ │ F6 │ F7 │ F8 │ F9 │ F10 │ │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ │ F11 │ F12 │ │ │ │ │ │ MINS│ EQL │ LBRC│ RBRC│ BSLS │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ │ │ │ │ │ │ │ LEFT│ DOWN│ UP │ RGHT│ │ │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ │ │ │ │ │ │ │ │ PGDN│ PGUP │ HOME│ END │ │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +└──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┘ +``` + +### Rise +``` +┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ │ TAB_L│ TAB_R│ TAB_C│ TAB_R│ │ │ │ TAB_L│ TAB_R│ TAB_C│ TAB_R│ │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ │ LEFT│ DOWN│ UP │ RGHT│ │ │ LEFT│ DOWN│ UP │ RGHT│ │ │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ │ PGDN│ PGUP│ HOME│ END │ │ │ │ PGDN│ PGUP│ HOME│ END │ │ +├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +└──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┘ +``` diff --git a/keyboards/keebio/nyquist/keymaps/georgepetri3/rules.mk b/keyboards/keebio/nyquist/keymaps/georgepetri3/rules.mk new file mode 100644 index 00000000000..4010d90f03c --- /dev/null +++ b/keyboards/keebio/nyquist/keymaps/georgepetri3/rules.mk @@ -0,0 +1,5 @@ +MOUSEKEY_ENABLE = no +COMMAND_ENABLE = no +RGBLIGHT_ENABLE = yes +LTO_ENABLE = yes +DEBOUNCE_TYPE = eager_pk diff --git a/keyboards/keebio/nyquist/rev2/rev2.c b/keyboards/keebio/nyquist/rev2/rev2.c index 9922b8995ab..b5652e06d3e 100644 --- a/keyboards/keebio/nyquist/rev2/rev2.c +++ b/keyboards/keebio/nyquist/rev2/rev2.c @@ -1,21 +1,18 @@ #include "rev2.h" -#ifdef SSD1306OLED -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - led_set_user(usb_led); -} +void eeconfig_init_kb(void) { +#ifdef BACKLIGHT_ENABLE + backlight_enable(); + backlight_level(5); +#endif +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness +#ifdef RGBLIGHT_ANIMATIONS + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default +#endif #endif -void matrix_init_kb(void) { - - // // green led on - // DDRD |= (1<<5); - // PORTD &= ~(1<<5); - - // // orange led on - // DDRB |= (1<<0); - // PORTB &= ~(1<<0); - - matrix_init_user(); -}; + eeconfig_update_kb(0); + eeconfig_init_user(); +} diff --git a/keyboards/keebio/nyquist/rev3/rev3.c b/keyboards/keebio/nyquist/rev3/rev3.c index 34500fb104d..6d7dc3531d6 100644 --- a/keyboards/keebio/nyquist/rev3/rev3.c +++ b/keyboards/keebio/nyquist/rev3/rev3.c @@ -1,21 +1,18 @@ #include "rev3.h" -#ifdef SSD1306OLED -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - led_set_user(usb_led); -} +void eeconfig_init_kb(void) { +#ifdef BACKLIGHT_ENABLE + backlight_enable(); + backlight_level(5); +#endif +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness +#ifdef RGBLIGHT_ANIMATIONS + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default +#endif #endif -void matrix_init_kb(void) { - - // // green led on - // DDRD |= (1<<5); - // PORTD &= ~(1<<5); - - // // orange led on - // DDRB |= (1<<0); - // PORTB &= ~(1<<0); - - matrix_init_user(); -}; + eeconfig_update_kb(0); + eeconfig_init_user(); +} diff --git a/keyboards/keebio/quefrency/keymaps/bcat/keymap.c b/keyboards/keebio/quefrency/keymaps/bcat/keymap.c index d74a55b4b11..8ccfa879fb5 100644 --- a/keyboards/keebio/quefrency/keymaps/bcat/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/bcat/keymap.c @@ -5,7 +5,7 @@ enum layer { LAYER_FUNCTION, }; -#define LY_FUNC MO(LAYER_FUNCTION) +#define LY_FN MO(LAYER_FUNCTION) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Default layer: http://www.keyboard-layout-editor.com/#/gists/60a262432bb340b37d364a4424f3037b */ @@ -14,7 +14,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, LY_FUNC, KC_SPC, KC_SPC, XXXXXXX, KC_RALT, LY_FUNC, KC_APP, KC_LEFT, KC_DOWN, KC_RGHT + KC_LCTL, KC_LGUI, KC_LALT, LY_FN, KC_SPC, KC_SPC, XXXXXXX, KC_RALT, LY_FN, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), /* Function layer: http://www.keyboard-layout-editor.com/#/gists/59636898946da51f91fb290f8e078b4d */ @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, RGB_HUI, KC_CAPS, _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, RGB_SAI, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_SAD, - _______, _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_HUD, + _______, KC_APP, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD ), }; diff --git a/keyboards/keebio/quefrency/keymaps/bcat/readme.md b/keyboards/keebio/quefrency/keymaps/bcat/readme.md index 0436e1d2ce1..9499d717592 100644 --- a/keyboards/keebio/quefrency/keymaps/bcat/readme.md +++ b/keyboards/keebio/quefrency/keymaps/bcat/readme.md @@ -1,17 +1,17 @@ # bcat's Quefrency 65% layout -This is pretty much a stock 65% split keyboard layout, with an HHKB-style -(split) backspace, media keys in the function layer centered around the ESDF -cluster, and RGB controls in the function layer on the arrow/nav keys. +This is a standard 65% keyboard layout, with a split spacebar, an HHKB-style +(split) backspace, media controls in the function layer (centered around the +ESDF cluster), and RGB controls in the function layer (on the arrow/nav keys). ## Default layer -![Default layer layout](https://i.imgur.com/CU2fxDg.png) +![Default layer layout](https://i.imgur.com/gfVTuPO.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/60a262432bb340b37d364a4424f3037b)) ## Function layer -![Function layer layout](https://i.imgur.com/xE4CuH0.png) +![Function layer layout](https://i.imgur.com/Wmx1hfx.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/59636898946da51f91fb290f8e078b4d)) diff --git a/keyboards/keebio/quefrency/rev1/config.h b/keyboards/keebio/quefrency/rev1/config.h index 15771f53117..815a3e19717 100644 --- a/keyboards/keebio/quefrency/rev1/config.h +++ b/keyboards/keebio/quefrency/rev1/config.h @@ -55,3 +55,6 @@ along with this program. If not, see . #define RGB_DI_PIN D3 #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 16 // Number of LEDs + +// Set 65% column (option 1) and Macro (option 2) on by default +#define VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT 0x06 diff --git a/keyboards/keebio/quefrency/rev1/rev1.c b/keyboards/keebio/quefrency/rev1/rev1.c index a690a7eff7b..567730535d6 100644 --- a/keyboards/keebio/quefrency/rev1/rev1.c +++ b/keyboards/keebio/quefrency/rev1/rev1.c @@ -1,5 +1,14 @@ #include "quefrency.h" -void matrix_init_kb(void) { - matrix_init_user(); -}; +void eeconfig_init_kb(void) { +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness +#ifdef RGBLIGHT_ANIMATIONS + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default +#endif +#endif + + eeconfig_update_kb(0); + eeconfig_init_user(); +} diff --git a/keyboards/keebio/quefrency/rev1/rules.mk b/keyboards/keebio/quefrency/rev1/rules.mk index e69de29bb2d..58e9a76b230 100644 --- a/keyboards/keebio/quefrency/rev1/rules.mk +++ b/keyboards/keebio/quefrency/rev1/rules.mk @@ -0,0 +1 @@ +BOOTLOADER = caterina diff --git a/keyboards/keebio/quefrency/rev2/config.h b/keyboards/keebio/quefrency/rev2/config.h index d18b7be1ffe..ba85dc0f6ec 100644 --- a/keyboards/keebio/quefrency/rev2/config.h +++ b/keyboards/keebio/quefrency/rev2/config.h @@ -47,6 +47,7 @@ along with this program. If not, see . #define DEBOUNCE 5 #define BACKLIGHT_PIN B5 +#define CAPS_LOCK_LED_PIN B6 /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 @@ -62,3 +63,7 @@ along with this program. If not, see . #define RGBLED_NUM 16 // Number of LEDs #define RGBLED_SPLIT { 8, 8 } #define RGBLIGHT_LED_MAP { 1, 2, 3, 12, 13, 14, 15, 0, 7, 6, 5, 4, 11, 10, 9, 8 } + +// Set 65% column (option 3) and Macro (option 4) on by default +#define VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT 0x0018 +#define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2 diff --git a/keyboards/keebio/quefrency/rev2/rev2.c b/keyboards/keebio/quefrency/rev2/rev2.c index d713a0ff3a6..69edfd415ff 100644 --- a/keyboards/keebio/quefrency/rev2/rev2.c +++ b/keyboards/keebio/quefrency/rev2/rev2.c @@ -1 +1,32 @@ #include "quefrency.h" +#include "split_util.h" + +void matrix_init_kb(void) { + setPinOutput(CAPS_LOCK_LED_PIN); + matrix_init_user(); +} + +bool led_update_kb(led_t led_state) { + // Only update if left half + if (isLeftHand && led_update_user(led_state)) { + writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock); + } + return true; +} + +void eeconfig_init_kb(void) { +#ifdef BACKLIGHT_ENABLE + backlight_enable(); + backlight_level(3); +#endif +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness +#ifdef RGBLIGHT_ANIMATIONS + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default +#endif +#endif + + eeconfig_update_kb(0); + eeconfig_init_user(); +} diff --git a/keyboards/keebio/quefrency/rev2/rules.mk b/keyboards/keebio/quefrency/rev2/rules.mk index 32e78815991..0a368deb47b 100644 --- a/keyboards/keebio/quefrency/rev2/rules.mk +++ b/keyboards/keebio/quefrency/rev2/rules.mk @@ -1,3 +1,4 @@ +BOOTLOADER = atmel-dfu BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes ENCODER_ENABLE = yes diff --git a/keyboards/keebio/quefrency/rules.mk b/keyboards/keebio/quefrency/rules.mk index a13f0478b11..2c5ad0c36b4 100644 --- a/keyboards/keebio/quefrency/rules.mk +++ b/keyboards/keebio/quefrency/rules.mk @@ -1,32 +1,18 @@ # MCU name MCU = atmega32u4 -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = caterina - -# 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 MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = yes # 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 diff --git a/keyboards/keebio/viterbi/rev2/rev2.c b/keyboards/keebio/viterbi/rev2/rev2.c index 509e42dc515..dbf584f99ea 100644 --- a/keyboards/keebio/viterbi/rev2/rev2.c +++ b/keyboards/keebio/viterbi/rev2/rev2.c @@ -1 +1,18 @@ #include "viterbi.h" + +void eeconfig_init_kb(void) { +#ifdef BACKLIGHT_ENABLE + backlight_enable(); + backlight_level(5); +#endif +#ifdef RGBLIGHT_ENABLE + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness +#ifdef RGBLIGHT_ANIMATIONS + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default +#endif +#endif + + eeconfig_update_kb(0); + eeconfig_init_user(); +} diff --git a/keyboards/keebwerk/nano_slider/config.h b/keyboards/keebwerk/nano_slider/config.h index ba079c53101..3ed356b8a98 100644 --- a/keyboards/keebwerk/nano_slider/config.h +++ b/keyboards/keebwerk/nano_slider/config.h @@ -161,10 +161,9 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE -# define NO_ACTION_MACRO -# define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + /* * MIDI options */ diff --git a/keyboards/keebwerk/nano_slider/keymaps/default/keymap.c b/keyboards/keebwerk/nano_slider/keymaps/default/keymap.c index 85f2d55ec80..f9a14452fb1 100644 --- a/keyboards/keebwerk/nano_slider/keymaps/default/keymap.c +++ b/keyboards/keebwerk/nano_slider/keymaps/default/keymap.c @@ -21,7 +21,7 @@ enum layer_names { _BASE, _FN, - _DEMO + _MEDIA }; // Defines the keycodes used by our macros in process_record_user @@ -30,6 +30,7 @@ enum custom_keycodes { QMKURL }; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ [_BASE] = LAYOUT( @@ -38,14 +39,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_4, KC_5, KC_6, KC_0 ), [_FN] = LAYOUT( - TO(_DEMO), - RGB_TOG, RGB_MOD, RGB_VAI, - _______, _______, _______, _______ + TO(_MEDIA), + RGB_TOG, RGB_MOD, RGB_VAI, + QMKURL, RGB_RMOD, RGB_VAD, QMKBEST ), - [_DEMO] = LAYOUT( + [_MEDIA] = LAYOUT( TO(_BASE), - QMKBEST, _______, _______, - _______, _______, _______, QMKURL + KC_VOLD, KC_VOLU, KC_F24, + KC_MRWD, KC_MFFD, KC_F23, KC_MPLY ) }; diff --git a/keyboards/kudox/kudox.h b/keyboards/kudox/kudox.h index 09549fbc555..ca61ea82d12 100644 --- a/keyboards/kudox/kudox.h +++ b/keyboards/kudox/kudox.h @@ -22,6 +22,9 @@ #ifdef KEYBOARD_kudox_rev2 #include "rev2.h" #endif +#ifdef KEYBOARD_kudox_rev3 + #include "rev3.h" +#endif #ifdef KEYBOARD_kudox_columner #include "columner.h" #endif diff --git a/keyboards/kudox/readme.md b/keyboards/kudox/readme.md index cc97bf83b0a..107b99b1005 100644 --- a/keyboards/kudox/readme.md +++ b/keyboards/kudox/readme.md @@ -5,25 +5,23 @@

-Kudox PCB rev2.0 +Kudox rev3.0

- Keyboard Maintainer: [Kumao Kobo](https://github.com/kumaokobo) -- Hardware Supported: Kudox PCB rev1.0 rev2.0 w/ Pro Micro +- Hardware Supported: Kudox PCB rev1.0 rev2.0 rev3.0 w/ Pro Micro Make example for this keyboard (after setting up your build environment): ```sh -make kudox/rev2:default +make kudox/rev3:default ``` Example of flashing this keyboard: ```sh -make kudox/rev2:default:flash +make kudox/rev3:default:flash ``` -*keymaps/default is for rev2.0. If you want to use rev1.0, you should remove Left-06 key and Right-06 key.* - See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kudox/rev3/config.h b/keyboards/kudox/rev3/config.h new file mode 100644 index 00000000000..88969feed9e --- /dev/null +++ b/keyboards/kudox/rev3/config.h @@ -0,0 +1,91 @@ +/* Copyright 2019 Kumao Kobo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x9690 +#define DEVICE_VER 0x0300 +#define MANUFACTURER Kumao Kobo +#define PRODUCT The Kudox Keyboard +#define DESCRIPTION Split row staggered 5x7 custom keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 7 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5} //uncomment this line and comment line above if you need to reverse left-to-right key order + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D0 + +/* 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#undef RGBLED_NUM +#define RGBLED_NUM 14 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 diff --git a/keyboards/kudox/rev3/info.json b/keyboards/kudox/rev3/info.json new file mode 100644 index 00000000000..84b5ce0f309 --- /dev/null +++ b/keyboards/kudox/rev3/info.json @@ -0,0 +1,77 @@ +{ + "url": "http://kumaokobo.com/", + "maintainer": "Kumao Kobo", + "keyboard_name": "Kudox Keyboard Rev3", + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"`", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + {"label":"7", "x":10, "y":0}, + {"label":"8", "x":11, "y":0}, + {"label":"9", "x":12, "y":0}, + {"label":"0", "x":13, "y":0}, + {"label":"-", "x":14, "y":0}, + {"label":"=", "x":15, "y":0}, + {"label":"\u2190", "x":16, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.25}, + {"label":"Q", "x":1.25, "y":1}, + {"label":"W", "x":2.25, "y":1}, + {"label":"E", "x":3.25, "y":1}, + {"label":"R", "x":4.25, "y":1}, + {"label":"T", "x":5.25, "y":1}, + {"label":"Esc", "x":6.25, "y":1}, + {"label":"Y", "x":9.75, "y":1}, + {"label":"U", "x":10.75, "y":1}, + {"label":"I", "x":11.75, "y":1}, + {"label":"O", "x":12.75, "y":1}, + {"label":"P", "x":13.75, "y":1}, + {"label":"'", "x":14.75, "y":1}, + {"label":"\\", "x":15.75, "y":1, "w":1.25}, + {"label":"Ctrl", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":10.25, "y":2}, + {"label":"J", "x":11.25, "y":2}, + {"label":"K", "x":12.25, "y":2}, + {"label":"L", "x":13.25, "y":2}, + {"label":";", "x":14.25, "y":2}, + {"label":"Enter", "x":15.25, "y":2, "w":1.75}, + {"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":9.75, "y":3}, + {"label":"M", "x":10.75, "y":3}, + {"label":",", "x":11.75, "y":3}, + {"label":".", "x":12.75, "y":3}, + {"label":"/", "x":13.75, "y":3}, + {"label":"Shift", "x":14.75, "y":3, "w":2.25}, + {"label":"Alt", "x":0, "y":4, "w":1.25}, + {"label":"[", "x":1.25, "y":4}, + {"label":"]", "x":2.25, "y":4}, + {"label":"LANG2", "x":3.25, "y":4}, + {"label":"Enter", "x":4.25, "y":4.33, "w":1.25}, + {"label":"GUI", "x":5.5, "y":4.67}, + {"label":"Space", "x":6.5, "y":5}, + {"label":"Space", "x":9.5, "y":5}, + {"label":"GUI", "x":10.5, "y":4.67}, + {"label":"LANG1", "x":11.5, "y":4.33, "w":1.25}, + {"label":"\u2190", "x":12.75, "y":4}, + {"label":"\u2193", "x":13.75, "y":4}, + {"label":"\u2191", "x":14.75, "y":4}, + {"label":"\u2192", "x":15.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/keyboards/kudox/rev3/keymaps/default/keymap.c b/keyboards/kudox/rev3/keymaps/default/keymap.c new file mode 100644 index 00000000000..53166e73550 --- /dev/null +++ b/keyboards/kudox/rev3/keymaps/default/keymap.c @@ -0,0 +1,70 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _SYMB 1 +#define _LIGHT 2 + +// Shortcut to make keymap more readable +#define SYM_L2 LT(_SYMB, KC_LANG2) +#define TO_LIGH TO(_LIGHT) +#define TO_QWER TO(_QWERTY) + +#define KC_ALES LALT_T(KC_ESC) +#define KC_ALEN LALT_T(KC_ENT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = 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_BSPC , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_ESC , KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_SLSH ,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_ENT , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_UP ,KC_RSFT , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + KC_ALES ,KC_LBRC ,KC_RBRC ,SYM_L2 ,KC_ALEN ,KC_LGUI ,KC_SPC , KC_SPC ,KC_RGUI ,TO_LIGH ,KC_LANG1,KC_LEFT, KC_DOWN ,KC_RIGHT + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_SYMB] = 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_DQUO ,KC_QUOT ,KC_GRV ,KC_ASTR ,KC_PLUS ,KC_EQL , KC_LPRN ,KC_RPRN ,KC_PIPE ,KC_ASTR ,KC_TILD ,KC_CIRC ,KC_PIPE , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_AT ,KC_COLN ,KC_GRV ,KC_SLSH ,KC_MINS , KC_LBRC ,KC_RBRC ,KC_DOT ,KC_SLSH ,KC_MINS ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_LCBR ,KC_RCBR ,_______ ,_______ ,KC_CIRC ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,KC_LABK ,KC_UNDS ,KC_RABK + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_LIGHT] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,RGB_HUI ,RGB_HUD ,RGB_SAI ,RGB_SAD ,RGB_VAI ,RGB_VAD , RGB_HUI ,RGB_HUD ,RGB_SAI ,RGB_SAD ,RGB_VAI ,RGB_VAD ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,RGB_M_P ,RGB_M_SW ,RGB_M_X,XXXXXXX ,XXXXXXX ,XXXXXXX , RGB_M_P ,RGB_M_SW ,RGB_M_X ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,RGB_M_B ,RGB_M_SN ,RGB_M_G,XXXXXXX ,XXXXXXX , RGB_M_B ,RGB_M_SN ,RGB_M_G ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,RGB_M_R ,RGB_M_K ,RGB_M_T ,XXXXXXX ,XXXXXXX , RGB_M_R ,RGB_M_K ,RGB_M_T ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,RGB_MOD ,RGB_TOG , RGB_TOG ,RGB_MOD ,TO_QWER ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ) + +}; + + +#ifdef RGBLIGHT_ENABLE +void keyboard_post_init_user(void) { + rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); +}; +#endif diff --git a/keyboards/kudox/rev3/keymaps/default/readme.md b/keyboards/kudox/rev3/keymaps/default/readme.md new file mode 100644 index 00000000000..aead0ad1f17 --- /dev/null +++ b/keyboards/kudox/rev3/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Kudox Keyboard Rev3.0 diff --git a/keyboards/kudox/rev3/keymaps/jis/keymap.c b/keyboards/kudox/rev3/keymaps/jis/keymap.c new file mode 100644 index 00000000000..bc1b3331056 --- /dev/null +++ b/keyboards/kudox/rev3/keymaps/jis/keymap.c @@ -0,0 +1,70 @@ +#include QMK_KEYBOARD_H +#include"keymap_jp.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _SYMB 1 +#define _LIGHT 2 + +// Shortcut to make keymap more readable +#define SYM_L2 LT(_SYMB, KC_LANG2) +#define TO_LIGH TO(_LIGHT) +#define TO_QWER TO(_QWERTY) + +#define KC_ALES LALT_T(KC_ESC) +#define KC_ALEN LALT_T(KC_ENT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + JP_ZKHK ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_6 , KC_7 ,KC_8 ,KC_9 ,KC_0 ,JP_MINS ,JP_CIRC ,KC_BSPC , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_ESC , KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,JP_AT ,JP_SLSH , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LCTL ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , KC_H ,KC_J ,KC_K ,KC_L ,JP_SCLN ,KC_ENT , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , KC_N ,KC_M ,JP_COMM ,JP_DOT ,KC_UP ,KC_RSFT , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + KC_ALES ,JP_YEN ,JP_COLN ,SYM_L2 ,KC_ALEN ,KC_LGUI ,KC_SPC , KC_SPC ,KC_RGUI ,TO_LIGH ,KC_LANG1,KC_LEFT, KC_DOWN ,KC_RIGHT + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_SYMB] = 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 , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,JP_DQUO ,JP_QUOT ,KC_GRV ,JP_ASTR ,JP_PLUS ,JP_EQL , JP_LPRN ,JP_RPRN ,JP_PIPE ,JP_ASTR ,JP_TILD ,JP_CIRC ,JP_PIPE , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,JP_AT ,JP_COLN ,KC_GRV ,JP_SLSH ,JP_MINS , JP_LBRC ,JP_RBRC ,JP_DOT ,JP_SLSH ,JP_MINS ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , JP_LCBR ,JP_RCBR ,_______ ,_______ ,JP_CIRC ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,JP_LABK ,JP_UNDS ,JP_RABK + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_LIGHT] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,RGB_HUI ,RGB_HUD ,RGB_SAI ,RGB_SAD ,RGB_VAI ,RGB_VAD , RGB_HUI ,RGB_HUD ,RGB_SAI ,RGB_SAD ,RGB_VAI ,RGB_VAD ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,RGB_M_P ,RGB_M_SW ,RGB_M_X,XXXXXXX ,XXXXXXX ,XXXXXXX , RGB_M_P ,RGB_M_SW ,RGB_M_X ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┘ └────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,RGB_M_B ,RGB_M_SN ,RGB_M_G,XXXXXXX ,XXXXXXX , RGB_M_B ,RGB_M_SN ,RGB_M_G ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,RGB_M_R ,RGB_M_K ,RGB_M_T ,XXXXXXX ,XXXXXXX , RGB_M_R ,RGB_M_K ,RGB_M_T ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┴────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,RGB_MOD ,RGB_TOG , RGB_TOG ,RGB_MOD ,TO_QWER ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ) + +}; + +#ifdef RGBLIGHT_ENABLE +void keyboard_post_init_user(void) { + rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); +}; +#endif diff --git a/keyboards/kudox/rev3/keymaps/jis/readme.md b/keyboards/kudox/rev3/keymaps/jis/readme.md new file mode 100644 index 00000000000..90e7902153a --- /dev/null +++ b/keyboards/kudox/rev3/keymaps/jis/readme.md @@ -0,0 +1 @@ +# The JIS keymap for Kudox Keyboard Rev3.0 diff --git a/keyboards/kudox/rev3/rev3.c b/keyboards/kudox/rev3/rev3.c new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/kudox/rev3/rev3.h b/keyboards/kudox/rev3/rev3.h new file mode 100644 index 00000000000..dcc745ddb79 --- /dev/null +++ b/keyboards/kudox/rev3/rev3.h @@ -0,0 +1,23 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R06, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, L16, R16, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ + L30, L31, L32, L33, L34, L35, R35, R34, R33, R32, R31, R30, \ + L40, L41, L42, L43, L44, L45, L46, R46, R45, R44, R43, R42, R41, R40 \ +) \ +{ \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R00, R01, R02, R03, R04, R05, R06 }, \ + { R10, R11, R12, R13, R14, R15, R16 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { R40, R41, R42, R43, R44, R45, R46 } \ +} diff --git a/keyboards/kudox/rev3/rules.mk b/keyboards/kudox/rev3/rules.mk new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/kudox/rules.mk b/keyboards/kudox/rules.mk index 4ae8ea7fbb6..1b00218c752 100644 --- a/keyboards/kudox/rules.mk +++ b/keyboards/kudox/rules.mk @@ -33,4 +33,4 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SPLIT_KEYBOARD = yes -DEFAULT_FOLDER = kudox/rev2 +DEFAULT_FOLDER = kudox/rev3 diff --git a/keyboards/lattice60/config.h b/keyboards/lattice60/config.h index e864eeebb31..649219538d0 100644 --- a/keyboards/lattice60/config.h +++ b/keyboards/lattice60/config.h @@ -99,7 +99,5 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/lfkeyboards/lfk78/config.h b/keyboards/lfkeyboards/lfk78/config.h index 3478c9629f9..b96aca07c92 100644 --- a/keyboards/lfkeyboards/lfk78/config.h +++ b/keyboards/lfkeyboards/lfk78/config.h @@ -158,10 +158,9 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + /* * MIDI options */ diff --git a/keyboards/lfkeyboards/lfkpad/config.h b/keyboards/lfkeyboards/lfkpad/config.h index fb48297e5cd..b05ee0f0cad 100644 --- a/keyboards/lfkeyboards/lfkpad/config.h +++ b/keyboards/lfkeyboards/lfkpad/config.h @@ -175,10 +175,9 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + /* * MIDI options */ diff --git a/keyboards/lily58/keymaps/bcat/config.h b/keyboards/lily58/keymaps/bcat/config.h index 18092620449..f7f08d076a5 100644 --- a/keyboards/lily58/keymaps/bcat/config.h +++ b/keyboards/lily58/keymaps/bcat/config.h @@ -1,3 +1,6 @@ #pragma once #define EE_HANDS + +/* Work around Elite-C v3 with broken VBUS detection. */ +#define SPLIT_USB_DETECT diff --git a/keyboards/lily58/keymaps/bcat/keymap.c b/keyboards/lily58/keymaps/bcat/keymap.c index fac14782abb..7fa65b876f1 100644 --- a/keyboards/lily58/keymaps/bcat/keymap.c +++ b/keyboards/lily58/keymaps/bcat/keymap.c @@ -27,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CAPS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TILD, - _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_APP, _______, _______, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_GRV, + _______, KC_APP, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______ ), diff --git a/keyboards/lily58/keymaps/bcat/readme.md b/keyboards/lily58/keymaps/bcat/readme.md index 389def1432b..57b7929d3bd 100644 --- a/keyboards/lily58/keymaps/bcat/readme.md +++ b/keyboards/lily58/keymaps/bcat/readme.md @@ -1,49 +1,18 @@ # bcat's Lily58 layout -This split ergo layout is standard QWERTY on the default layer, with symbols on -the lower layer, numbers/navigation on the raise layer, and media keys centered -around the ESDF cluster in the adjust (raise + lower) layer. A few general -principles went into this layout: +This split ergo layout follows my preferred [Crkbd +layout](https://github.com/qmk/qmk_firmware/tree/master/keyboards/crkbd/keymaps/bcat) +with the following changes: -* The number row is optional, as are the outermost bottom row keys and the -"extra" keys on the innnermost columns below the controllers. This allows me to -switch between this keyboard and a 40% like the -[Crkbd](https://github.com/qmk/qmk_firmware/tree/master/keyboards/lily58/keymaps/bcat) -without breaking muscle memory. +* There's an optional number row at the top of the keyboard. I am quite used to +using layers for numbers and symbols, so in practice this goes unused. -* Space and Enter are on the big thumb keys so they're easy to press. +* The dedicated Hyphen/Underscore and Equals/Plus keys on the number row are +placed in the same positions as on the ErgoDox EZ. (There's no real reason for +this; I just had to do _something_ with those keys.) -* There are two shift keys because Right Shift is all that important, but just -because I don't have any better ideas for what to put there. - -* Arrow keys are on VIM-style HJKL keys. - -* Home/End and Page Up/Page Down are equivalent to the arrow keys, but -translated down one row. - -* Navigation is usable with just the right hand, to enable left-handed mousing -at the same time. Additionally, Web page scrolling (Space, Shift+Space) is -possible with just the left hand, for writing at the same time as scrolling. - -* Escape is easy to reach because Vim is life. - -* Since most of the modifiers are on the left half, keys frequently pressed -together with mods (e.g., numbers, function keys, etc.) are on the Raise layer -activated by the right thumb. - -* Every key on a TKL has a binding. - -* Backspace is bound in the same place on every layer to avoid having to let go -of layer-shift keys to fix a mistake. - -* Likewise, the comma and period keys are not rebound on the raise layer to -allow typing numbers with thousand separators and decimal points without -releasing the layer key. - -* Brackets and braces are on or near the home row for quick access when coding. -They're positioned below the parens on the Raise layer for easy recall. - -* For consistency, mods aren't rebound on layers (except for the Tab key). +* The extra thumb keys are used for dedicated Ctrl/Menu keys (not super useful) +and browser back/forward navigation keys (actually more useful than expected). ## Default layer @@ -53,7 +22,7 @@ They're positioned below the parens on the Raise layer for easy recall. ## Lower layer -![Lower layer layout](https://i.imgur.com/d0J2lum.png) +![Lower layer layout](https://i.imgur.com/9JlbNAd.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/19ad0d3b5d745fbb2818db09740f5a11)) diff --git a/keyboards/maartenwut/plain60/keymaps/via/keymap.c b/keyboards/maartenwut/plain60/keymaps/via/keymap.c index 7e8cfff3541..a500f238961 100644 --- a/keyboards/maartenwut/plain60/keymaps/via/keymap.c +++ b/keyboards/maartenwut/plain60/keymaps/via/keymap.c @@ -1,17 +1,32 @@ #include QMK_KEYBOARD_H -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _MA 0 - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_MA] = 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_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_BSLS, KC_ENT, \ - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTRL) +[0] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, 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_BSLS, 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(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTRL), + +[1] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______), + +[2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______), + +[3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______), }; diff --git a/keyboards/maartenwut/plain60/plain60.h b/keyboards/maartenwut/plain60/plain60.h index 2e3fc2cc311..87688e9ede3 100644 --- a/keyboards/maartenwut/plain60/plain60.h +++ b/keyboards/maartenwut/plain60/plain60.h @@ -46,7 +46,7 @@ {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, XXX}, \ {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, XXX}, \ - {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, XXX, XXX}, \ + {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, XXX}, \ {k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, k4c, k4d, XXX} \ } diff --git a/keyboards/maartenwut/ta65/config.h b/keyboards/maartenwut/ta65/config.h index d54a6273d8f..729f21a2e27 100644 --- a/keyboards/maartenwut/ta65/config.h +++ b/keyboards/maartenwut/ta65/config.h @@ -24,7 +24,7 @@ along with this program. If not, see . #define PRODUCT_ID 0x7465 #define DEVICE_VER 0x0001 #define MANUFACTURER Maartenwut -#define PRODUCT TA-65 +#define PRODUCT ta-65 #define DESCRIPTION A universal 65% PCB with underglow. /* key matrix size */ @@ -37,6 +37,12 @@ along with this program. If not, see . #define MATRIX_COL_PINS {D2,D1,D0,D3,D5,C7,C6,B6,B5,F0,F1,F4,F5,F6,F7,B0} #define UNUSED_PINS +#define ENCODERS_PAD_A { B2 } +#define ENCODERS_PAD_B { B1 } + +/* Uncomment if your encoder doesn't react to every turn or skips */ +//#define ENCODER_RESOLUTION 2 + /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/maartenwut/ta65/keymaps/default/keymap.c b/keyboards/maartenwut/ta65/keymaps/default/keymap.c index b04172c7590..8bb8a14ba05 100644 --- a/keyboards/maartenwut/ta65/keymaps/default/keymap.c +++ b/keyboards/maartenwut/ta65/keymaps/default/keymap.c @@ -1,17 +1,38 @@ #include QMK_KEYBOARD_H -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _MA 0 - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_MA] = 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_BSPC, KC_GRV, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, - 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, KC_ENT, KC_PGUP, - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_APP, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT) +[0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_BSPC, KC_INS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT), + +[1] = LAYOUT_all( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + }; + +void encoder_update_user(uint8_t index, bool clockwise) { + switch(get_highest_layer(layer_state)){ + case 1: //Layer 1 + if (!clockwise) { // Remove ! to reverse direction + tap_code(KC_WH_U); + } else { + tap_code(KC_WH_D); + } + break; + default: //Layer 0 + if (!clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + break; + } +} diff --git a/keyboards/maartenwut/ta65/keymaps/via/keymap.c b/keyboards/maartenwut/ta65/keymaps/via/keymap.c new file mode 100644 index 00000000000..e2d96eb9c0c --- /dev/null +++ b/keyboards/maartenwut/ta65/keymaps/via/keymap.c @@ -0,0 +1,33 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSLS, KC_INS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_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_BSLS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_CAPS, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTRL,MO(2), KC_LEFT, KC_DOWN, KC_RGHT), + +[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_PSCR, + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, KC_INS, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, KC_HOME, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_END, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +[2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +[3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +}; diff --git a/keyboards/maartenwut/ta65/keymaps/via/rules.mk b/keyboards/maartenwut/ta65/keymaps/via/rules.mk new file mode 100644 index 00000000000..1e5b99807cb --- /dev/null +++ b/keyboards/maartenwut/ta65/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/maartenwut/ta65/rules.mk b/keyboards/maartenwut/ta65/rules.mk index db0567bd03d..86efb933bb4 100644 --- a/keyboards/maartenwut/ta65/rules.mk +++ b/keyboards/maartenwut/ta65/rules.mk @@ -12,19 +12,24 @@ MCU = atmega32u4 BOOTLOADER = qmk-dfu # Build Options -# comment out to disable the options. +# change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +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 +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +ENCODER_ENABLE = yes LAYOUTS = 65_ansi 65_iso diff --git a/keyboards/maartenwut/ta65/ta65.h b/keyboards/maartenwut/ta65/ta65.h index 273acf9ad39..40a763b993e 100644 --- a/keyboards/maartenwut/ta65/ta65.h +++ b/keyboards/maartenwut/ta65/ta65.h @@ -38,14 +38,14 @@ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, k2e, \ k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ - k40, k41, k42, k46, k49, k4c, k4d, k4e \ + k40, k41, k42, k46, k4a, k4c, k4d, k4e \ ) \ { \ {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, k1e, ___}, \ {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, ___, k2d, k2e, ___}, \ {k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, ___}, \ - {k40, k41, k42, ___, ___, ___, k46, ___, ___, k49, ___, ___, k4c, k4d, k4e, ___} \ + {k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, k4a, ___, k4c, k4d, k4e, ___} \ } #define LAYOUT_iso_tsangan( \ @@ -53,14 +53,14 @@ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ - k40, k41, k42, k46, k49, k4c, k4d, k4e \ + k40, k41, k42, k46, k4a, k4c, k4d, k4e \ ) \ { \ {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, ___, k1e, ___}, \ {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, ___}, \ {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, ___}, \ - {k40, k41, k42, ___, ___, ___, k46, ___, ___, k49, ___, ___, k4c, k4d, k4e, ___} \ + {k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, k4a, ___, k4c, k4d, k4e, ___} \ } #define LAYOUT_65_iso( \ diff --git a/keyboards/maartenwut/wasdat/config.h b/keyboards/maartenwut/wasdat/config.h index ffd33d8534d..d30263bfcfc 100644 --- a/keyboards/maartenwut/wasdat/config.h +++ b/keyboards/maartenwut/wasdat/config.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0x4705 #define PRODUCT_ID 0xC474 #define DEVICE_VER 0x0001 #define MANUFACTURER Maartenwut @@ -252,5 +252,7 @@ along with this program. If not, see . */ /* Bootmagic Lite key configuration */ -// #define BOOTMAGIC_LITE_ROW 0 -// #define BOOTMAGIC_LITE_COLUMN 0 +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 5 + +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/maartenwut/wasdat/info.json b/keyboards/maartenwut/wasdat/info.json index 8f931f46cf7..6154bd55556 100644 --- a/keyboards/maartenwut/wasdat/info.json +++ b/keyboards/maartenwut/wasdat/info.json @@ -185,7 +185,6 @@ {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, - {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, @@ -209,6 +208,7 @@ {"label":":", "x":10.75, "y":3.5}, {"label":"@", "x":11.75, "y":3.5}, {"label":"~", "x":12.75, "y":3.5}, + {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, {"label":"4", "x":18.5, "y":3.5}, {"label":"5", "x":19.5, "y":3.5}, @@ -405,7 +405,6 @@ {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, - {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, @@ -424,6 +423,7 @@ {"label":":", "x":10.75, "y":3.5}, {"label":"@", "x":11.75, "y":3.5}, {"label":"~", "x":12.75, "y":3.5}, + {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"label":"|", "x":1.25, "y":4.5}, diff --git a/keyboards/maartenwut/wasdat/keymaps/via/keymap.c b/keyboards/maartenwut/wasdat/keymaps/via/keymap.c new file mode 100644 index 00000000000..9ad78d60d90 --- /dev/null +++ b/keyboards/maartenwut/wasdat/keymaps/via/keymap.c @@ -0,0 +1,96 @@ +/* Copyright 2020 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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] = { + /* + * ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │Esc│   │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Slk│Pse│ + * └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │  \  │ │Del│End│PgD│ │ 7 │ 8 │ 9 │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ ├───┼───┼───┤ + │ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │  Enter │               │ 4 │ 5 │ 6 │   │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐     ├───┼───┼───┼───┤ + * │Shft│ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │    Shift │     │ ↑ │     │ 1 │ 2 │ 3 │   │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│ + * │Ctrl│GUI │Alt │                        │ Alt│ GUI│FnMn│Ctrl│ │ ← │ ↓ │ → │ │   0   │ . │   │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ + */ + LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, + KC_LSFT, KC_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_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, LT(1, KC_APP), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + + /* + * ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │Rst│   │   │   │   │   │ │   │   │   │   │ │   │   │   │   │ │   │   │   │ + * └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ + * │   │   │   │   │   │   │   │   │   │   │   │   │   │       │ │   │   │   │ │   │   │   │   │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ + * │     │   │   │   │   │   │   │   │   │   │   │   │   │     │ │   │   │   │ │   │   │   │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ ├───┼───┼───┤   │ + * │      │   │   │   │   │   │   │   │   │   │   │   │        │               │   │   │   │   │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐     ├───┼───┼───┼───┤ + * │    │   │   │   │   │   │   │   │   │   │   │   │          │     │   │     │   │   │   │   │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤   │ + * │    │    │    │                        │    │    │    │    │ │   │   │   │ │       │   │   │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ + */ + LAYOUT_all( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* + * ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │   │   │   │   │   │   │ │   │   │   │   │ │   │   │   │   │ │   │   │   │ + * └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ + * │   │   │   │   │   │   │   │   │   │   │   │   │   │       │ │   │   │   │ │   │   │   │   │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ + * │     │   │   │   │   │   │   │   │   │   │   │   │   │     │ │   │   │   │ │   │   │   │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ ├───┼───┼───┤   │ + * │      │   │   │   │   │   │   │   │   │   │   │   │        │               │   │   │   │   │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐     ├───┼───┼───┼───┤ + * │    │   │   │   │   │   │   │   │   │   │   │   │          │     │   │     │   │   │   │   │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤   │ + * │    │    │    │                        │    │    │    │    │ │   │   │   │ │       │   │   │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ + */ + LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/maartenwut/wasdat/keymaps/via/rules.mk b/keyboards/maartenwut/wasdat/keymaps/via/rules.mk new file mode 100644 index 00000000000..36b7ba9cbc9 --- /dev/null +++ b/keyboards/maartenwut/wasdat/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/maartenwut/wasdat/rules.mk b/keyboards/maartenwut/wasdat/rules.mk index db9728623e5..822baf5ed84 100644 --- a/keyboards/maartenwut/wasdat/rules.mk +++ b/keyboards/maartenwut/wasdat/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/maartenwut/wasdat/wasdat.h b/keyboards/maartenwut/wasdat/wasdat.h index d9f1f95a2dc..a25646b6286 100644 --- a/keyboards/maartenwut/wasdat/wasdat.h +++ b/keyboards/maartenwut/wasdat/wasdat.h @@ -27,6 +27,25 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ +#define LAYOUT_all( \ + K05, K44, K42, K32, K02, K21, K0A, K3E, K4E, K4D, K2D, K0D, K7D, K23, K53, K51, \ + K45, K25, K24, K22, K20, K40, K48, K28, K2A, K2E, K2F, K4F, K4A, K3D, K47, K4C, K46, K69, K67, K66, K76, \ + K35, K55, K54, K52, K50, K30, K38, K58, K5A, K5E, K5F, K3F, K3A, K1D, K49, K2C, K26, K59, K57, K56, K5C, \ + K34, K15, K14, K12, K10, K00, K08, K18, K1A, K1E, K1F, K0F, K6D, K39, K37, K36, \ + K3B, K04, K65, K64, K62, K60, K70, K78, K68, K6A, K6E, K7F, K1B, K0C, K19, K17, K16, K1C, \ + K41, K31, K03, K09, K73, K11, K33, K61, K7C, K79, K77, K07, K06 \ +) \ +{ \ + { K00, XXX, K02, K03, K04, K05, K06, K07, K08, K09, K0A, XXX, K0C, K0D, XXX, K0F }, \ + { K10, K11, K12, XXX, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, XXX, K28, XXX, K2A, XXX, K2C, K2D, K2E, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, K3E, K3F }, \ + { K40, K41, K42, XXX, K44, K45, K46, K47, K48, K49, K4A, XXX, K4C, K4D, K4E, K4F }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, XXX, K5C, XXX, K5E, K5F }, \ + { K60, K61, K62, XXX, K64, K65, K66, K67, K68, K69, K6A, XXX, XXX, K6D, K6E, XXX }, \ + { K70, XXX, XXX, K73, XXX, XXX, K76, K77, K78, K79, XXX, XXX, K7C, K7D, XXX, K7F } \ +} + #define LAYOUT_fullsize_ansi( \ K05, K44, K42, K32, K02, K21, K0A, K3E, K4E, K4D, K2D, K0D, K7D, K23, K53, K51, \ K45, K25, K24, K22, K20, K40, K48, K28, K2A, K2E, K2F, K4F, K4A, K3D, K47, K4C, K46, K69, K67, K66, K76, \ diff --git a/keyboards/maartenwut/wasdat_code/config.h b/keyboards/maartenwut/wasdat_code/config.h new file mode 100644 index 00000000000..16d5acd9c42 --- /dev/null +++ b/keyboards/maartenwut/wasdat_code/config.h @@ -0,0 +1,258 @@ +/* +Copyright 2019 Maarten Dekkers + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4705 +#define PRODUCT_ID 0xB00E +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maartenwut +#define PRODUCT Wasdat Code +#define DESCRIPTION Custom controller for the WASD CODE TKL and 104-key keyboards + +/* key matrix size */ +#define MATRIX_ROWS 8 +#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 MATRIX_ROW_PINS { E6, C7, C6, B6, B5, B4, D7, D6 } +#define MATRIX_COL_PINS { } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +// For QMK DFU +#define QMK_ESC_OUTPUT E6 +#define QMK_ESC_INPUT F0 +#define QMK_LED B1 + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 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 */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_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_HELP H +//#define MAGIC_KEY_HELP_ALT 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 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#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 B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#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 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 2 +#define BOOTMAGIC_LITE_COLUMN 3 + +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/maartenwut/wasdat_code/info.json b/keyboards/maartenwut/wasdat_code/info.json new file mode 100644 index 00000000000..526883f8d50 --- /dev/null +++ b/keyboards/maartenwut/wasdat_code/info.json @@ -0,0 +1,459 @@ +{ + "keyboard_name": "Wasdat Code", + "url": "https://maartenwut.com/product/wasdat-code/", + "maintainer": "Maartenwut", + "width": 22.5, + "height": 6.5, + "layouts": { + "LAYOUT_fullsize_ansi": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + + {"label":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + + {"label":"~", "x":0, "y":1.5}, + {"label":"1", "x":1, "y":1.5}, + {"label":"2", "x":2, "y":1.5}, + {"label":"3", "x":3, "y":1.5}, + {"label":"4", "x":4, "y":1.5}, + {"label":"5", "x":5, "y":1.5}, + {"label":"6", "x":6, "y":1.5}, + {"label":"7", "x":7, "y":1.5}, + {"label":"8", "x":8, "y":1.5}, + {"label":"9", "x":9, "y":1.5}, + {"label":"0", "x":10, "y":1.5}, + {"label":"_", "x":11, "y":1.5}, + {"label":"+", "x":12, "y":1.5}, + {"label":"Backspace", "x":13, "y":1.5, "w":2}, + + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"PgUp", "x":17.25, "y":1.5}, + + {"label":"Num Lock", "x":18.5, "y":1.5}, + {"label":"/", "x":19.5, "y":1.5}, + {"label":"*", "x":20.5, "y":1.5}, + {"label":"-", "x":21.5, "y":1.5}, + + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"{", "x":11.5, "y":2.5}, + {"label":"}", "x":12.5, "y":2.5}, + {"label":"|", "x":13.5, "y":2.5, "w":1.5}, + + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"PgDn", "x":17.25, "y":2.5}, + + {"label":"7", "x":18.5, "y":2.5}, + {"label":"8", "x":19.5, "y":2.5}, + {"label":"9", "x":20.5, "y":2.5}, + {"label":"+", "x":21.5, "y":2.5, "h":2}, + + {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, + {"label":"A", "x":1.75, "y":3.5}, + {"label":"S", "x":2.75, "y":3.5}, + {"label":"D", "x":3.75, "y":3.5}, + {"label":"F", "x":4.75, "y":3.5}, + {"label":"G", "x":5.75, "y":3.5}, + {"label":"H", "x":6.75, "y":3.5}, + {"label":"J", "x":7.75, "y":3.5}, + {"label":"K", "x":8.75, "y":3.5}, + {"label":"L", "x":9.75, "y":3.5}, + {"label":":", "x":10.75, "y":3.5}, + {"label":"\"", "x":11.75, "y":3.5}, + {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, + + {"label":"4", "x":18.5, "y":3.5}, + {"label":"5", "x":19.5, "y":3.5}, + {"label":"6", "x":20.5, "y":3.5}, + + {"label":"Shift", "x":0, "y":4.5, "w":2.25}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":"<", "x":9.25, "y":4.5}, + {"label":">", "x":10.25, "y":4.5}, + {"label":"?", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, + + {"label":"\u2191", "x":16.25, "y":4.5}, + + {"label":"1", "x":18.5, "y":4.5}, + {"label":"2", "x":19.5, "y":4.5}, + {"label":"3", "x":20.5, "y":4.5}, + {"label":"Enter", "x":21.5, "y":4.5, "h":2}, + + {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, + {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, + {"x":3.75, "y":5.5, "w":6.25}, + {"label":"Alt", "x":10, "y":5.5, "w":1.25}, + {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, + + {"label":"\u2190", "x":15.25, "y":5.5}, + {"label":"\u2193", "x":16.25, "y":5.5}, + {"label":"\u2192", "x":17.25, "y":5.5}, + + {"label":"0", "x":18.5, "y":5.5, "w":2}, + {"label":".", "x":20.5, "y":5.5} + ] + }, + "LAYOUT_fullsize_iso": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + + {"label":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + + {"label":"\u00ac", "x":0, "y":1.5}, + {"label":"!", "x":1, "y":1.5}, + {"label":"\"", "x":2, "y":1.5}, + {"label":"\u00a3", "x":3, "y":1.5}, + {"label":"$", "x":4, "y":1.5}, + {"label":"%", "x":5, "y":1.5}, + {"label":"^", "x":6, "y":1.5}, + {"label":"&", "x":7, "y":1.5}, + {"label":"*", "x":8, "y":1.5}, + {"label":"(", "x":9, "y":1.5}, + {"label":")", "x":10, "y":1.5}, + {"label":"_", "x":11, "y":1.5}, + {"label":"+", "x":12, "y":1.5}, + {"label":"Backspace", "x":13, "y":1.5, "w":2}, + + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"PgUp", "x":17.25, "y":1.5}, + + {"label":"Num Lock", "x":18.5, "y":1.5}, + {"label":"/", "x":19.5, "y":1.5}, + {"label":"*", "x":20.5, "y":1.5}, + {"label":"-", "x":21.5, "y":1.5}, + + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"{", "x":11.5, "y":2.5}, + {"label":"}", "x":12.5, "y":2.5}, + + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"PgDn", "x":17.25, "y":2.5}, + + {"label":"7", "x":18.5, "y":2.5}, + {"label":"8", "x":19.5, "y":2.5}, + {"label":"9", "x":20.5, "y":2.5}, + {"label":"+", "x":21.5, "y":2.5, "h":2}, + + {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, + {"label":"A", "x":1.75, "y":3.5}, + {"label":"S", "x":2.75, "y":3.5}, + {"label":"D", "x":3.75, "y":3.5}, + {"label":"F", "x":4.75, "y":3.5}, + {"label":"G", "x":5.75, "y":3.5}, + {"label":"H", "x":6.75, "y":3.5}, + {"label":"J", "x":7.75, "y":3.5}, + {"label":"K", "x":8.75, "y":3.5}, + {"label":"L", "x":9.75, "y":3.5}, + {"label":":", "x":10.75, "y":3.5}, + {"label":"@", "x":11.75, "y":3.5}, + {"label":"~", "x":12.75, "y":3.5}, + {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, + + {"label":"4", "x":18.5, "y":3.5}, + {"label":"5", "x":19.5, "y":3.5}, + {"label":"6", "x":20.5, "y":3.5}, + + {"label":"Shift", "x":0, "y":4.5, "w":1.25}, + {"label":"|", "x":1.25, "y":4.5}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":"<", "x":9.25, "y":4.5}, + {"label":">", "x":10.25, "y":4.5}, + {"label":"?", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, + + {"label":"\u2191", "x":16.25, "y":4.5}, + + {"label":"1", "x":18.5, "y":4.5}, + {"label":"2", "x":19.5, "y":4.5}, + {"label":"3", "x":20.5, "y":4.5}, + {"label":"Enter", "x":21.5, "y":4.5, "h":2}, + + {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, + {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, + {"x":3.75, "y":5.5, "w":6.25}, + {"label":"AltGr", "x":10, "y":5.5, "w":1.25}, + {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, + + {"label":"\u2190", "x":15.25, "y":5.5}, + {"label":"\u2193", "x":16.25, "y":5.5}, + {"label":"\u2192", "x":17.25, "y":5.5}, + + {"label":"0", "x":18.5, "y":5.5, "w":2}, + {"label":".", "x":20.5, "y":5.5} + ] + }, + "LAYOUT_tkl_ansi": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + + {"label":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + + {"label":"~", "x":0, "y":1.5}, + {"label":"1", "x":1, "y":1.5}, + {"label":"2", "x":2, "y":1.5}, + {"label":"3", "x":3, "y":1.5}, + {"label":"4", "x":4, "y":1.5}, + {"label":"5", "x":5, "y":1.5}, + {"label":"6", "x":6, "y":1.5}, + {"label":"7", "x":7, "y":1.5}, + {"label":"8", "x":8, "y":1.5}, + {"label":"9", "x":9, "y":1.5}, + {"label":"0", "x":10, "y":1.5}, + {"label":"_", "x":11, "y":1.5}, + {"label":"+", "x":12, "y":1.5}, + {"label":"Backspace", "x":13, "y":1.5, "w":2}, + + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"Page Up", "x":17.25, "y":1.5}, + + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"{", "x":11.5, "y":2.5}, + {"label":"}", "x":12.5, "y":2.5}, + {"label":"|", "x":13.5, "y":2.5, "w":1.5}, + + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"PgDn", "x":17.25, "y":2.5}, + + {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, + {"label":"A", "x":1.75, "y":3.5}, + {"label":"S", "x":2.75, "y":3.5}, + {"label":"D", "x":3.75, "y":3.5}, + {"label":"F", "x":4.75, "y":3.5}, + {"label":"G", "x":5.75, "y":3.5}, + {"label":"H", "x":6.75, "y":3.5}, + {"label":"J", "x":7.75, "y":3.5}, + {"label":"K", "x":8.75, "y":3.5}, + {"label":"L", "x":9.75, "y":3.5}, + {"label":":", "x":10.75, "y":3.5}, + {"label":"\"", "x":11.75, "y":3.5}, + {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, + + {"label":"Shift", "x":0, "y":4.5, "w":2.25}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":"<", "x":9.25, "y":4.5}, + {"label":">", "x":10.25, "y":4.5}, + {"label":"?", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, + + {"label":"\u2191", "x":16.25, "y":4.5}, + + {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, + {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, + {"x":3.75, "y":5.5, "w":6.25}, + {"label":"Alt", "x":10, "y":5.5, "w":1.25}, + {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, + + {"label":"\u2190", "x":15.25, "y":5.5}, + {"label":"\u2193", "x":16.25, "y":5.5}, + {"label":"\u2192", "x":17.25, "y":5.5} + ] + }, + "LAYOUT_tkl_iso": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + + {"label":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + + {"label":"\u00ac", "x":0, "y":1.5}, + {"label":"!", "x":1, "y":1.5}, + {"label":"\"", "x":2, "y":1.5}, + {"label":"\u00a3", "x":3, "y":1.5}, + {"label":"$", "x":4, "y":1.5}, + {"label":"%", "x":5, "y":1.5}, + {"label":"^", "x":6, "y":1.5}, + {"label":"&", "x":7, "y":1.5}, + {"label":"*", "x":8, "y":1.5}, + {"label":"(", "x":9, "y":1.5}, + {"label":")", "x":10, "y":1.5}, + {"label":"_", "x":11, "y":1.5}, + {"label":"+", "x":12, "y":1.5}, + {"label":"Backspace", "x":13, "y":1.5, "w":2}, + + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"PgUp", "x":17.25, "y":1.5}, + + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"{", "x":11.5, "y":2.5}, + {"label":"}", "x":12.5, "y":2.5}, + + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"PgDn", "x":17.25, "y":2.5}, + + {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, + {"label":"A", "x":1.75, "y":3.5}, + {"label":"S", "x":2.75, "y":3.5}, + {"label":"D", "x":3.75, "y":3.5}, + {"label":"F", "x":4.75, "y":3.5}, + {"label":"G", "x":5.75, "y":3.5}, + {"label":"H", "x":6.75, "y":3.5}, + {"label":"J", "x":7.75, "y":3.5}, + {"label":"K", "x":8.75, "y":3.5}, + {"label":"L", "x":9.75, "y":3.5}, + {"label":":", "x":10.75, "y":3.5}, + {"label":"@", "x":11.75, "y":3.5}, + {"label":"~", "x":12.75, "y":3.5}, + {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, + + {"label":"Shift", "x":0, "y":4.5, "w":1.25}, + {"label":"|", "x":1.25, "y":4.5}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":"<", "x":9.25, "y":4.5}, + {"label":">", "x":10.25, "y":4.5}, + {"label":"?", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, + + {"label":"\u2191", "x":16.25, "y":4.5}, + + {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, + {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, + {"x":3.75, "y":5.5, "w":6.25}, + {"label":"AltGr", "x":10, "y":5.5, "w":1.25}, + {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, + + {"label":"\u2190", "x":15.25, "y":5.5}, + {"label":"\u2193", "x":16.25, "y":5.5}, + {"label":"\u2192", "x":17.25, "y":5.5} + ] + } + } +} diff --git a/keyboards/maartenwut/wasdat_code/keymaps/default/keymap.c b/keyboards/maartenwut/wasdat_code/keymaps/default/keymap.c new file mode 100644 index 00000000000..beee150b601 --- /dev/null +++ b/keyboards/maartenwut/wasdat_code/keymaps/default/keymap.c @@ -0,0 +1,53 @@ +/* Copyright 2019 Maarten Dekkers + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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] = { + /* + * ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │Esc│   │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Slk│Pse│ + * └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │  \  │ │Del│End│PgD│ │ 7 │ 8 │ 9 │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ ├───┼───┼───┤ + │ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │  Enter │               │ 4 │ 5 │ 6 │   │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐     ├───┼───┼───┼───┤ + * │ Shift  │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │    Shift │     │ ↑ │     │ 1 │ 2 │ 3 │   │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│ + * │Ctrl│GUI │Alt │                        │ Alt│ GUI│Menu│Ctrl│ │ ← │ ↓ │ → │ │   0   │ . │   │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ + */ + LAYOUT_fullsize_ansi( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + LAYOUT_fullsize_ansi( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_STEP, BL_TOGG, _______, _______, KC_MUTE, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/maartenwut/wasdat_code/keymaps/default/readme.md b/keyboards/maartenwut/wasdat_code/keymaps/default/readme.md new file mode 100644 index 00000000000..66cf593892c --- /dev/null +++ b/keyboards/maartenwut/wasdat_code/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default ANSI keymap for the Wasdat diff --git a/keyboards/maartenwut/wasdat_code/keymaps/default_iso/keymap.c b/keyboards/maartenwut/wasdat_code/keymaps/default_iso/keymap.c new file mode 100644 index 00000000000..8bdad483120 --- /dev/null +++ b/keyboards/maartenwut/wasdat_code/keymaps/default_iso/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2019 Maarten Dekkers + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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] = { + /* + * ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │Esc│   │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Slk│Pse│ + * └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │     │ │Del│End│PgD│ │ 7 │ 8 │ 9 │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ Ent│ └───┴───┴───┘ ├───┼───┼───┤ + │ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │    │               │ 4 │ 5 │ 6 │   │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤     ┌───┐     ├───┼───┼───┼───┤ + * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │    Shift │     │ ↑ │     │ 1 │ 2 │ 3 │   │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│ + * │Ctrl│GUI │Alt │                        │AlGr│ GUI│Menu│Ctrl│ │ ← │ ↓ │ → │ │   0   │ . │   │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ + */ + LAYOUT_fullsize_iso( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + 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/maartenwut/wasdat_code/keymaps/default_iso/readme.md b/keyboards/maartenwut/wasdat_code/keymaps/default_iso/readme.md new file mode 100644 index 00000000000..e36d7642016 --- /dev/null +++ b/keyboards/maartenwut/wasdat_code/keymaps/default_iso/readme.md @@ -0,0 +1 @@ +# The default ISO keymap for the Wasdat diff --git a/keyboards/maartenwut/wasdat_code/keymaps/via/keymap.c b/keyboards/maartenwut/wasdat_code/keymaps/via/keymap.c new file mode 100644 index 00000000000..c3155c1e724 --- /dev/null +++ b/keyboards/maartenwut/wasdat_code/keymaps/via/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2019 Maarten Dekkers + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, KC_P4, KC_P5, KC_P6, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + [1] = LAYOUT_all( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_STEP, BL_TOGG, _______, _______, KC_MUTE, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/maartenwut/wasdat_code/keymaps/via/rules.mk b/keyboards/maartenwut/wasdat_code/keymaps/via/rules.mk new file mode 100644 index 00000000000..36b7ba9cbc9 --- /dev/null +++ b/keyboards/maartenwut/wasdat_code/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/maartenwut/wasdat_code/matrix.c b/keyboards/maartenwut/wasdat_code/matrix.c new file mode 100644 index 00000000000..7844db7ab74 --- /dev/null +++ b/keyboards/maartenwut/wasdat_code/matrix.c @@ -0,0 +1,369 @@ +/* +Copyright 2012-2018 Jun Wako, Jack Humbert, 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 +#include +#include "wait.h" +#include "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" + +#ifdef DIRECT_PINS +static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS; +#elif (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) +static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +//static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; +#endif + +// matrix code + +#ifdef DIRECT_PINS + +static void init_pins(void) { + for (int row = 0; row < MATRIX_ROWS; row++) { + for (int col = 0; col < MATRIX_COLS; col++) { + pin_t pin = direct_pins[row][col]; + if (pin != NO_PIN) { + setPinInputHigh(pin); + } + } + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + matrix_row_t last_row_value = current_matrix[current_row]; + current_matrix[current_row] = 0; + + for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + pin_t pin = direct_pins[current_row][col_index]; + if (pin != NO_PIN) { + current_matrix[current_row] |= readPin(pin) ? 0 : (MATRIX_ROW_SHIFTER << col_index); + } + } + + return (last_row_value != current_matrix[current_row]); +} + +#elif (DIODE_DIRECTION == COL2ROW) + +static void select_row(uint8_t row) { + setPinOutput(row_pins[row]); + writePinLow(row_pins[row]); +} + +static void unselect_row(uint8_t row) { setPinInputHigh(row_pins[row]); } + +static void unselect_rows(void) { + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_pins[x]); + } +} + +static void init_pins(void) { + unselect_rows(); + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + wait_us(30); + + // For each col... + for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + + // Select the col pin to read (active low) + uint8_t pin_state = readPin(col_pins[col_index]); + + // Populate the matrix row with the state of the col pin + current_matrix[current_row] |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); + } + + // Unselect row + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); +} + +#elif (DIODE_DIRECTION == ROW2COL) + +/* Cols 0 - 15 + * col 0: F7 + * col 1: F5 + * col 2: F6 + * col 3: F1 + * col 4: F4 + * col 5: F0 + * These columns use a 74HC237D 3 to 8 bit demultiplexer. D4 is the enable pin, must be set high to use it. + * A0 A1 A2 + * col / pin: PD2 PD1 PD0 + * 6: 1 1 1 + * col 7: D3 + * col 8: B7 + * 9: 0 1 1 + * 10: 1 0 1 + * 11: 0 0 1 + * 12: 1 1 0 + * 13: 0 1 0 + * 14: 1 0 0 + * 15: 0 0 0 + */ +static void select_col(uint8_t col) { + switch (col) { + case 0: + writePinLow(F7); + break; + case 1: + writePinLow(F5); + break; + case 2: + writePinLow(F6); + break; + case 3: + writePinLow(F1); + break; + case 4: + writePinLow(F4); + break; + case 5: + writePinLow(F0); + break; + case 6: + writePinHigh(D4); + writePinHigh(D2); + writePinHigh(D1); + writePinHigh(D0); + break; + case 7: + writePinLow(D5); + break; + case 8: + writePinLow(D3); + break; + case 9: + writePinHigh(D4); + writePinHigh(D1); + writePinHigh(D0); + break; + case 10: + writePinHigh(D4); + writePinHigh(D2); + writePinHigh(D0); + break; + case 11: + writePinHigh(D4); + writePinHigh(D0); + break; + case 12: + writePinHigh(D4); + writePinHigh(D2); + writePinHigh(D1); + break; + case 13: + writePinHigh(D4); + writePinHigh(D1); + break; + case 14: + writePinHigh(D4); + writePinHigh(D2); + break; + case 15: + writePinHigh(D4); + break; + } +} + +static void unselect_col(uint8_t col) { + switch (col) { + case 0: + writePinHigh(F7); + break; + case 1: + writePinHigh(F5); + break; + case 2: + writePinHigh(F6); + break; + case 3: + writePinHigh(F1); + break; + case 4: + writePinHigh(F4); + break; + case 5: + writePinHigh(F0); + break; + case 6: + writePinLow(D4); + writePinLow(D2); + writePinLow(D1); + writePinLow(D0); + break; + case 7: + writePinHigh(D5); + break; + case 8: + writePinHigh(D3); + break; + case 9: + writePinLow(D4); + writePinLow(D2); + writePinLow(D1); + writePinLow(D0); + break; + case 10: + writePinLow(D4); + writePinLow(D2); + writePinLow(D1); + writePinLow(D0); + break; + case 11: + writePinLow(D4); + writePinLow(D2); + writePinLow(D1); + writePinLow(D0); + break; + case 12: + writePinLow(D4); + writePinLow(D2); + writePinLow(D1); + writePinLow(D0); + break; + case 13: + writePinLow(D4); + writePinLow(D2); + writePinLow(D1); + writePinLow(D0); + break; + case 14: + writePinLow(D4); + writePinLow(D2); + writePinLow(D1); + writePinLow(D0); + break; + case 15: + writePinLow(D4); + writePinLow(D2); + writePinLow(D1); + writePinLow(D0); + break; + } +} + +static void unselect_cols(void) { + //Native + writePinHigh(F7); + writePinHigh(F5); + writePinHigh(F6); + writePinHigh(F1); + writePinHigh(F4); + writePinHigh(F0); + writePinHigh(D3); + writePinHigh(D5); + + //Demultiplexer + writePinLow(D4); + writePinLow(D2); + writePinLow(D1); + writePinLow(D0); +} + +static void init_pins(void) { + unselect_cols(); + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_pins[x]); + } + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D2); + setPinOutput(D3); + setPinOutput(F7); + setPinOutput(F5); + setPinOutput(F6); + setPinOutput(F1); + setPinOutput(F4); + setPinOutput(F0); + setPinOutput(D3); + setPinOutput(D5); + setPinOutput(D4); +} + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) { + bool matrix_changed = false; + + // Select col and wait for col selecton to stabilize + select_col(current_col); + wait_us(30); + + // For each row... + for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[row_index]; + + // Check row pin state + if (readPin(row_pins[row_index]) == 0) { + // Pin LO, set col bit + current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col); + } else { + // Pin HI, clear col bit + current_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) { + matrix_changed = true; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +#endif + +void matrix_init_custom(void) { + // initialize key pins + init_pins(); +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool changed = false; + +#if defined(DIRECT_PINS) || (DIODE_DIRECTION == COL2ROW) + // Set row, read cols + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { + changed |= read_cols_on_row(current_matrix, current_row); + } +#elif (DIODE_DIRECTION == ROW2COL) + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { + changed |= read_rows_on_col(current_matrix, current_col); + } +#endif + + return changed; +} diff --git a/keyboards/maartenwut/wasdat_code/readme.md b/keyboards/maartenwut/wasdat_code/readme.md new file mode 100644 index 00000000000..403fabc684b --- /dev/null +++ b/keyboards/maartenwut/wasdat_code/readme.md @@ -0,0 +1,19 @@ +# Wasdat Code + +A drop-in replacement controller for the WASD CODE TKL and fullsize models. + +* Keyboard Maintainer: [Maartenwut](https://github.com/Maartenwut) +* Hardware Supported: WASD CODE TKL/Fullsize ANSI & ISO with Wasdat Code controller +* Hardware Availability: [maartenwut.com](https://maartenwut.com/product/wasdat-code/) + +## Flashing + +The WASD has no reset button, so to put the controller in flashing mode, simply unplug the USB cable and plug it back in while holding the ESC key on the keyboard. + +--- + +Make example for this keyboard (after setting up your build environment): + + make maartenwut/wasdat_code:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/maartenwut/wasdat_code/rules.mk b/keyboards/maartenwut/wasdat_code/rules.mk new file mode 100644 index 00000000000..642f8dc5144 --- /dev/null +++ b/keyboards/maartenwut/wasdat_code/rules.mk @@ -0,0 +1,37 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = qmk-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +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 +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +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 +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +CUSTOM_MATRIX = lite +SRC += matrix.c + +LAYOUTS = fullsize_ansi fullsize_iso tkl_ansi tkl_iso diff --git a/keyboards/maartenwut/wasdat_code/wasdat_code.c b/keyboards/maartenwut/wasdat_code/wasdat_code.c new file mode 100644 index 00000000000..044439fb518 --- /dev/null +++ b/keyboards/maartenwut/wasdat_code/wasdat_code.c @@ -0,0 +1,47 @@ +/* Copyright 2019 Maarten Dekkers + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "wasdat_code.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +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 led_init_ports(void) { + setPinOutput(B1); + setPinOutput(B2); + setPinOutput(B3); + writePinHigh(B1); + writePinHigh(B2); + writePinHigh(B3); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(B1, !led_state.caps_lock); + writePin(B2, !led_state.scroll_lock); + writePin(B3, !led_state.num_lock); + } + + return true; +} diff --git a/keyboards/maartenwut/wasdat_code/wasdat_code.h b/keyboards/maartenwut/wasdat_code/wasdat_code.h new file mode 100644 index 00000000000..5b3ed20913a --- /dev/null +++ b/keyboards/maartenwut/wasdat_code/wasdat_code.h @@ -0,0 +1,107 @@ +/* Copyright 2019 Maarten Dekkers + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define LAYOUT_all LAYOUT_fullsize_iso + +#define LAYOUT_fullsize_ansi( \ + k05, k64, k62, k22, k02, k31, k0c, k2f, k6f, k6b, k3b, k0b, k5b, k33, k43, k41, \ + k65, k35, k34, k32, k30, k60, k6a, k3a, k3c, k3f, k3d, k6d, k6c, k2b, k67, k6e, k66, k78, k77, k76, k56, \ + k25, k45, k44, k42, k40, k20, k2a, k4a, k4c, k4f, k4d, k2d, k2c, k1b, k68, k3e, k36, k48, k47, k46, k4e, \ + k24, k15, k14, k12, k10, k00, k0a, k1a, k1c, k1f, k1d, k0d, k7b, k28, k27, k26, \ + k29, k75, k74, k72, k70, k50, k5a, k7a, k7c, k7f, k5d, k19, k0e, k18, k17, k16, k1e, \ + k61, k21, k03, k08, k53, k11, k23, k71, k5e, k58, k57, k07, k06 \ +) \ +{ \ + { k00, XXX, k02, k03, XXX, k05, k06, k07, k08, XXX, k0a, k0b, k0c, k0d, k0e, XXX }, \ + { k10, k11, k12, XXX, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, XXX, k2f }, \ + { k30, k31, k32, k33, k34, k35, k36, XXX, XXX, XXX, k3a, k3b, k3c, k3d, k3e, k3f }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, XXX, k4a, XXX, k4c, k4d, k4e, k4f }, \ + { k50, XXX, XXX, k53, XXX, XXX, k56, k57, k58, XXX, k5a, k5b, XXX, k5d, k5e, XXX }, \ + { k60, k61, k62, XXX, k64, k65, k66, k67, k68, XXX, k6a, k6b, k6c, k6d, k6e, k6f }, \ + { k70, k71, k72, XXX, k74, k75, k76, k77, k78, XXX, k7a, k7b, k7c, XXX, XXX, k7f } \ +} + +#define LAYOUT_fullsize_iso( \ + k05, k64, k62, k22, k02, k31, k0c, k2f, k6f, k6b, k3b, k0b, k5b, k33, k43, k41, \ + k65, k35, k34, k32, k30, k60, k6a, k3a, k3c, k3f, k3d, k6d, k6c, k2b, k67, k6e, k66, k78, k77, k76, k56, \ + k25, k45, k44, k42, k40, k20, k2a, k4a, k4c, k4f, k4d, k2d, k2c, k68, k3e, k36, k48, k47, k46, k4e, \ + k24, k15, k14, k12, k10, k00, k0a, k1a, k1c, k1f, k1d, k0d, k1b, k7b, k28, k27, k26, \ + k29, k04, k75, k74, k72, k70, k50, k5a, k7a, k7c, k7f, k5d, k19, k0e, k18, k17, k16, k1e, \ + k61, k21, k03, k08, k53, k11, k23, k71, k5e, k58, k57, k07, k06 \ +) \ +{ \ + { k00, XXX, k02, k03, k04, k05, k06, k07, k08, XXX, k0a, k0b, k0c, k0d, k0e, XXX }, \ + { k10, k11, k12, XXX, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, XXX, k2f }, \ + { k30, k31, k32, k33, k34, k35, k36, XXX, XXX, XXX, k3a, k3b, k3c, k3d, k3e, k3f }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, XXX, k4a, XXX, k4c, k4d, k4e, k4f }, \ + { k50, XXX, XXX, k53, XXX, XXX, k56, k57, k58, XXX, k5a, k5b, XXX, k5d, k5e, XXX }, \ + { k60, k61, k62, XXX, k64, k65, k66, k67, k68, XXX, k6a, k6b, k6c, k6d, k6e, k6f }, \ + { k70, k71, k72, XXX, k74, k75, k76, k77, k78, XXX, k7a, k7b, k7c, XXX, XXX, k7f } \ +} + +#define LAYOUT_tkl_ansi( \ + k05, k64, k62, k22, k02, k31, k0c, k2f, k6f, k6b, k3b, k0b, k5b, k33, k43, k41, \ + k65, k35, k34, k32, k30, k60, k6a, k3a, k3c, k3f, k3d, k6d, k6c, k2b, k67, k6e, k66, \ + k25, k45, k44, k42, k40, k20, k2a, k4a, k4c, k4f, k4d, k2d, k2c, k1b, k68, k3e, k36, \ + k24, k15, k14, k12, k10, k00, k0a, k1a, k1c, k1f, k1d, k0d, k7b, \ + k29, k75, k74, k72, k70, k50, k5a, k7a, k7c, k7f, k5d, k19, k0e, \ + k61, k21, k03, k08, k53, k11, k23, k71, k5e, k58, k57 \ +) \ +{ \ + { k00, XXX, k02, k03, XXX, k05, XXX, XXX, k08, XXX, k0a, k0b, k0c, k0d, k0e, XXX }, \ + { k10, k11, k12, XXX, k14, k15, XXX, XXX, XXX, k19, k1a, k1b, k1c, k1d, XXX, k1f }, \ + { k20, k21, k22, k23, k24, k25, XXX, XXX, XXX, k29, k2a, k2b, k2c, k2d, XXX, k2f }, \ + { k30, k31, k32, k33, k34, k35, k36, XXX, XXX, XXX, k3a, k3b, k3c, k3d, k3e, k3f }, \ + { k40, k41, k42, k43, k44, k45, XXX, XXX, XXX, XXX, k4a, XXX, k4c, k4d, XXX, k4f }, \ + { k50, XXX, XXX, k53, XXX, XXX, XXX, k57, k58, XXX, k5a, k5b, XXX, k5d, k5e, XXX }, \ + { k60, k61, k62, XXX, k64, k65, k66, k67, k68, XXX, k6a, k6b, k6c, k6d, k6e, k6f }, \ + { k70, k71, k72, XXX, k74, k75, XXX, XXX, XXX, XXX, k7a, k7b, k7c, XXX, XXX, k7f } \ +} + +#define LAYOUT_tkl_iso( \ + k05, k64, k62, k22, k02, k31, k0c, k2f, k6f, k6b, k3b, k0b, k5b, k33, k43, k41, \ + k65, k35, k34, k32, k30, k60, k6a, k3a, k3c, k3f, k3d, k6d, k6c, k2b, k67, k6e, k66, \ + k25, k45, k44, k42, k40, k20, k2a, k4a, k4c, k4f, k4d, k2d, k2c, k68, k3e, k36, \ + k24, k15, k14, k12, k10, k00, k0a, k1a, k1c, k1f, k1d, k0d, k1b, k7b, \ + k29, k04, k75, k74, k72, k70, k50, k5a, k7a, k7c, k7f, k5d, k19, k0e, \ + k61, k21, k03, k08, k53, k11, k23, k71, k5e, k58, k57 \ +) \ +{ \ + { k00, XXX, k02, k03, k04, k05, XXX, XXX, k08, XXX, k0a, k0b, k0c, k0d, k0e, XXX }, \ + { k10, k11, k12, XXX, k14, k15, XXX, XXX, XXX, k19, k1a, k1b, k1c, k1d, XXX, k1f }, \ + { k20, k21, k22, k23, k24, k25, XXX, XXX, XXX, k29, k2a, k2b, k2c, k2d, XXX, k2f }, \ + { k30, k31, k32, k33, k34, k35, k36, XXX, XXX, XXX, k3a, k3b, k3c, k3d, k3e, k3f }, \ + { k40, k41, k42, k43, k44, k45, XXX, XXX, XXX, XXX, k4a, XXX, k4c, k4d, XXX, k4f }, \ + { k50, XXX, XXX, k53, XXX, XXX, XXX, k57, k58, XXX, k5a, k5b, XXX, k5d, k5e, XXX }, \ + { k60, k61, k62, XXX, k64, k65, k66, k67, k68, XXX, k6a, k6b, k6c, k6d, k6e, k6f }, \ + { k70, k71, k72, XXX, k74, k75, XXX, XXX, XXX, XXX, k7a, k7b, k7c, XXX, XXX, k7f } \ +} diff --git a/keyboards/mc_76k/config.h b/keyboards/mc_76k/config.h index cccd6a8e933..cd14081f4d4 100644 --- a/keyboards/mc_76k/config.h +++ b/keyboards/mc_76k/config.h @@ -98,7 +98,5 @@ along with this program. If not, see . */ /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/miller/gm862/config.h b/keyboards/miller/gm862/config.h index fb44ed6c865..1a8eb265d97 100644 --- a/keyboards/miller/gm862/config.h +++ b/keyboards/miller/gm862/config.h @@ -28,11 +28,11 @@ #define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW + /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE -# define NO_ACTION_MACRO -# define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 3 #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/mint60/config.h b/keyboards/mint60/config.h index 19a17a7c5e0..1b11092eb5e 100644 --- a/keyboards/mint60/config.h +++ b/keyboards/mint60/config.h @@ -148,6 +148,7 @@ along with this program. If not, see . #define RGB_DI_PIN D3 #define RGBLED_NUM 8 +#define RGBLIGHT_SPLIT #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 diff --git a/keyboards/montsinger/rebound/keymaps/rossman360/keymap.c b/keyboards/montsinger/rebound/keymaps/rossman360/keymap.c deleted file mode 100644 index 8391ec8e147..00000000000 --- a/keyboards/montsinger/rebound/keymaps/rossman360/keymap.c +++ /dev/null @@ -1,55 +0,0 @@ -#include QMK_KEYBOARD_H -#include "rossman360.h" - -#define PGMOD LT(_NUM, KC_PGDN) -#define TABMOD LT(_FN1, KC_TAB) -#define SPCMOD LT(_FN1, KC_SPACE) -#define ENTMOD LT(_FN2, KC_ENTER) -#define ESCMOD LT(_NUM, KC_ESC) -#define RSMOD LT(_FN1, KC_RSHIFT) - -enum layer_names { - _BASE, - _DEL, - _FN1, - _FN2, - _NUM, -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -[_BASE] = LAYOUT_ortho_4x12( - KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , NTAB , - JUMPBACK, 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_MINS, - CMDBSP , ALTDEL , KC_NO , CTRLSP , TABMOD , PGMOD , ENTMOD , SPCMOD , MO(_DEL),KC_NO , KC_BSPC, KC_DEL - ), - -[_FN1] = LAYOUT_ortho_4x12( - _______, TAB1 , TAB2 , TAB3 , TAB4 , _______, _______, UNDO , _______, _______, _______, CTAB , - KC_CAPS, _______, _______, _______, _______, _______, KC_HOME, KC_LEFT, KC_UP , KC_RIGHT,KC_END , KC_NO , - _______, _______, XPANDR , _______, _______, _______, _______, PMERGE , KC_DOWN, _______, _______, _______, - WREFRESH,_______, _______, _______, LWORD , RWORD , RVOLD , RVOLU , _______, _______, _______, _______ - ), - -[_FN2] = LAYOUT_ortho_4x12( - _______, SPEAK1 , SPEAK2 , SPEAK3 , SPEAK4 , _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, PARADOWN, CSPEAK, _______, _______, _______, _______, _______, _______ - ), - -[_DEL] = LAYOUT_ortho_4x12( - _______, _______, _______, _______, _______, _______, _______, UNDO , _______, _______, _______, CTAB , - REMCAPS, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_UP ,KC_RIGHT, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, _______, - _______, _______, _______, KC_DEL , KC_BSPC, BWORD , _______, _______, _______, _______, _______, _______ - ), - -[_NUM] = LAYOUT_ortho_4x12( - _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_MINS, KC_EQL, - KC_CAPS, _______, _______, _______, _______, _______, KC_MINS, KC_4 , KC_5 , KC_6 , KC_COLN, _______, - _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_1 , KC_2 , KC_3 , KC_BSLS, _______, - _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_0 , _______, _______, _______ - ) -}; diff --git a/keyboards/montsinger/rebound/readme.md b/keyboards/montsinger/rebound/readme.md index d634408cc9a..024b4a96b7e 100755 --- a/keyboards/montsinger/rebound/readme.md +++ b/keyboards/montsinger/rebound/readme.md @@ -5,11 +5,12 @@ A conjoined-split 40% 4x12 ortholinear keyboard made and sold by Montsinger. [More info on Montsinger.net](https://montsinger.net). * Keyboard Maintainer: [Rossman360](https://github.com/rossman360) -* Hardware Supported: Pro Micro, Elite-C +* Hardware Supported: Rebound rev1 or rev2; Pro Micro or Elite-C * Hardware Availability: [Montsinger.net](https://montsinger.net) Make example for this keyboard (after setting up your build environment): - make montsinger/rebound:default + make montsinger/rebound/rev1:default # for rev1 + make montsinger/rebound/rev2:default # for rev2 See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs) \ No newline at end of file diff --git a/keyboards/montsinger/rebound/rebound.h b/keyboards/montsinger/rebound/rebound.h index 0ba4c51cebb..c9fc2627782 100644 --- a/keyboards/montsinger/rebound/rebound.h +++ b/keyboards/montsinger/rebound/rebound.h @@ -14,26 +14,12 @@ * along with this program. If not, see . */ -#pragma once +#pragma once #include "quantum.h" -/* This is a shortcut to help you visually see your layout. - * The first section contains all of the arguments representing the - * layout of the board and position of the keys. - * - * The second converts the arguments into a two-dimensional array which - * represents the switch matrix. - */ - -#define LAYOUT_ortho_4x12( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B,\ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B\ - ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B } \ -} +#if defined(KEYBOARD_montsinger_rebound_rev1) + #include "rev1.h" +#elif defined(KEYBOARD_montsinger_rebound_rev2) + #include "rev2.h" +#endif diff --git a/keyboards/montsinger/rebound/config.h b/keyboards/montsinger/rebound/rev1/config.h similarity index 100% rename from keyboards/montsinger/rebound/config.h rename to keyboards/montsinger/rebound/rev1/config.h diff --git a/keyboards/montsinger/rebound/rev1/info.json b/keyboards/montsinger/rebound/rev1/info.json new file mode 100644 index 00000000000..5865aa66a30 --- /dev/null +++ b/keyboards/montsinger/rebound/rev1/info.json @@ -0,0 +1,61 @@ +{ + "keyboard": "montsinger/rebound/rev1", + "url": "https://montsinger.net", + "maintainer": "rossman360", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x12": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":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}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4, "y":1}, + {"x":5, "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":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":4, "y":2}, + {"x":5, "y":2}, + {"x":7, "y":2}, + {"x":8, "y":2}, + {"x":9, "y":2}, + {"x":10, "y":2}, + {"x":11, "y":2}, + {"x":12, "y":2}, + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3}, + {"x":5, "y":3}, + {"x":7, "y":3}, + {"x":8, "y":3}, + {"x":9, "y":3}, + {"x":10, "y":3}, + {"x":11, "y":3}, + {"x":12, "y":3} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/montsinger/rebound/keymaps/curry/keymap.c b/keyboards/montsinger/rebound/rev1/keymaps/curry/keymap.c similarity index 100% rename from keyboards/montsinger/rebound/keymaps/curry/keymap.c rename to keyboards/montsinger/rebound/rev1/keymaps/curry/keymap.c diff --git a/keyboards/montsinger/rebound/keymaps/curry/rules.mk b/keyboards/montsinger/rebound/rev1/keymaps/curry/rules.mk similarity index 100% rename from keyboards/montsinger/rebound/keymaps/curry/rules.mk rename to keyboards/montsinger/rebound/rev1/keymaps/curry/rules.mk diff --git a/keyboards/montsinger/rebound/keymaps/default/keymap.c b/keyboards/montsinger/rebound/rev1/keymaps/default/keymap.c similarity index 100% rename from keyboards/montsinger/rebound/keymaps/default/keymap.c rename to keyboards/montsinger/rebound/rev1/keymaps/default/keymap.c diff --git a/keyboards/montsinger/rebound/rev1/rev1.h b/keyboards/montsinger/rebound/rev1/rev1.h new file mode 100644 index 00000000000..a4e180e2ec2 --- /dev/null +++ b/keyboards/montsinger/rebound/rev1/rev1.h @@ -0,0 +1,39 @@ +/* Copyright 2020 Ross Montsinger + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * The first section contains all of the arguments representing the + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define LAYOUT_ortho_4x12( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B,\ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B\ + ) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B } \ +} diff --git a/keyboards/montsinger/rebound/rev1/rules.mk b/keyboards/montsinger/rebound/rev1/rules.mk new file mode 100644 index 00000000000..9487213e8d5 --- /dev/null +++ b/keyboards/montsinger/rebound/rev1/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +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 +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +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 +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +LAYOUTS = ortho_4x12 +LAYOUTS_HAS_RGB = no \ No newline at end of file diff --git a/keyboards/montsinger/rebound/rev2/config.h b/keyboards/montsinger/rebound/rev2/config.h new file mode 100644 index 00000000000..39f5206f7f3 --- /dev/null +++ b/keyboards/montsinger/rebound/rev2/config.h @@ -0,0 +1,65 @@ +/* +Copyright 2020 Ross Montsinger +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ + +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x552F +#define DEVICE_VER 0x0002 +#define MANUFACTURER Montsinger +#define PRODUCT Rebound +#define DESCRIPTION "A conjoined Let's Split" + +/* key matrix size */ + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 12 + +/* + * 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 { D1, B5, B2, B6, B0 } +#define MATRIX_COL_PINS { D0, D4, C6, D7, E6, B4, B3, B1, F7, F6, F5, F4 } +#define UNUSED_PINS { } + +#define ENCODERS_PAD_A { D2 } +#define ENCODERS_PAD_B { D3 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/montsinger/rebound/rev2/info.json b/keyboards/montsinger/rebound/rev2/info.json new file mode 100644 index 00000000000..3c9cdbe82c6 --- /dev/null +++ b/keyboards/montsinger/rebound/rev2/info.json @@ -0,0 +1,128 @@ +{ + "keyboard":"montsinger/rebound/rev2", + "url": "https://montsinger.net", + "maintainer": "rossman360", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT_all": { + "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":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}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4, "y":1}, + {"x":5, "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":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":4, "y":2}, + {"x":5, "y":2}, + + {"x":7, "y":2}, + {"x":8, "y":2}, + {"x":9, "y":2}, + {"x":10, "y":2}, + {"x":11, "y":2}, + {"x":12, "y":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3}, + {"x":5, "y":3}, + {"x":6, "y":3}, + {"x":7, "y":3}, + {"x":8, "y":3}, + {"x":9, "y":3}, + {"x":10, "y":3}, + {"x":11, "y":3}, + {"x":12, "y":3} + ] + }, + "LAYOUT_ortho_4x12": { + "layout": [ + + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + + {"x":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}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4, "y":1}, + {"x":5, "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":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":4, "y":2}, + {"x":5, "y":2}, + + {"x":7, "y":2}, + {"x":8, "y":2}, + {"x":9, "y":2}, + {"x":10, "y":2}, + {"x":11, "y":2}, + {"x":12, "y":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3}, + {"x":5, "y":3}, + + {"x":7, "y":3}, + {"x":8, "y":3}, + {"x":9, "y":3}, + {"x":10, "y":3}, + {"x":11, "y":3}, + {"x":12, "y":3} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/montsinger/rebound/rev2/keymaps/default/keymap.c b/keyboards/montsinger/rebound/rev2/keymaps/default/keymap.c new file mode 100644 index 00000000000..57feb197263 --- /dev/null +++ b/keyboards/montsinger/rebound/rev2/keymaps/default/keymap.c @@ -0,0 +1,161 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +enum layer_names { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_all( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_ENT, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_all( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_ENT, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_all( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_ENT, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_all( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_all( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_all( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + break; + } + return true; +} diff --git a/keyboards/montsinger/rebound/rev2/keymaps/rossman360/keymap.c b/keyboards/montsinger/rebound/rev2/keymaps/rossman360/keymap.c new file mode 100644 index 00000000000..23bd7e4ec96 --- /dev/null +++ b/keyboards/montsinger/rebound/rev2/keymaps/rossman360/keymap.c @@ -0,0 +1,57 @@ +#include QMK_KEYBOARD_H +#include "rossman360.h" + +#define PGMOD LT(_NUM, KC_PGDN) +#define TABMOD LT(_FN1, KC_TAB) +#define SPCMOD LT(_FN1, KC_SPACE) +#define ENTMOD LT(_FN2, KC_ENTER) +#define ESCMOD LT(_NUM, KC_ESC) +#define RSMOD LT(_FN1, KC_RSHIFT) + +enum layer_names { + _BASE, + _DEL, + _FN1, + _FN2, + _NUM, +}; + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_BASE] = LAYOUT_all( + KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , NTAB , + JUMPBACK, 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_MINS, + CMDBSP , ALTDEL , KC_NO , CTRLSP , TABMOD , PGMOD , KC_Y , ENTMOD , SPCMOD , MO(_DEL),KC_NO , KC_BSPC, KC_DEL + ), + +[_FN1] = LAYOUT_all( + _______, TAB1 , TAB2 , TAB3 , TAB4 , _______, _______, UNDO , _______, _______, _______, CTAB , + KC_CAPS, _______, _______, _______, _______, _______, KC_HOME, KC_LEFT, KC_UP , KC_RIGHT,KC_END , KC_NO , + _______, _______, XPANDR , _______, _______, _______, _______, PMERGE , KC_DOWN, _______, _______, _______, + WREFRESH,_______, _______, _______, LWORD , RWORD , KC_Y , RVOLD , RVOLU , _______, _______, _______, _______ + ), + +[_FN2] = LAYOUT_all( + _______, SPEAK1 , SPEAK2 , SPEAK3 , SPEAK4 , _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, PARADOWN, CSPEAK, KC_Y , _______, _______, _______, _______, _______, _______ + ), + +[_DEL] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, UNDO , _______, _______, _______, CTAB , + REMCAPS, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_UP ,KC_RIGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, _______, + _______, _______, _______, KC_DEL , KC_BSPC, BWORD , KC_Y , _______, _______, _______, _______, _______, _______ + ), + +[_NUM] = LAYOUT_all( + _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_MINS, KC_EQL, + KC_CAPS, _______, _______, _______, _______, _______, KC_MINS, KC_4 , KC_5 , KC_6 , KC_COLN, _______, + _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_1 , KC_2 , KC_3 , KC_BSLS, _______, + _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_Y , _______, _______, KC_0 , _______, _______, _______ + ) +}; diff --git a/keyboards/montsinger/rebound/rev2/rev2.h b/keyboards/montsinger/rebound/rev2/rev2.h new file mode 100644 index 00000000000..16e0da23c9d --- /dev/null +++ b/keyboards/montsinger/rebound/rev2/rev2.h @@ -0,0 +1,53 @@ +/* Copyright 2020 Ross Montsinger + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * The first section contains all of the arguments representing the + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define LAYOUT_ortho_4x12( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B,\ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B\ + ) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B }, \ + { 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_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B,\ + K30, K31, K32, K33, K34, K35, K40, K36, K37, K38, K39, K3A, K3B\ + ) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B }, \ + { K40, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ +} diff --git a/keyboards/montsinger/rebound/rev2/rules.mk b/keyboards/montsinger/rebound/rev2/rules.mk new file mode 100644 index 00000000000..f5505e25c4c --- /dev/null +++ b/keyboards/montsinger/rebound/rev2/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +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 +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +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 +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +ENCODER_ENABLE = yes + +LAYOUTS = ortho_4x12 +LAYOUTS_HAS_RGB = no \ No newline at end of file diff --git a/keyboards/montsinger/rebound/rules.mk b/keyboards/montsinger/rebound/rules.mk index efa31330399..d277d184e18 100644 --- a/keyboards/montsinger/rebound/rules.mk +++ b/keyboards/montsinger/rebound/rules.mk @@ -1,32 +1 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = atmel-dfu - -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -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 -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -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 -HD44780_ENABLE = no # Enable support for HD44780 based LCDs - -LAYOUTS = ortho_4x12 -LAYOUTS_HAS_RGB=no +DEFAULT_FOLDER = montsinger/rebound/rev1 diff --git a/keyboards/mountainblocks/mb17/config.h b/keyboards/mountainblocks/mb17/config.h index 7db47ff9406..f469c9bd46a 100644 --- a/keyboards/mountainblocks/mb17/config.h +++ b/keyboards/mountainblocks/mb17/config.h @@ -147,12 +147,5 @@ along with this program. If not, see . /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif - - - - - +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/naked60/keymaps/333fred/config.h b/keyboards/naked60/keymaps/333fred/config.h new file mode 100644 index 00000000000..d19e77f0443 --- /dev/null +++ b/keyboards/naked60/keymaps/333fred/config.h @@ -0,0 +1,24 @@ +/* Copyright 2018 Salicylic_acid3 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + + + +/* Select hand configuration */ + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 200 diff --git a/keyboards/naked60/keymaps/333fred/keymap.c b/keyboards/naked60/keymaps/333fred/keymap.c new file mode 100644 index 00000000000..3331dee9b1f --- /dev/null +++ b/keyboards/naked60/keymaps/333fred/keymap.c @@ -0,0 +1,53 @@ +#include QMK_KEYBOARD_H +#include "333fred.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT( + //,--------------------------------------------------------------------| |---------------------------------------------------------. + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + //|--------------+------------+------+--------+--------+---------------| |-------+--------+--------+-------+--------+--------------| + KC_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, + //|--------------+------------+------+--------+--------+---------------| |-------+--------+--------+-------+--------+--------------| + OSM(MOD_LSFT), CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, OSM(MOD_RSFT), + //|--------------+------------+------+--------+--------+---------------+-------+-------+-------+--------+--------+-------+--------+--------------| + KC_F4, KC_F5, KC_LALT, KC_BSPC, TD(TD_SYM_VIM), KC_DEL, KC_ENT, KC_SPC, KC_DOWN, KC_UP, KC_EQL, KC_LGUI + //`----------------------------------------------------------------------------------------------------------------' + ), + + + [SYMB] = LAYOUT( + //,-----------------------------------------------------| |-----------------------------------------------------. + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+-------+--------+--------| + _______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE, _______, KC_7, KC_8, KC_9, _______, KC_F12, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+-------+--------+--------| + _______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_GRV, KC_VOLU, KC_4, KC_5, KC_6, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+-------+--------+--------| + _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_VOLD, KC_1, KC_2, KC_3, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-------+--------+--------| + _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_0, KC_ENT, _______ + //`------------------------------------------------------------------------------------------------------------' + ), + + + [VIM] = LAYOUT( /* Base */ + //,-----------------------------------------------------| |-----------------------------------------------------. + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, DLEFT, DRIGHT, KC_LCTL, KC_LGUI, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------------------------------------------' + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + tap_dance_process_keycode(keycode); + return !try_handle_macro(keycode, record); +} diff --git a/keyboards/niu_mini/config.h b/keyboards/niu_mini/config.h index be94fd9e7bd..84ccc6a6868 100644 --- a/keyboards/niu_mini/config.h +++ b/keyboards/niu_mini/config.h @@ -21,8 +21,8 @@ along with this program. If not, see . /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 +#define VENDOR_ID 0x6E6D +#define PRODUCT_ID 0x0001 #define DEVICE_VER 0x0001 #define MANUFACTURER KBDFans #define PRODUCT NIU Mini diff --git a/keyboards/niu_mini/keymaps/via/keymap.c b/keyboards/niu_mini/keymaps/via/keymap.c new file mode 100644 index 00000000000..702e4199445 --- /dev/null +++ b/keyboards/niu_mini/keymaps/via/keymap.c @@ -0,0 +1,79 @@ +#include QMK_KEYBOARD_H + +#define LOWER FN_MO13 +#define RAISE FN_MO23 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0 + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Caps | Alt |Layer1| Space| Space|Layer2| Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [0] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LCTL, KC_LGUI, KC_CAPS, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* Layer 1 + * ,-----------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Vol- | Vol+ | Mute | | | | F11 | F12 | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Reset| | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [1] = LAYOUT_ortho_4x12( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, KC_F11, KC_F12, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Layer 2 (r_ Indicates RGB Controls) + * ,-----------------------------------------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |r_TOG |r_Mode|r_Hue+|r_Hue-| | | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |BL_TOG|BL_STEP| | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [2] = LAYOUT_ortho_4x12( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Layer 3 (r_ Indicates RGB Controls) + * ,-----------------------------------------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |r_TOG |r_Mode|r_Hue+|r_Hue-| | | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |BL_TOG|BL_STEP| | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | RESET| | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [3] = LAYOUT_ortho_4x12( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/niu_mini/keymaps/via/rules.mk b/keyboards/niu_mini/keymaps/via/rules.mk new file mode 100644 index 00000000000..43061db1dd4 --- /dev/null +++ b/keyboards/niu_mini/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file diff --git a/keyboards/oddball/config.h b/keyboards/oddball/config.h index b3679bea4ce..99d9f75d5fc 100644 --- a/keyboards/oddball/config.h +++ b/keyboards/oddball/config.h @@ -195,10 +195,9 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + /* * MIDI options */ diff --git a/keyboards/pimentoso/paddino02/config.h b/keyboards/pimentoso/paddino02/config.h new file mode 100644 index 00000000000..38be477a504 --- /dev/null +++ b/keyboards/pimentoso/paddino02/config.h @@ -0,0 +1,20 @@ +/* +Copyright 2020 Michele Ferri + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" diff --git a/keyboards/pimentoso/paddino02/readme.md b/keyboards/pimentoso/paddino02/readme.md new file mode 100644 index 00000000000..1e9518351a3 --- /dev/null +++ b/keyboards/pimentoso/paddino02/readme.md @@ -0,0 +1,33 @@ +# Paddino02 + +10-keys DIY mechanical macropad/gamepad. Features staggered columns, 2 thumb keys, symmetric PCB (you can build right-handed and left-handed versions with the same PCB). + +Project page on Github, with build steps and 3d-printable files: + +https://github.com/Pimentoso/Paddino02 + +* Keyboard Maintainer: [Michele Ferri](https://github.com/Pimentoso) +* Hardware Supported: Paddino02 PCB rev1, rev2 + Arduino Pro Micro +* Hardware Availability: the PCB is open source and can be freely printed at websites such as [JLCPCB](https://jlcpcb.com/) + +### To compile: + +`make pimentoso/paddino02/rev2/right:default` + +`make pimentoso/paddino02/rev2/left:default` + +`make pimentoso/paddino02/rev1:default` (legacy version of the PCB) + +### To flash: + +`make pimentoso/paddino02/rev2/right:default:flash` + +`make pimentoso/paddino02/rev2/left:default:flash` + +`make pimentoso/paddino02/rev1:default:flash` (legacy version of the PCB) + +### Default keymap + +![Keymap](https://raw.githubusercontent.com/Pimentoso/qmk_firmware/master/keyboards/pimentoso/paddino02/keymap.png) + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/pimentoso/paddino02/rev1/config.h b/keyboards/pimentoso/paddino02/rev1/config.h new file mode 100755 index 00000000000..8dfc4ac051a --- /dev/null +++ b/keyboards/pimentoso/paddino02/rev1/config.h @@ -0,0 +1,45 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xD00D +#define PRODUCT_ID 0x0020 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Pimentoso +#define PRODUCT Paddino02 rev1 +#define DESCRIPTION 10-key ergo macropad + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 4 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D1, D0, D4 } +#define MATRIX_COL_PINS { D7, E6, B4, B5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#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 +#define RGBLIGHT_SLEEP +#endif diff --git a/keyboards/pimentoso/paddino02/rev1/keymaps/default/keymap.c b/keyboards/pimentoso/paddino02/rev1/keymaps/default/keymap.c new file mode 100755 index 00000000000..343ae043b40 --- /dev/null +++ b/keyboards/pimentoso/paddino02/rev1/keymaps/default/keymap.c @@ -0,0 +1,15 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_ESC, KC_BTN1, KC_UP, KC_BTN2, + KC_LSFT, KC_LEFT, KC_DOWN, KC_RGHT, + MO(1), KC_SPC), + + LAYOUT( + KC_MY_COMPUTER, KC_MPRV, KC_MPLY, KC_MNXT, + KC_WWW_HOME, KC_MUTE, KC_VOLD, KC_VOLU, + KC_TRNS, KC_ENT) + +}; diff --git a/keyboards/pimentoso/paddino02/rev1/rev1.c b/keyboards/pimentoso/paddino02/rev1/rev1.c new file mode 100644 index 00000000000..9ebd22df794 --- /dev/null +++ b/keyboards/pimentoso/paddino02/rev1/rev1.c @@ -0,0 +1,16 @@ +/* Copyright 2020 Michele Ferri + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "rev1.h" diff --git a/keyboards/pimentoso/paddino02/rev1/rev1.h b/keyboards/pimentoso/paddino02/rev1/rev1.h new file mode 100755 index 00000000000..cca4a3c2631 --- /dev/null +++ b/keyboards/pimentoso/paddino02/rev1/rev1.h @@ -0,0 +1,13 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K22, K23 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { KC_NO, KC_NO, K22, K23 } \ +} diff --git a/keyboards/pimentoso/paddino02/rev1/rules.mk b/keyboards/pimentoso/paddino02/rev1/rules.mk new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/pimentoso/paddino02/rev2/left/config.h b/keyboards/pimentoso/paddino02/rev2/left/config.h new file mode 100755 index 00000000000..43249d269cd --- /dev/null +++ b/keyboards/pimentoso/paddino02/rev2/left/config.h @@ -0,0 +1,45 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xD00D +#define PRODUCT_ID 0x0021 +#define DEVICE_VER 0x0002 +#define MANUFACTURER Pimentoso +#define PRODUCT Paddino02 rev2 +#define DESCRIPTION 10-key ergo macropad + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 4 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D0, D4, D1 } +#define MATRIX_COL_PINS { D7, E6, B4, B5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#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 +#define RGBLIGHT_SLEEP +#endif diff --git a/keyboards/pimentoso/paddino02/rev2/left/keymaps/default/keymap.c b/keyboards/pimentoso/paddino02/rev2/left/keymaps/default/keymap.c new file mode 100755 index 00000000000..343ae043b40 --- /dev/null +++ b/keyboards/pimentoso/paddino02/rev2/left/keymaps/default/keymap.c @@ -0,0 +1,15 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_ESC, KC_BTN1, KC_UP, KC_BTN2, + KC_LSFT, KC_LEFT, KC_DOWN, KC_RGHT, + MO(1), KC_SPC), + + LAYOUT( + KC_MY_COMPUTER, KC_MPRV, KC_MPLY, KC_MNXT, + KC_WWW_HOME, KC_MUTE, KC_VOLD, KC_VOLU, + KC_TRNS, KC_ENT) + +}; diff --git a/keyboards/pimentoso/paddino02/rev2/left/left.c b/keyboards/pimentoso/paddino02/rev2/left/left.c new file mode 100644 index 00000000000..26e31efb895 --- /dev/null +++ b/keyboards/pimentoso/paddino02/rev2/left/left.c @@ -0,0 +1,16 @@ +/* Copyright 2020 Michele Ferri + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "left.h" diff --git a/keyboards/pimentoso/paddino02/rev2/left/left.h b/keyboards/pimentoso/paddino02/rev2/left/left.h new file mode 100755 index 00000000000..cca4a3c2631 --- /dev/null +++ b/keyboards/pimentoso/paddino02/rev2/left/left.h @@ -0,0 +1,13 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K22, K23 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { KC_NO, KC_NO, K22, K23 } \ +} diff --git a/keyboards/pimentoso/paddino02/rev2/left/rules.mk b/keyboards/pimentoso/paddino02/rev2/left/rules.mk new file mode 100755 index 00000000000..e69de29bb2d diff --git a/keyboards/pimentoso/paddino02/rev2/right/config.h b/keyboards/pimentoso/paddino02/rev2/right/config.h new file mode 100755 index 00000000000..4ef42b97704 --- /dev/null +++ b/keyboards/pimentoso/paddino02/rev2/right/config.h @@ -0,0 +1,45 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xD00D +#define PRODUCT_ID 0x0022 +#define DEVICE_VER 0x0002 +#define MANUFACTURER Pimentoso +#define PRODUCT Paddino02 rev2 +#define DESCRIPTION 10-key ergo macropad + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 4 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F4, F6, F5 } +#define MATRIX_COL_PINS { B6, B2, B3, B1 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#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 +#define RGBLIGHT_SLEEP +#endif diff --git a/keyboards/pimentoso/paddino02/rev2/right/keymaps/default/keymap.c b/keyboards/pimentoso/paddino02/rev2/right/keymaps/default/keymap.c new file mode 100755 index 00000000000..0cc38837d32 --- /dev/null +++ b/keyboards/pimentoso/paddino02/rev2/right/keymaps/default/keymap.c @@ -0,0 +1,15 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_ESC, KC_BTN2, KC_UP, KC_BTN1, + KC_LSFT, KC_RGHT, KC_DOWN, KC_LEFT, + MO(1), KC_SPC), + + LAYOUT( + KC_MY_COMPUTER, KC_MNXT, KC_MPLY, KC_MPRV, + KC_WWW_HOME, KC_MUTE, KC_VOLU, KC_VOLD, + KC_TRNS, KC_ENT) + +}; diff --git a/keyboards/pimentoso/paddino02/rev2/right/right.c b/keyboards/pimentoso/paddino02/rev2/right/right.c new file mode 100644 index 00000000000..872541271a8 --- /dev/null +++ b/keyboards/pimentoso/paddino02/rev2/right/right.c @@ -0,0 +1,16 @@ +/* Copyright 2020 Michele Ferri + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "right.h" diff --git a/keyboards/pimentoso/paddino02/rev2/right/right.h b/keyboards/pimentoso/paddino02/rev2/right/right.h new file mode 100755 index 00000000000..ac7ed847de2 --- /dev/null +++ b/keyboards/pimentoso/paddino02/rev2/right/right.h @@ -0,0 +1,13 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21 \ +) { \ + { K03, K02, K01, K00 }, \ + { K13, K12, K11, K10 }, \ + { K21, K20, KC_NO, KC_NO } \ +} diff --git a/keyboards/pimentoso/paddino02/rev2/right/rules.mk b/keyboards/pimentoso/paddino02/rev2/right/rules.mk new file mode 100755 index 00000000000..e69de29bb2d diff --git a/keyboards/pimentoso/paddino02/rules.mk b/keyboards/pimentoso/paddino02/rules.mk new file mode 100755 index 00000000000..4c2dab1eef4 --- /dev/null +++ b/keyboards/pimentoso/paddino02/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +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 +AUDIO_ENABLE = no # Audio output on port C6 +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +KEY_LOCK_ENABLE = no # Allows locking any key. diff --git a/keyboards/planck/keymaps/oeywil/.gitignore b/keyboards/planck/keymaps/oeywil/.gitignore deleted file mode 100644 index 03b2b466681..00000000000 --- a/keyboards/planck/keymaps/oeywil/.gitignore +++ /dev/null @@ -1 +0,0 @@ -secrets.h diff --git a/keyboards/planck/keymaps/oeywil/config.h b/keyboards/planck/keymaps/oeywil/config.h deleted file mode 100644 index 09b22e193e8..00000000000 --- a/keyboards/planck/keymaps/oeywil/config.h +++ /dev/null @@ -1,37 +0,0 @@ -#pragma once - -#ifdef AUDIO_ENABLE - #define STARTUP_SONG SONG(PLANCK_SOUND) - // #define STARTUP_SONG SONG(NO_SOUND) -#endif - -/* - * 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 - -// Leader Key -#define LEADER_TIMEOUT 250 -#define LEADER_PER_KEY_TIMING - -// Tap dance -#define TAPPING_TERM 200 diff --git a/keyboards/planck/keymaps/oeywil/keymap.c b/keyboards/planck/keymaps/oeywil/keymap.c deleted file mode 100644 index 59e76cab12b..00000000000 --- a/keyboards/planck/keymaps/oeywil/keymap.c +++ /dev/null @@ -1,392 +0,0 @@ -#include QMK_KEYBOARD_H -#include "no_keycodes.h" - -#if __has_include("secrets.h") -# include "secrets.h" -#else -# define mail_str "" -# define pwd_str "" -#endif - -// layer definitions -enum planck_layers { - _DEFAULT, - _LOWER, - _RAISE, - _GAME, - _GLOW -}; - -// sounds -#ifdef AUDIO_ENABLE - float gamesong[][2] = SONG(MARIO_MUSHROOM); - float defsong[][2] = SONG(PLOVER_GOODBYE_SOUND); - float failed[][2] = SONG(TERMINAL_SOUND); -#endif - -// leader key -bool leader_succeed; -bool leader_layer_game; -bool leader_layer_def; -LEADER_EXTERNS(); - -void matrix_scan_user(void) { - LEADER_DICTIONARY() { - leader_succeed = leading = false; - leader_layer_game = false; - leader_layer_def = false; - - SEQ_TWO_KEYS(KC_P, KC_P) { - SEND_STRING(pwd_str); - leader_succeed = true; - } - SEQ_TWO_KEYS(KC_P, KC_M) { - SEND_STRING(mail_str); - leader_succeed = true; - } - SEQ_TWO_KEYS(KC_B, KC_B) { - SEND_STRING("build"SS_TAP(X_ENTER)); - leader_succeed = true; - } - SEQ_TWO_KEYS(KC_B, KC_F) { - SEND_STRING("flash"SS_TAP(X_ENTER)); - reset_keyboard(); - leader_succeed = true; - } - SEQ_TWO_KEYS(KC_L, KC_G) { - layer_on(_GAME); - leader_layer_game = true; - } - SEQ_TWO_KEYS(KC_L, KC_D) { - layer_off(_GAME); - leader_layer_def = true; - } - leader_end(); - } -} - -void leader_end(void) { - if (leader_succeed) { - // do nothing - } else if (leader_layer_game) { - #ifdef AUDIO_ENABLE - PLAY_SONG(gamesong); - #endif - } else if (leader_layer_def) { - #ifdef AUDIO_ENABLE - PLAY_SONG(defsong); - #endif - } else { - #ifdef AUDIO_ENABLE - PLAY_SONG(failed); - #endif - } -} - -// tap dance definitions -typedef struct { - bool is_press_action; - int state; -} tap; - -enum { - SINGLE_TAP = 1, - SINGLE_HOLD = 2, - DOUBLE_TAP = 3, - DOUBLE_HOLD = 4, - DOUBLE_SINGLE_TAP = 5, - TRIPLE_TAP = 6, - TRIPLE_HOLD = 7 -}; - -enum { - TD_LSFT = 0, - TD_LCTL, - TD_RSFT, - TD_RCTL -}; - -int cur_dance (qk_tap_dance_state_t *state); -void lsft_finished (qk_tap_dance_state_t *state, void *user_data); -void lsft_reset (qk_tap_dance_state_t *state, void *user_data); -void rsft_finished (qk_tap_dance_state_t *state, void *user_data); -void rsft_reset (qk_tap_dance_state_t *state, void *user_data); -void lctl_finished (qk_tap_dance_state_t *state, void *user_data); -void lctl_reset (qk_tap_dance_state_t *state, void *user_data); -void rctl_finished (qk_tap_dance_state_t *state, void *user_data); -void rctl_reset (qk_tap_dance_state_t *state, void *user_data); - -// layer declarations -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Default - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | Å | BkSp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | Ø | Æ | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | P | , | . | Shift| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Lead | Win | Alt | Lower| Space| Enter| Raise| AltGr| App | Lead | Ctrl | - * `-----------------------------------------------------------------------------------' - */ - [_DEFAULT] = LAYOUT_planck_grid( - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, NO_AA, KC_BSPC, - KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_OE, NO_AE, - TD(TD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_P, KC_COMM, KC_DOT, TD(TD_RSFT), - TD(TD_LCTL), KC_LEAD, KC_LGUI, KC_LALT, MO(_LOWER), KC_SPC, KC_ENT, MO(_RAISE), KC_ALGR, KC_APP, KC_LEAD, TD(TD_RCTL) - ), - /* Lower - * ,-----------------------------------------------------------------------------------. - * | Tab | | PgUp | | | | F7 | F8 | F9 | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | BkSp | Left | Down | Right| PgDn | | | | F4 | F5 | F6 | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Home | | End | | | | | F1 | F2 | F3 | Shift| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | | Win | Alt | Lower| M_PP |M_Next| | | Mute | VolD | VolUp| - * `-----------------------------------------------------------------------------------' - */ - [_LOWER] = LAYOUT_planck_grid( - KC_TRNS, LCTL(KC_LEFT), KC_UP, LCTL(KC_RIGHT), KC_PGUP, KC_NO, KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_DEL, - KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, KC_NO, KC_NO, KC_NO, KC_F4, KC_F5, KC_F6, KC_NO, - KC_TRNS, KC_HOME, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_TRNS, - KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU - ), - /* Raise - * ,-----------------------------------------------------------------------------------. - * | Tab | ! | ? | # | * | | | = | / | 7 | 8 | 9 | Ins | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | BkSp | @ | & | $ | % | ~ | + | \ | 4 | 5 | 6 | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| ' | " | ¨ | | | - | 0 | 1 | 2 | 3 | Shift| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | | Win | Alt | | Space| Enter| Raise| AltGr| | | | - * `-----------------------------------------------------------------------------------' - */ - [_RAISE] = LAYOUT_planck_grid( - KC_TRNS, NO_EXCL, NO_QEST, NO_HASH, NO_ASTE, NO_PIPE, NO_EQUA, NO_FSLS, KC_7, KC_8, KC_9, KC_INS, - KC_BSPC, NO_ALFA, NO_AMPE, NO_USDO, NO_PERC, NO_TILD, NO_PLUS, NO_BSLS, KC_4, KC_5, KC_6, KC_NO, - KC_TRNS, NO_APOS, NO_QUOT, NO_UMLA, KC_NO, KC_NO, NO_DASH, KC_0, KC_1, KC_2, KC_3, KC_TRNS, - KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO - ), - /* Game - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | | BkSp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | P | , | . | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Lead | | Alt | Lower| Space| Enter| Lower| | | Lead | | - * `-----------------------------------------------------------------------------------' - */ - [_GAME] = LAYOUT_planck_grid( - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_NO, KC_BSPC, - KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_NO, KC_NO, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_P, KC_COMM, KC_DOT, KC_NO, - KC_LCTL, KC_LEAD, KC_NO, KC_LALT, MO(_GLOW), KC_SPC, KC_ENT, MO(_GLOW), KC_NO, KC_NO, KC_LEAD, KC_NO - ), - /* Game lower - * ,-----------------------------------------------------------------------------------. - * | Tab | 1 | 2 | 3 | | | | | | | | Steam| - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | 4 | 5 | 6 | | | | | | | | F12 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| 7 | 8 | 9 | 0 | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | | | Alt | | PlyPa| Next | | | Mute | VolD | VolUp| - * `-----------------------------------------------------------------------------------' - */ - [_GLOW] = LAYOUT_planck_grid( - KC_TRNS, KC_1, KC_2, KC_3, KC_PPLS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, LSFT(KC_F7), - KC_TRNS, KC_4, KC_5, KC_6, KC_PMNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F12, - KC_TRNS, KC_7, KC_8, KC_9, KC_0, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MUTE, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_NO, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU - ) -}; - -// tap dance declarations -int cur_dance (qk_tap_dance_state_t *state) { - if (state->count == 1) { - if (state->interrupted || !state->pressed) return SINGLE_TAP; - else return SINGLE_HOLD; - } - else if (state->count == 2) { - if (state->interrupted) return DOUBLE_SINGLE_TAP; - else if (state->pressed) return DOUBLE_HOLD; - else return DOUBLE_TAP; - } - if (state->count == 3) { - if (state->interrupted || !state->pressed) return TRIPLE_TAP; - else return TRIPLE_HOLD; - } - else return 8; -} - -static tap xtap_state = { - .is_press_action = true, - .state = 0 -}; - -void lsft_finished (qk_tap_dance_state_t *state, void *user_data) { - xtap_state.state = cur_dance(state); - switch (xtap_state.state) { - case SINGLE_TAP: - register_code16(LSFT(KC_8)); - break; - case SINGLE_HOLD: - register_code(KC_LSFT); - break; - case DOUBLE_TAP: - register_code(KC_NUBS); - break; - case DOUBLE_SINGLE_TAP: - register_code(KC_NUBS); - break; - } -} - -void lsft_reset (qk_tap_dance_state_t *state, void *user_data) { - switch (xtap_state.state) { - case SINGLE_TAP: - unregister_code16(LSFT(KC_8)); - break; - case SINGLE_HOLD: - unregister_code(KC_LSFT); - break; - case DOUBLE_TAP: - unregister_code(KC_NUBS); - break; - case DOUBLE_SINGLE_TAP: - unregister_code(KC_NUBS); - break; - } - xtap_state.state = 0; -} - -void rsft_finished (qk_tap_dance_state_t *state, void *user_data) { - xtap_state.state = cur_dance(state); - switch (xtap_state.state) { - case SINGLE_TAP: - register_code16(LSFT(KC_9)); - break; - case SINGLE_HOLD: - register_code(KC_RSFT); - break; - case DOUBLE_TAP: - register_code16(LSFT(KC_NUBS)); - break; - case DOUBLE_SINGLE_TAP: - register_code16(LSFT(KC_NUBS)); - break; - } -} - -void rsft_reset (qk_tap_dance_state_t *state, void *user_data) { - switch (xtap_state.state) { - case SINGLE_TAP: - unregister_code16(LSFT(KC_9)); - break; - case SINGLE_HOLD: - unregister_code(KC_RSFT); - break; - case DOUBLE_TAP: - unregister_code16(LSFT(KC_NUBS)); - break; - case DOUBLE_SINGLE_TAP: - unregister_code16(LSFT(KC_NUBS)); - break; - } - xtap_state.state = 0; -} - -void lctl_finished (qk_tap_dance_state_t *state, void *user_data) { - xtap_state.state = cur_dance(state); - switch (xtap_state.state) { - case SINGLE_TAP: - register_mods(MOD_BIT(KC_ALGR)); - register_code(KC_7); - break; - case SINGLE_HOLD: - register_code(KC_LCTL); - break; - case DOUBLE_TAP: - register_mods(MOD_BIT(KC_ALGR)); - register_code(KC_8); - break; - case DOUBLE_SINGLE_TAP: - register_mods(MOD_BIT(KC_ALGR)); - register_code(KC_8); -break; - } -} - -void lctl_reset (qk_tap_dance_state_t *state, void *user_data) { - switch (xtap_state.state) { - case SINGLE_TAP: - unregister_code(KC_7); - unregister_mods(MOD_BIT(KC_ALGR)); - break; - case SINGLE_HOLD: - unregister_code(KC_LCTL); - break; - case DOUBLE_TAP: - unregister_code(KC_8); - unregister_mods(MOD_BIT(KC_ALGR)); - break; - case DOUBLE_SINGLE_TAP: - unregister_code(KC_8); - unregister_mods(MOD_BIT(KC_ALGR)); -break; - } - xtap_state.state = 0; -} - -void rctl_finished (qk_tap_dance_state_t *state, void *user_data) { - xtap_state.state = cur_dance(state); - switch (xtap_state.state) { - case SINGLE_TAP: - register_mods(MOD_BIT(KC_ALGR)); - register_code(KC_0); - break; - case SINGLE_HOLD: - register_code(KC_RCTL); - break; - case DOUBLE_TAP: - register_mods(MOD_BIT(KC_ALGR)); - register_code(KC_9); - break; - case DOUBLE_SINGLE_TAP: - register_mods(MOD_BIT(KC_ALGR)); - register_code(KC_9); - break; - } -} - -void rctl_reset (qk_tap_dance_state_t *state, void *user_data) { - switch (xtap_state.state) { - case SINGLE_TAP: - unregister_code(KC_0); - unregister_mods(MOD_BIT(KC_ALGR)); - break; - case SINGLE_HOLD: - unregister_code(KC_RCTL); - break; - case DOUBLE_TAP: - unregister_code(KC_9); - unregister_mods(MOD_BIT(KC_ALGR)); - break; - case DOUBLE_SINGLE_TAP: - unregister_code(KC_9); - unregister_mods(MOD_BIT(KC_ALGR)); - break; - } - xtap_state.state = 0; -} - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_LSFT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, lsft_finished, lsft_reset), - [TD_RSFT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, rsft_finished, rsft_reset), - [TD_LCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, lctl_finished, lctl_reset), - [TD_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, rctl_finished, rctl_reset), -}; diff --git a/keyboards/planck/keymaps/oeywil/no_keycodes.h b/keyboards/planck/keymaps/oeywil/no_keycodes.h deleted file mode 100644 index c412c35d81b..00000000000 --- a/keyboards/planck/keymaps/oeywil/no_keycodes.h +++ /dev/null @@ -1,28 +0,0 @@ -// øæå -#define NO_OE KC_SCLN -#define NO_AE KC_QUOT -#define NO_AA KC_LBRC -// rename -#define NO_ANBR KC_NUBS -#define NO_APOS KC_BSLS -#define NO_BSLS KC_EQL -#define NO_DASH KC_SLSH -#define NO_PLUS KC_MINS -#define NO_UMLA KC_RBRC -#define NO_PIPE KC_GRV -// shifted -#define NO_EXCL LSFT(KC_1) -#define NO_QUOT LSFT(KC_2) -#define NO_HASH LSFT(KC_3) -#define NO_PERC LSFT(KC_5) -#define NO_AMPE LSFT(KC_6) -#define NO_FSLS LSFT(KC_7) -#define NO_LPAR LSFT(KC_8) -#define NO_RPAR LSFT(KC_9) -#define NO_EQUA LSFT(KC_0) -#define NO_QEST LSFT(KC_MINS) -#define NO_ASTE LSFT(KC_BSLS) -// altgr -#define NO_ALFA ALGR(KC_2) -#define NO_USDO ALGR(KC_4) -#define NO_TILD ALGR(KC_RBRC) diff --git a/keyboards/planck/keymaps/oeywil/readme.md b/keyboards/planck/keymaps/oeywil/readme.md deleted file mode 100644 index 364f9422c71..00000000000 --- a/keyboards/planck/keymaps/oeywil/readme.md +++ /dev/null @@ -1,4 +0,0 @@ -About ------- - -A simple Norwegian grid layout using Leader Key, Tap Dance and audio. diff --git a/keyboards/planck/keymaps/oeywil/rules.mk b/keyboards/planck/keymaps/oeywil/rules.mk deleted file mode 100644 index 23b2611735b..00000000000 --- a/keyboards/planck/keymaps/oeywil/rules.mk +++ /dev/null @@ -1,11 +0,0 @@ -SRC += muse.c - -# Build Options -NKRO_ENABLE = yes -EXTRAKEY_ENABLE = yes -LEADER_ENABLE = yes -TAP_DANCE_ENABLE = yes -AUDIO_ENABLE = yes -COMMAND_ENABLE = no -CONSOLE_ENABLE = no -MOUSEKEY_ENABLE = no diff --git a/keyboards/preonic/keymaps/elisiano/keymap.c b/keyboards/preonic/keymaps/elisiano/keymap.c index 6da803ce629..a4e78d01559 100644 --- a/keyboards/preonic/keymaps/elisiano/keymap.c +++ b/keyboards/preonic/keymaps/elisiano/keymap.c @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT), EMOJI, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), @@ -77,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, CTL_T(KC_ESC), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, - 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT), EMOJI, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), @@ -98,7 +98,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, CTL_T(KC_ESC), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, RSFT_T(KC_ENT), EMOJI, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), diff --git a/keyboards/projectkb/alice/alice.c b/keyboards/projectkb/alice/alice.c index ca0c7da2be2..b82e2050e39 100644 --- a/keyboards/projectkb/alice/alice.c +++ b/keyboards/projectkb/alice/alice.c @@ -1,17 +1,17 @@ #include "alice.h" void matrix_init_board(void){ - setPinOutput(A0); - setPinOutput(A1); - setPinOutput(A2); + setPinOutput(INDICATOR_PIN_0); + setPinOutput(INDICATOR_PIN_1); + setPinOutput(INDICATOR_PIN_2); } bool led_update_kb(led_t led_state) { bool runDefault = led_update_user(led_state); if (runDefault) { - writePin(A0, !led_state.num_lock); - writePin(A1, !led_state.caps_lock); - writePin(A2, !led_state.scroll_lock); + writePin(INDICATOR_PIN_0, !led_state.num_lock); + writePin(INDICATOR_PIN_1, !led_state.caps_lock); + writePin(INDICATOR_PIN_2, !led_state.scroll_lock); } return runDefault; } diff --git a/keyboards/projectkb/alice/readme.md b/keyboards/projectkb/alice/readme.md index 583ddf59203..193343b315c 100644 --- a/keyboards/projectkb/alice/readme.md +++ b/keyboards/projectkb/alice/readme.md @@ -7,7 +7,7 @@ Keyboard Maintainer: onefiftynine Hardware Supported: STM32F072CBT6 Make example for this keyboard (after setting up your build environment): - make projectkb/alice:default + make projectkb/alice/rev2:default If you are flashing this keyboard/pcb for the first time: diff --git a/keyboards/projectkb/alice/config.h b/keyboards/projectkb/alice/rev1/config.h similarity index 96% rename from keyboards/projectkb/alice/config.h rename to keyboards/projectkb/alice/rev1/config.h index 11863b80778..549af292885 100644 --- a/keyboards/projectkb/alice/config.h +++ b/keyboards/projectkb/alice/rev1/config.h @@ -58,6 +58,9 @@ along with this program. If not, see . #define WS2812_SPI SPID2 #define WS2812_SPI_MOSI_PAL_MODE 0 +#define INDICATOR_PIN_0 A0 +#define INDICATOR_PIN_1 A1 +#define INDICATOR_PIN_2 A2 // 2 bits for 4 layout options #define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2 diff --git a/keyboards/projectkb/alice/rev1/rules.mk b/keyboards/projectkb/alice/rev1/rules.mk new file mode 100644 index 00000000000..258444db455 --- /dev/null +++ b/keyboards/projectkb/alice/rev1/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = STM32F072 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +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 +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +WS2812_DRIVER = spi + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/projectkb/alice/rev2/config.h b/keyboards/projectkb/alice/rev2/config.h new file mode 100644 index 00000000000..eb333202638 --- /dev/null +++ b/keyboards/projectkb/alice/rev2/config.h @@ -0,0 +1,85 @@ +/* +Copyright 2015 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x0159 +#define PRODUCT_ID 0xA71C +#define DEVICE_VER 0x0001 +#define MANUFACTURER ProjectKB +#define PRODUCT Alice +#define DESCRIPTION ProjectKB Alice + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +#define MATRIX_COL_PINS { B1, B0, A7, A1, A5, A4, A3, A10, B9, B8, B7, B6, B5, B4, B3, A15 } +#define MATRIX_ROW_PINS { B2, B10, B11, A2, A0 } +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN A6 +#define BACKLIGHT_PWM_DRIVER PWMD3 +#define BACKLIGHT_PWM_CHANNEL 1 +#define BACKLIGHT_PAL_MODE 1 +#define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define RGBLIGHT_ANIMATIONS +#define RGB_DI_PIN B15 +#define RGBLED_NUM 14 +#define WS2812_SPI SPID2 +#define WS2812_SPI_MOSI_PAL_MODE 0 + +#define INDICATOR_PIN_0 A9 +#define INDICATOR_PIN_1 A8 +#define INDICATOR_PIN_2 B12 + + +// 2 bits for 4 layout options +#define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2 + +/* + * 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 diff --git a/keyboards/projectkb/alice/rev2/rules.mk b/keyboards/projectkb/alice/rev2/rules.mk new file mode 100644 index 00000000000..258444db455 --- /dev/null +++ b/keyboards/projectkb/alice/rev2/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = STM32F072 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +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 +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +WS2812_DRIVER = spi + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/projectkb/alice/rules.mk b/keyboards/projectkb/alice/rules.mk index 0f9d71b8905..d6725769928 100644 --- a/keyboards/projectkb/alice/rules.mk +++ b/keyboards/projectkb/alice/rules.mk @@ -1,22 +1 @@ -# MCU name -MCU = STM32F072 - -# Build Options -# comment out to disable the options. -# - -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -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 = no # Custom matrix file -BACKLIGHT_ENABLE = yes -RGBLIGHT_ENABLE = yes -WS2812_DRIVER = spi - - -# Enter lower-power sleep mode when on the ChibiOS idle thread -OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE +DEFAULT_FOLDER = projectkb/alice/rev1 diff --git a/keyboards/reversestudio/decadepad/decadepad.c b/keyboards/reversestudio/decadepad/decadepad.c index b1c3f58cedb..32a66e295cb 100644 --- a/keyboards/reversestudio/decadepad/decadepad.c +++ b/keyboards/reversestudio/decadepad/decadepad.c @@ -1,7 +1,16 @@ #include "decadepad.h" +void matrix_init_kb(void) { + led_init_ports(); + matrix_init_user(); +}; + +void led_init_ports(void) { + setPinOutput(D4); +} + bool led_update_kb(led_t led_state) { if (led_update_user(led_state)){ - writePin(D4, led_state.num_lock); + writePin(D4, !led_state.num_lock); } return true; } \ No newline at end of file diff --git a/keyboards/reviung39/keymaps/toshi0383/keymap.c b/keyboards/reviung39/keymaps/toshi0383/keymap.c index e1783892551..f2586086c20 100644 --- a/keyboards/reviung39/keymaps/toshi0383/keymap.c +++ b/keyboards/reviung39/keymaps/toshi0383/keymap.c @@ -33,25 +33,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_SPC, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_RCTL, KC_DOT, KC_RALT, RGUI(KC_RSFT), LOWER, KC_ENT, RAISE ), - + [_LOWER] = LAYOUT_reviung39( KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, _______, _______, _______, _______, KC_LT, KC_GT, KC_LPRN, KC_RPRN, KC_GRV, KC_MINS, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_PIPE, KC_LALT, _______, _______, _______, KC_EQL, KC_QUES, KC_UNDS, KC_PLUS, KC_COMM, _______, KC_SLSH, _______, _______, _______, KC_RGUI ), - + [_RAISE] = LAYOUT_reviung39( _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, KC_COLN, KC_SCLN, KC_DQT, KC_QUOT, KC_BSLS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, ADJUST, _______, _______, _______, _______, _______, KC_LGUI, _______, _______ ), - + [_ADJUST] = LAYOUT_reviung39( - RGB_VAI, RGB_SAI, RGB_HUI, RGB_MOD, XXXXXXX, RGB_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - RGB_VAD, RGB_SAD, RGB_HUD, RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - _______, XXXXXXX, _______ + RGB_VAI, RGB_SAI, RGB_HUI, RGB_MOD, XXXXXXX, RGB_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, + RGB_VAD, RGB_SAD, RGB_HUD, RGB_RMOD, XXXXXXX, XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, + KC_MUTE, KC_VOLD, KC_VOLU, KC_BRID, KC_BRIU, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LANG1, KC_LANG2, + KC_LGUI, XXXXXXX, _______ ), }; diff --git a/keyboards/rgbkb/zen/rev1/keymaps/333fred/rules.mk b/keyboards/rgbkb/zen/rev1/keymaps/333fred/rules.mk index 1359e81c09f..f858bbe3daa 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/333fred/rules.mk +++ b/keyboards/rgbkb/zen/rev1/keymaps/333fred/rules.mk @@ -1,6 +1,4 @@ RGBLIGHT_ENABLE = yes -NKRO_ENABLE = yes KEY_LOCK_ENABLE = yes -TAP_DANCE_ENABLE = yes CONSOLE_ENABLE = no EXTRAFLAGS += -flto diff --git a/keyboards/silverbullet44/config.h b/keyboards/silverbullet44/config.h index 6872f5fb447..a7402a001bd 100644 --- a/keyboards/silverbullet44/config.h +++ b/keyboards/silverbullet44/config.h @@ -233,10 +233,10 @@ along with this program. If not, see . //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT -#ifndef LINK_TIME_OPTIMIZATION_ENABLE -# define NO_ACTION_MACRO -# define NO_ACTION_FUNCTION -#endif + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION /* * MIDI options diff --git a/keyboards/sirius/uni660/info.json b/keyboards/sirius/uni660/info.json deleted file mode 100644 index 296626d06a2..00000000000 --- a/keyboards/sirius/uni660/info.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "keyboard_name": "Uni660", - "url": "", - "maintainer": "qmk", - "width": 12, - "height": 5.75, - "layouts": { - "LAYOUT": { - "layout": [{"x":0, "y":0.75}, {"x":1, "y":0.25}, {"x":2, "y":0}, {"x":3, "y":0.25}, {"x":4, "y":0.125}, {"x":7, "y":0.125}, {"x":8, "y":0.25}, {"x":9, "y":0}, {"x":10, "y":0.25}, {"x":11, "y":0.75}, {"x":0, "y":1.75}, {"x":1, "y":1.25}, {"x":2, "y":1}, {"x":3, "y":1.25}, {"x":4, "y":1.125}, {"x":7, "y":1.125}, {"x":8, "y":1.25}, {"x":9, "y":1}, {"x":10, "y":1.25}, {"x":11, "y":1.75}, {"x":0, "y":2.75}, {"x":1, "y":2.25}, {"x":2, "y":2}, {"x":3, "y":2.25}, {"x":4, "y":2.125}, {"x":7, "y":2.125}, {"x":8, "y":2.25}, {"x":9, "y":2}, {"x":10, "y":2.25}, {"x":11, "y":2.75}, {"x":1.5, "y":3.75}, {"x":2.5, "y":3.75}, {"x":3.5, "y":3.75}, {"x":4.5, "y":3.75}, {"x":6.5, "y":3.75}, {"x":7.5, "y":3.75}, {"x":8.5, "y":3.75}, {"x":9.5, "y":3.75}, {"x":1.5, "y":4.75}, {"x":2.5, "y":4.75}, {"x":3.5, "y":4.75}, {"x":4.5, "y":4.75}, {"x":6.5, "y":4.75}, {"x":7.5, "y":4.75}, {"x":8.5, "y":4.75}, {"x":9.5, "y":4.75}] - } - } -} diff --git a/keyboards/sirius/uni660/readme.md b/keyboards/sirius/uni660/readme.md index c3d2dbc1b36..4a45c6276f5 100644 --- a/keyboards/sirius/uni660/readme.md +++ b/keyboards/sirius/uni660/readme.md @@ -6,7 +6,11 @@ Join the KeyCommerce [Discord](https://discord.gg/GJ8bdM) Make example: - make sirius/uni660:default +``` +qmk compile -kb sirius/uni660/rev1 -km default +qmk compile -kb sirius/uni660/rev2/ansi -km default +qmk compile -kb sirius/uni660/rev2/iso -km default +``` See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/sirius/uni660/config.h b/keyboards/sirius/uni660/rev1/config.h similarity index 100% rename from keyboards/sirius/uni660/config.h rename to keyboards/sirius/uni660/rev1/config.h diff --git a/keyboards/sirius/uni660/rev1/info.json b/keyboards/sirius/uni660/rev1/info.json new file mode 100644 index 00000000000..aa6b01cdf07 --- /dev/null +++ b/keyboards/sirius/uni660/rev1/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Uni660", + "url": "", + "maintainer": "qmk", + "width": 19, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.5, "y":0}, {"label":"!", "x":2.5, "y":0}, {"label":"@", "x":3.5, "y":0}, {"label":"#", "x":4.5, "y":0}, {"label":"$", "x":5.5, "y":0}, {"label":"%", "x":6.5, "y":0}, {"label":"^", "x":7.5, "y":0}, {"label":"&", "x":9.5, "y":0}, {"label":"*", "x":10.5, "y":0}, {"label":"(", "x":11.5, "y":0}, {"label":")", "x":12.5, "y":0}, {"label":"_", "x":13.5, "y":0}, {"label":"+", "x":14.5, "y":0}, {"label":"Backspace", "x":15.5, "y":0, "w":2}, {"label":"Insert", "x":18, "y":0}, {"label":"F1", "x":0, "y":1}, {"label":"Tab", "x":1.5, "y":1, "w":1.5}, {"label":"Q", "x":3, "y":1}, {"label":"W", "x":4, "y":1}, {"label":"E", "x":5, "y":1}, {"label":"R", "x":6, "y":1}, {"label":"T", "x":7, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15, "y":1}, {"label":"|", "x":16, "y":1, "w":1.5}, {"label":"Delete", "x":18, "y":1}, {"label":"F2", "x":0, "y":2}, {"label":"Caps Lock", "x":1.5, "y":2, "w":1.75}, {"label":"A", "x":3.25, "y":2}, {"label":"S", "x":4.25, "y":2}, {"label":"D", "x":5.25, "y":2}, {"label":"F", "x":6.25, "y":2}, {"label":"G", "x":7.25, "y":2}, {"label":"H", "x":9.25, "y":2}, {"label":"J", "x":10.25, "y":2}, {"label":"K", "x":11.25, "y":2}, {"label":"L", "x":12.25, "y":2}, {"label":":", "x":13.25, "y":2}, {"label":"\"", "x":14.25, "y":2}, {"label":"Enter", "x":15.25, "y":2, "w":2.25}, {"label":"F3", "x":0, "y":3}, {"label":"Shift", "x":1.5, "y":3, "w":2.25}, {"label":"Z", "x":3.75, "y":3}, {"label":"X", "x":4.75, "y":3}, {"label":"C", "x":5.75, "y":3}, {"label":"V", "x":6.75, "y":3}, {"label":"B", "x":7.75, "y":3}, {"label":"N", "x":9.75, "y":3}, {"label":"M", "x":10.75, "y":3}, {"label":"<", "x":11.75, "y":3}, {"label":">", "x":12.75, "y":3}, {"label":"?", "x":13.75, "y":3}, {"label":"Shift", "x":14.75, "y":3, "w":2.25}, {"label":"Up", "x":17, "y":3}, {"label":"F4", "x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Win", "x":2.75, "y":4, "w":1.25}, {"label":"Alt", "x":4, "y":4, "w":1.25}, {"x":5.25, "y":4, "w":2.25}, {"label":"Fn", "x":7.5, "y":4}, {"x":9.5, "y":4, "w":2.75}, {"label":"Alt", "x":12.25, "y":4, "w":1.25}, {"label":"Menu", "x":13.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":14.75, "y":4, "w":1.25}, {"label":"Left", "x":16, "y":4}, {"label":"Down", "x":17, "y":4}, {"label":"Right", "x":18, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/sirius/uni660/keymaps/default/keymap.c b/keyboards/sirius/uni660/rev1/keymaps/default/keymap.c similarity index 100% rename from keyboards/sirius/uni660/keymaps/default/keymap.c rename to keyboards/sirius/uni660/rev1/keymaps/default/keymap.c diff --git a/keyboards/sirius/uni660/keymaps/via/keymap.c b/keyboards/sirius/uni660/rev1/keymaps/via/keymap.c similarity index 100% rename from keyboards/sirius/uni660/keymaps/via/keymap.c rename to keyboards/sirius/uni660/rev1/keymaps/via/keymap.c diff --git a/keyboards/sirius/uni660/rev1/keymaps/via/rules.mk b/keyboards/sirius/uni660/rev1/keymaps/via/rules.mk new file mode 100644 index 00000000000..1e5b99807cb --- /dev/null +++ b/keyboards/sirius/uni660/rev1/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/sirius/uni660/rev1/rev1.h b/keyboards/sirius/uni660/rev1/rev1.h new file mode 100644 index 00000000000..22397b48b18 --- /dev/null +++ b/keyboards/sirius/uni660/rev1/rev1.h @@ -0,0 +1,23 @@ +#pragma once + +#include "uni660.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, k05, k06, k46, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k3f,\ + k10, k11, k12, k13, k14, k15, k16, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k2f,\ + k20, k21, k22, k23, k24, k25, k26, k28, k29, k2a, k2b, k2c, k2d, k2e,\ + k30, k31, k32, k33, k34, k35, k36, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k42, k43, k44, k45, k48, k49, k4a, k4c, k4d, k4e, k4f \ +) \ + { \ + { k00, k01, k02, k03, k04, k05, k06, KC_NO, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f }, \ + { k10, k11, k12, k13, k14, k15, k16, KC_NO, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f }, \ + { k30, k31, k32, k33, k34, k35, k36, KC_NO, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f }, \ + { k40, k41, k42, k43, k44, k45, k46, KC_NO, k48, k49, k4a, KC_NO, k4c, k4d, k4e, k4f } \ + } diff --git a/keyboards/sirius/uni660/rev1/rules.mk b/keyboards/sirius/uni660/rev1/rules.mk new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/sirius/uni660/rev2/ansi/ansi.h b/keyboards/sirius/uni660/rev2/ansi/ansi.h new file mode 100644 index 00000000000..3e21b5c8430 --- /dev/null +++ b/keyboards/sirius/uni660/rev2/ansi/ansi.h @@ -0,0 +1,24 @@ +#pragma once + +#include "uni660.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_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k46, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k3f,\ + k10, k11, k12, k13, k14, k15, k16, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k2f,\ + k20, k21, k22, k23, k24, k25, k26, k28, k29, k2a, k2b, k2c, k2d, k2e,\ + k30, k31, k32, k33, k34, k35, k36, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k42, k43, k44, k45, k48, k49, k4a, k4c, k4d, k4e, k4f \ +) \ + { \ + { k00, k01, k02, k03, k04, k05, k06, KC_NO, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f }, \ + { k10, k11, k12, k13, k14, k15, k16, KC_NO, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f }, \ + { k30, k31, k32, k33, k34, k35, k36, KC_NO, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f }, \ + { k40, k41, k42, k43, k44, k45, k46, KC_NO, k48, k49, k4a, KC_NO, k4c, k4d, k4e, k4f } \ + } diff --git a/keyboards/sirius/uni660/rev2/ansi/config.h b/keyboards/sirius/uni660/rev2/ansi/config.h new file mode 100644 index 00000000000..0032f61ccdc --- /dev/null +++ b/keyboards/sirius/uni660/rev2/ansi/config.h @@ -0,0 +1,78 @@ +/* +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ + +#define VENDOR_ID 0x5352 // "SR" +#define PRODUCT_ID 0x0202 // Second Product Second Version +#define DEVICE_VER 0x2004 // 2020.12 +#define MANUFACTURER SiRius +#define PRODUCT SiRius Uni660 V2 +#define DESCRIPTION SiRius Uni660 V2 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +//#define BACKLIGHT_LEVELS 3 + +#define ONESHOT_TIMEOUT 500 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +//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) + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 diff --git a/keyboards/sirius/uni660/rev2/ansi/info.json b/keyboards/sirius/uni660/rev2/ansi/info.json new file mode 100644 index 00000000000..08d21d07755 --- /dev/null +++ b/keyboards/sirius/uni660/rev2/ansi/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Uni660", + "url": "", + "maintainer": "qmk", + "width": 19, + "height": 5, + "layouts": { + "LAYOUT_ansi": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.5, "y":0}, {"label":"!", "x":2.5, "y":0}, {"label":"@", "x":3.5, "y":0}, {"label":"#", "x":4.5, "y":0}, {"label":"$", "x":5.5, "y":0}, {"label":"%", "x":6.5, "y":0}, {"label":"^", "x":7.5, "y":0}, {"label":"&", "x":9.5, "y":0}, {"label":"*", "x":10.5, "y":0}, {"label":"(", "x":11.5, "y":0}, {"label":")", "x":12.5, "y":0}, {"label":"_", "x":13.5, "y":0}, {"label":"+", "x":14.5, "y":0}, {"label":"Backspace", "x":15.5, "y":0, "w":2}, {"label":"Insert", "x":18, "y":0}, {"label":"F1", "x":0, "y":1}, {"label":"Tab", "x":1.5, "y":1, "w":1.5}, {"label":"Q", "x":3, "y":1}, {"label":"W", "x":4, "y":1}, {"label":"E", "x":5, "y":1}, {"label":"R", "x":6, "y":1}, {"label":"T", "x":7, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15, "y":1}, {"label":"|", "x":16, "y":1, "w":1.5}, {"label":"Delete", "x":18, "y":1}, {"label":"F2", "x":0, "y":2}, {"label":"Caps Lock", "x":1.5, "y":2, "w":1.75}, {"label":"A", "x":3.25, "y":2}, {"label":"S", "x":4.25, "y":2}, {"label":"D", "x":5.25, "y":2}, {"label":"F", "x":6.25, "y":2}, {"label":"G", "x":7.25, "y":2}, {"label":"H", "x":9.25, "y":2}, {"label":"J", "x":10.25, "y":2}, {"label":"K", "x":11.25, "y":2}, {"label":"L", "x":12.25, "y":2}, {"label":":", "x":13.25, "y":2}, {"label":"\"", "x":14.25, "y":2}, {"label":"Enter", "x":15.25, "y":2, "w":2.25}, {"label":"F3", "x":0, "y":3}, {"label":"Shift", "x":1.5, "y":3, "w":2.25}, {"label":"Z", "x":3.75, "y":3}, {"label":"X", "x":4.75, "y":3}, {"label":"C", "x":5.75, "y":3}, {"label":"V", "x":6.75, "y":3}, {"label":"B", "x":7.75, "y":3}, {"label":"N", "x":9.75, "y":3}, {"label":"M", "x":10.75, "y":3}, {"label":"<", "x":11.75, "y":3}, {"label":">", "x":12.75, "y":3}, {"label":"?", "x":13.75, "y":3}, {"label":"Shift", "x":14.75, "y":3, "w":2.25}, {"label":"Up", "x":17, "y":3}, {"label":"F4", "x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Win", "x":2.75, "y":4, "w":1.25}, {"label":"Alt", "x":4, "y":4, "w":1.25}, {"x":5.25, "y":4, "w":2.25}, {"label":"Fn", "x":7.5, "y":4}, {"x":9.5, "y":4, "w":2.75}, {"label":"Alt", "x":12.25, "y":4, "w":1.25}, {"label":"Menu", "x":13.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":14.75, "y":4, "w":1.25}, {"label":"Left", "x":16, "y":4}, {"label":"Down", "x":17, "y":4}, {"label":"Right", "x":18, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/sirius/uni660/rev2/ansi/keymaps/default/keymap.c b/keyboards/sirius/uni660/rev2/ansi/keymaps/default/keymap.c new file mode 100644 index 00000000000..ff45e7f2b74 --- /dev/null +++ b/keyboards/sirius/uni660/rev2/ansi/keymaps/default/keymap.c @@ -0,0 +1,11 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_ansi( /* Base */ +KC_ESC, 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_INS, +KC_F1, KC_TAB, KC_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_F2, 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_F3, 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_F4, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_DEL, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT +), +}; diff --git a/keyboards/sirius/uni660/rev2/ansi/keymaps/via/keymap.c b/keyboards/sirius/uni660/rev2/ansi/keymaps/via/keymap.c new file mode 100644 index 00000000000..26ec43d4783 --- /dev/null +++ b/keyboards/sirius/uni660/rev2/ansi/keymaps/via/keymap.c @@ -0,0 +1,35 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_ansi( /* Base */ +KC_ESC, 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_INS, +KC_F1, KC_TAB, KC_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_F2, 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_F3, 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_F4, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_DEL, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT +), + +[1] = LAYOUT_ansi( /* Layer 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RGUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +[2] = LAYOUT_ansi( /* Layer 2 */ +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RGUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +[3] = LAYOUT_ansi( /* Layer 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RGUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), +}; diff --git a/keyboards/sirius/uni660/rev2/ansi/keymaps/via/rules.mk b/keyboards/sirius/uni660/rev2/ansi/keymaps/via/rules.mk new file mode 100644 index 00000000000..1e5b99807cb --- /dev/null +++ b/keyboards/sirius/uni660/rev2/ansi/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/sirius/uni660/rev2/ansi/rules.mk b/keyboards/sirius/uni660/rev2/ansi/rules.mk new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/sirius/uni660/rev2/iso/config.h b/keyboards/sirius/uni660/rev2/iso/config.h new file mode 100644 index 00000000000..e31f8fb8eba --- /dev/null +++ b/keyboards/sirius/uni660/rev2/iso/config.h @@ -0,0 +1,78 @@ +/* +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ + +#define VENDOR_ID 0x5352 // "SR" +#define PRODUCT_ID 0x0203 // Second Product Third Version +#define DEVICE_VER 0x2004 // 2020.12 +#define MANUFACTURER SiRius +#define PRODUCT SiRius Uni660 V2 +#define DESCRIPTION SiRius Uni660 V2 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +//#define BACKLIGHT_LEVELS 3 + +#define ONESHOT_TIMEOUT 500 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +//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) + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 diff --git a/keyboards/sirius/uni660/rev2/iso/info.json b/keyboards/sirius/uni660/rev2/iso/info.json new file mode 100644 index 00000000000..cd32c736905 --- /dev/null +++ b/keyboards/sirius/uni660/rev2/iso/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Uni660", + "url": "", + "maintainer": "qmk", + "width": 19, + "height": 5, + "layouts": { + "LAYOUT_iso": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"\u00ac", "x":1.5, "y":0}, {"label":"!", "x":2.5, "y":0}, {"label":"\"", "x":3.5, "y":0}, {"label":"\u00a3", "x":4.5, "y":0}, {"label":"$", "x":5.5, "y":0}, {"label":"%", "x":6.5, "y":0}, {"label":"^", "x":7.5, "y":0}, {"label":"&", "x":9.5, "y":0}, {"label":"*", "x":10.5, "y":0}, {"label":"(", "x":11.5, "y":0}, {"label":")", "x":12.5, "y":0}, {"label":"_", "x":13.5, "y":0}, {"label":"+", "x":14.5, "y":0}, {"label":"Backspace", "x":15.5, "y":0, "w":2}, {"label":"Insert", "x":18, "y":0}, {"label":"F1", "x":0, "y":1}, {"label":"Tab", "x":1.5, "y":1, "w":1.5}, {"label":"Q", "x":3, "y":1}, {"label":"W", "x":4, "y":1}, {"label":"E", "x":5, "y":1}, {"label":"R", "x":6, "y":1}, {"label":"T", "x":7, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15, "y":1}, {"label":"Enter", "x":16.25, "y":1, "w":1.25, "h":2}, {"label":"Delete", "x":18, "y":1}, {"label":"F2", "x":0, "y":2}, {"label":"Caps Lock", "x":1.5, "y":2, "w":1.75}, {"label":"A", "x":3.25, "y":2}, {"label":"S", "x":4.25, "y":2}, {"label":"D", "x":5.25, "y":2}, {"label":"F", "x":6.25, "y":2}, {"label":"G", "x":7.25, "y":2}, {"label":"H", "x":9.25, "y":2}, {"label":"J", "x":10.25, "y":2}, {"label":"K", "x":11.25, "y":2}, {"label":"L", "x":12.25, "y":2}, {"label":":", "x":13.25, "y":2}, {"label":"@", "x":14.25, "y":2}, {"label":"~", "x":15.25, "y":2}, {"label":"F3", "x":0, "y":3}, {"label":"Shift", "x":1.5, "y":3, "w":1.25}, {"label":"|", "x":2.75, "y":3}, {"label":"Z", "x":3.75, "y":3}, {"label":"X", "x":4.75, "y":3}, {"label":"C", "x":5.75, "y":3}, {"label":"V", "x":6.75, "y":3}, {"label":"B", "x":7.75, "y":3}, {"label":"N", "x":9.75, "y":3}, {"label":"M", "x":10.75, "y":3}, {"label":"<", "x":11.75, "y":3}, {"label":">", "x":12.75, "y":3}, {"label":"?", "x":13.75, "y":3}, {"label":"Shift", "x":14.75, "y":3, "w":2.25}, {"label":"Up", "x":17, "y":3}, {"label":"F4", "x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Win", "x":2.75, "y":4, "w":1.25}, {"label":"Alt", "x":4, "y":4, "w":1.25}, {"x":5.25, "y":4, "w":2.25}, {"label":"Fn", "x":7.5, "y":4}, {"x":9.5, "y":4, "w":2.75}, {"label":"Alt", "x":12.25, "y":4, "w":1.25}, {"label":"Menu", "x":13.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":14.75, "y":4, "w":1.25}, {"label":"Left", "x":16, "y":4}, {"label":"Down", "x":17, "y":4}, {"label":"Right", "x":18, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/sirius/uni660/rev2/iso/iso.h b/keyboards/sirius/uni660/rev2/iso/iso.h new file mode 100644 index 00000000000..b38bdfc9323 --- /dev/null +++ b/keyboards/sirius/uni660/rev2/iso/iso.h @@ -0,0 +1,24 @@ +#pragma once + +#include "uni660.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_iso( \ + k00, k01, k02, k03, k04, k05, k06, k46, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k3f,\ + k10, k11, k12, k13, k14, k15, k16, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k2f,\ + k20, k21, k22, k23, k24, k25, k26, k28, k29, k2a, k2b, k2c, k2d, k2e,\ + k30, k31, k37, k32, k33, k34, k35, k36, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k42, k43, k44, k45, k48, k49, k4a, k4c, k4d, k4e, k4f \ +) \ + { \ + { k00, k01, k02, k03, k04, k05, k06, KC_NO, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f }, \ + { k10, k11, k12, k13, k14, k15, k16, KC_NO, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f }, \ + { k40, k41, k42, k43, k44, k45, k46, KC_NO, k48, k49, k4a, KC_NO, k4c, k4d, k4e, k4f } \ + } diff --git a/keyboards/sirius/uni660/rev2/iso/keymaps/default/keymap.c b/keyboards/sirius/uni660/rev2/iso/keymaps/default/keymap.c new file mode 100644 index 00000000000..de8630eaa63 --- /dev/null +++ b/keyboards/sirius/uni660/rev2/iso/keymaps/default/keymap.c @@ -0,0 +1,11 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_iso( /* Base */ +KC_ESC, 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_INS, +KC_F1, KC_TAB, KC_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_F2, 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_F3, 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_F4, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_DEL, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT +), +}; diff --git a/keyboards/sirius/uni660/rev2/iso/keymaps/via/keymap.c b/keyboards/sirius/uni660/rev2/iso/keymaps/via/keymap.c new file mode 100644 index 00000000000..ac1d7c6d59c --- /dev/null +++ b/keyboards/sirius/uni660/rev2/iso/keymaps/via/keymap.c @@ -0,0 +1,35 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_iso( /* Base */ +KC_ESC, 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_INS, +KC_F1, KC_TAB, KC_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_F2, 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_F3, 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_F4, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_DEL, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT +), + +[1] = LAYOUT_iso( /* Layer 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RGUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +[2] = LAYOUT_iso( /* Layer 2 */ +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RGUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +[3] = LAYOUT_iso( /* Layer 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RGUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), +}; diff --git a/keyboards/sirius/uni660/rev2/iso/keymaps/via/rules.mk b/keyboards/sirius/uni660/rev2/iso/keymaps/via/rules.mk new file mode 100644 index 00000000000..1e5b99807cb --- /dev/null +++ b/keyboards/sirius/uni660/rev2/iso/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/sirius/uni660/rev2/iso/rules.mk b/keyboards/sirius/uni660/rev2/iso/rules.mk new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/sirius/uni660/rules.mk b/keyboards/sirius/uni660/rules.mk index 920d8a83dda..243916fa768 100644 --- a/keyboards/sirius/uni660/rules.mk +++ b/keyboards/sirius/uni660/rules.mk @@ -30,3 +30,4 @@ UNICODE_ENABLE = yes # Unicode # project specific files SRC += matrix.c + diff --git a/keyboards/sirius/uni660/uni660.h b/keyboards/sirius/uni660/uni660.h index 81743adbd81..75813db7bd9 100644 --- a/keyboards/sirius/uni660/uni660.h +++ b/keyboards/sirius/uni660/uni660.h @@ -2,6 +2,14 @@ #include "quantum.h" +#ifdef KEYBOARD_sirius_uni660_rev1 + #include "rev1.h" +#elif KEYBOARD_sirius_uni660_rev2_iso + #include "iso.h" +#elif KEYBOARD_sirius_uni660_rev2_ansi + #include "ansi.h" +#endif + #define red_led_off writePinHigh(F5) #define red_led_on writePinLow(F5) #define blu_led_off writePinHigh(F4) @@ -41,21 +49,3 @@ #define set_led_cyan PORTF = PORTF & ~(1<. //#define NO_ACTION_ONESHOT /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 diff --git a/keyboards/tgr/jane/config.h b/keyboards/tgr/jane/config.h index 5fb9a90560a..ed8b39c38a3 100644 --- a/keyboards/tgr/jane/config.h +++ b/keyboards/tgr/jane/config.h @@ -19,8 +19,8 @@ along with this program. If not, see . #include "config_common.h" -#define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422D +#define VENDOR_ID 0x5447 // TG +#define PRODUCT_ID 0x4A4E // JN #define DEVICE_VER 0x0200 #define MANUFACTURER TGR #define PRODUCT Jane diff --git a/keyboards/tgr/jane/info.json b/keyboards/tgr/jane/info.json index 6fab4db1ed6..000fda24f97 100644 --- a/keyboards/tgr/jane/info.json +++ b/keyboards/tgr/jane/info.json @@ -13,8 +13,16 @@ "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5, "w":2.25}, {"x":0, "y":4.5, "w":2.25}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5, "w":1.25}, {"x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"x":10, "y":5.5, "w":1.25}, {"x":11.25, "y":5.5, "w":1.25}, {"x":12.5, "y":5.5, "w":1.25}, {"x":13.75, "y":5.5, "w":1.25}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] }, + "LAYOUT_tkl_ansi_tsangan": { + "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25, "w":2}, {"x":15.25, "y":1.25}, {"x":16.25, "y":1.25}, {"x":17.25, "y":1.25}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":13.5, "y":2.25, "w":1.5}, {"x":15.25, "y":2.25}, {"x":16.25, "y":2.25}, {"x":17.25, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25, "w":2.25}, {"x":0, "y":4.25, "w":2.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14, "y":4.25}, {"x":16.25, "y":4.25}, {"x":0, "y":5.25, "w":1.5}, {"x":1.5, "y":5.25}, {"x":2.5, "y":5.25, "w":1.5}, {"x":4, "y":5.25, "w":7}, {"x":11, "y":5.25, "w":1.5}, {"x":12.5, "y":5.25}, {"x":13.5, "y":5.25, "w":1.5}, {"x":15.25, "y":5.25}, {"x":16.25, "y":5.25}, {"x":17.25, "y":5.25}] + }, + "LAYOUT_tkl_iso": { "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5}, {"x":13.75, "y":2.5, "w":1.25, "h":2}, {"x":0, "y":4.5, "w":1.25}, {"x":1.25, "y":4.5}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5, "w":1.25}, {"x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"x":10, "y":5.5, "w":1.25}, {"x":11.25, "y":5.5, "w":1.25}, {"x":12.5, "y":5.5, "w":1.25}, {"x":13.75, "y":5.5, "w":1.25}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] + }, + + "LAYOUT_tkl_iso_tsangan": { + "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25, "w":2}, {"x":15.25, "y":1.25}, {"x":16.25, "y":1.25}, {"x":17.25, "y":1.25}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":13.75, "y":2.25, "w":1.25, "h":2}, {"x":15.25, "y":2.25}, {"x":16.25, "y":2.25}, {"x":17.25, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25}, {"x":0, "y":4.25, "w":1.25}, {"x":1.25, "y":4.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14, "y":4.25}, {"x":16.25, "y":4.25}, {"x":0, "y":5.25, "w":1.5}, {"x":1.5, "y":5.25}, {"x":2.5, "y":5.25, "w":1.5}, {"x":4, "y":5.25, "w":7}, {"x":11, "y":5.25, "w":1.5}, {"x":12.5, "y":5.25}, {"x":13.5, "y":5.25, "w":1.5}, {"x":15.25, "y":5.25}, {"x":16.25, "y":5.25}, {"x":17.25, "y":5.25}] } } } diff --git a/keyboards/tgr/jane/jane.h b/keyboards/tgr/jane/jane.h index 2008d49d9a2..9691ea589ff 100644 --- a/keyboards/tgr/jane/jane.h +++ b/keyboards/tgr/jane/jane.h @@ -58,6 +58,24 @@ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k7C, k7D, k7E }, \ } +#define LAYOUT_tkl_ansi_tsangan( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k6B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k6C, k6D, k6E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k7C, k7D, k7E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k2E, \ + k50, k51, k52, k55, k58, k59, k5A, k5E, k3E, 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, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, KC_NO, k3D, k3E }, \ + { k40, KC_NO, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E }, \ + { k50, k51, k52, KC_NO, KC_NO, k55, KC_NO, KC_NO, k58, k59, k5A, KC_NO, KC_NO, KC_NO, k5E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k6B, k6C, k6D, k6E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k7C, k7D, k7E }, \ +} + #define LAYOUT_tkl_iso( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k6B, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k6C, k6D, k6E, \ @@ -75,3 +93,21 @@ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k6B, k6C, k6D, k6E }, \ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k7C, k7D, k7E }, \ } + +#define LAYOUT_tkl_iso_tsangan( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k6B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k6C, k6D, k6E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k7C, k7D, k7E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k2E, \ + k50, k51, k52, k55, k58, k59, k5A, k5E, k3E, 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, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, KC_NO, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E }, \ + { k50, k51, k52, KC_NO, KC_NO, k55, KC_NO, KC_NO, k58, k59, k5A, KC_NO, KC_NO, KC_NO, k5E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k6B, k6C, k6D, k6E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k7C, k7D, k7E }, \ +} diff --git a/keyboards/tgr/jane/keymaps/via/config.h b/keyboards/tgr/jane/keymaps/via/config.h new file mode 100644 index 00000000000..0865e452088 --- /dev/null +++ b/keyboards/tgr/jane/keymaps/via/config.h @@ -0,0 +1 @@ +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/tgr/jane/keymaps/via/keymap.c b/keyboards/tgr/jane/keymaps/via/keymap.c new file mode 100644 index 00000000000..521a78f604a --- /dev/null +++ b/keyboards/tgr/jane/keymaps/via/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2020 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_tkl_ansi( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_INS ,KC_HOME,KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL ,KC_END ,KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT), + +[1] = LAYOUT_tkl_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS), + +[2] = LAYOUT_tkl_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/tgr/jane/keymaps/via/rules.mk b/keyboards/tgr/jane/keymaps/via/rules.mk new file mode 100644 index 00000000000..97010a994b6 --- /dev/null +++ b/keyboards/tgr/jane/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes + +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = no diff --git a/keyboards/thevankeyboards/minivan/config.h b/keyboards/thevankeyboards/minivan/config.h index 7bc8192ed3a..9b3fc8e1aa7 100644 --- a/keyboards/thevankeyboards/minivan/config.h +++ b/keyboards/thevankeyboards/minivan/config.h @@ -15,8 +15,7 @@ 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 +#pragma once #include "config_common.h" @@ -70,5 +69,3 @@ along with this program. If not, see . #define RGB_DI_PIN D0 #define RGBLED_NUM 3 #define RGBLIGHT_SLEEP - -#endif diff --git a/keyboards/thevankeyboards/minivan/keymaps/via/keymap.json b/keyboards/thevankeyboards/minivan/keymaps/via/keymap.json new file mode 100644 index 00000000000..1e9ef881030 --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/via/keymap.json @@ -0,0 +1,11 @@ +{ + "keyboard": "thevankeyboards/minivan", + "keymap": "via", + "layout": "LAYOUT", + "layers": [ + ["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_NO", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_NO", "KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_NO", "KC_LCTL", "KC_NO", "KC_LGUI", "KC_ENT", "KC_SPC", "KC_RALT", "KC_ESC", "KC_NO"], + ["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"], + ["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"], + ["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "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/thevankeyboards/minivan/keymaps/via/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/via/rules.mk new file mode 100644 index 00000000000..f2e549c7b75 --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/via/rules.mk @@ -0,0 +1,10 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes +# These features are not (yet) supported by VIA +LEADER_ENABLE = no +FAUXCLICKY_ENABLE = no +MIDI_ENABLE = no +BLUETOOTH_ENABLE = no +KEY_LOCK_ENABLE = no +TERMINAL_ENABLE = no +MOUSEKEY_ENABLE = no diff --git a/keyboards/thevankeyboards/minivan/minivan.h b/keyboards/thevankeyboards/minivan/minivan.h index eb9aa679384..dfd971aea3c 100644 --- a/keyboards/thevankeyboards/minivan/minivan.h +++ b/keyboards/thevankeyboards/minivan/minivan.h @@ -1,5 +1,4 @@ -#ifndef MINIVAN_H -#define MINIVAN_H +#pragma once #include "quantum.h" @@ -63,5 +62,3 @@ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ { K30, K31, K32, K33, K34, KC_NO, KC_NO, K37, K38, K39, K3A, K3B } \ } - -#endif diff --git a/keyboards/treadstone48/rev1/config.h b/keyboards/treadstone48/rev1/config.h index 56ffbaef016..3ea285836c1 100644 --- a/keyboards/treadstone48/rev1/config.h +++ b/keyboards/treadstone48/rev1/config.h @@ -198,10 +198,9 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + /* * MIDI options */ diff --git a/keyboards/unikorn/config.h b/keyboards/unikorn/config.h index c5c9b046633..c68a857d5e9 100644 --- a/keyboards/unikorn/config.h +++ b/keyboards/unikorn/config.h @@ -19,8 +19,8 @@ along with this program. If not, see . #include "config_common.h" -#define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422D +#define VENDOR_ID 0x5354 // Singa x TGR (ST) +#define PRODUCT_ID 0x556B // UK #define DEVICE_VER 0x0200 #define MANUFACTURER Singa x TGR #define PRODUCT Unikorn60 diff --git a/keyboards/unikorn/keymaps/via/keymap.c b/keyboards/unikorn/keymaps/via/keymap.c new file mode 100644 index 00000000000..99310e861b7 --- /dev/null +++ b/keyboards/unikorn/keymaps/via/keymap.c @@ -0,0 +1,53 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_60_ansi( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL + ), + + [1] = LAYOUT_60_ansi( + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + 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, KC_TRNS, KC_TRNS + ), + + [2] = LAYOUT_60_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT_60_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + +}; diff --git a/keyboards/unikorn/keymaps/via/rules.mk b/keyboards/unikorn/keymaps/via/rules.mk new file mode 100644 index 00000000000..7b439d08c66 --- /dev/null +++ b/keyboards/unikorn/keymaps/via/rules.mk @@ -0,0 +1,7 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes + +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = no +RGBLIGHT_ENABLE = yes + diff --git a/keyboards/vitamins_included/keymaps/default/keymap.c b/keyboards/vitamins_included/keymaps/default/keymap.c index 52780d64686..d6db6ffe612 100644 --- a/keyboards/vitamins_included/keymaps/default/keymap.c +++ b/keyboards/vitamins_included/keymaps/default/keymap.c @@ -1,16 +1,18 @@ #include QMK_KEYBOARD_H +#define TG_NKRO MAGIC_TOGGLE_NKRO -// 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 + +// Layer names + +enum layer_names { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; enum custom_keycodes { QWERTY = SAFE_RANGE, @@ -38,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ - KC_LCTRL,KC_LGUI, KC_LALT, ADJUST, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + KC_LCTRL,KC_LGUI, KC_LALT, ADJUST, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), /* Colemak @@ -85,14 +87,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * |RESET | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | + * |TGNKRO| | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ [_LOWER] = LAYOUT_ortho_4x12( \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ - RESET, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + RESET, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______,_______,_______, \ + TG_NKRO, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), /* Raise @@ -101,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |RESET | + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | |TGNKRO|RESET | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' @@ -109,26 +111,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_RAISE] = LAYOUT_ortho_4x12( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, RESET, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, TG_NKRO, RESET, \ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. - * | | RESET| | | | | | | | | RESET| Del | + * | |Qwerty|Colemk|Dvorak| | | | | | | | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * | | | | | | | |Qwerty|Colemk|Dvorak| | | * |------+------+------+------+------+------|------+------+------+------+------+------| * | | | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | |RGBMOD| + * | | | | | |Audoff Audon | | | | |RGBMOD| * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_ortho_4x12( \ - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, RESET, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, QWERTY, COLEMAK, DVORAK, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD \ + _______, _______, _______, _______, _______, AU_OFF, AU_ON, _______, _______, _______, _______, RGB_MOD \ ) diff --git a/keyboards/vitamins_included/rev2/config.h b/keyboards/vitamins_included/rev2/config.h index d0f9e64003e..e3d30519880 100644 --- a/keyboards/vitamins_included/rev2/config.h +++ b/keyboards/vitamins_included/rev2/config.h @@ -56,8 +56,9 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN F0 -#define RGBLED_NUM 12 // Number of LEDs +#define RGBLED_NUM 12 #define RGBLIGHT_ANIMATIONS +#define RGBLED_SPLIT { 6, 6 } /* Audio settings */ #ifdef AUDIO_ENABLE diff --git a/keyboards/vitamins_included/rules.mk b/keyboards/vitamins_included/rules.mk index 0d615b41f07..3eb3a1c306a 100644 --- a/keyboards/vitamins_included/rules.mk +++ b/keyboards/vitamins_included/rules.mk @@ -15,7 +15,7 @@ DEBUG_ENABLE = no # Enable more debug info EXTRAKEY_ENABLE = yes # Audio control and System control MIDI_ENABLE = no # MIDI controls MOUSEKEY_ENABLE = no # Mouse keys -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. UNICODE_ENABLE = no # Unicode # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/wallaby/config.h b/keyboards/wallaby/config.h index 0f142f18f2c..11fa674a834 100644 --- a/keyboards/wallaby/config.h +++ b/keyboards/wallaby/config.h @@ -192,10 +192,9 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + /* * MIDI options */ diff --git a/keyboards/walletburner/neuron/info.json b/keyboards/walletburner/neuron/info.json index 4ea4bcb941e..9c0b4e2ef25 100644 --- a/keyboards/walletburner/neuron/info.json +++ b/keyboards/walletburner/neuron/info.json @@ -6,7 +6,7 @@ "height": 4, "layouts": { "LAYOUT": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O\u2191", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"Back
Space", "x":11, "y":0}, {"label":"Ctrl", "x":0, "y":1, "w":1.25}, {"label":"A", "x":1.25, "y":1}, {"label":"S", "x":2.25, "y":1}, {"label":"D", "x":3.25, "y":1}, {"label":"F", "x":4.25, "y":1}, {"label":"G", "x":5.25, "y":1}, {"label":"H", "x":6.25, "y":1}, {"label":"J", "x":7.25, "y":1}, {"label":"K\u2190", "x":8.25, "y":1}, {"label":"L\u2192", "x":9.25, "y":1}, {"label":"Enter", "x":10.25, "y":1, "w":1.75}, {"label":"Shift", "x":0, "y":2, "w":1.75}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"label":"N", "x":6.75, "y":2}, {"label":"M", "x":7.75, "y":2}, {"label":"<\u2193,", "x":8.75, "y":2}, {"label":">.", "x":9.75, "y":2}, {"label":"Fn", "x":10.75, "y":2, "w":1.25}, {"label":"Super", "x":1, "y":3}, {"label":"Meta", "x":2, "y":3, "w":1.5}, {"x":3.5, "y":3, "w":2.25}, {"x":5.75, "y":3, "w":2.75}, {"label":"Meta", "x":8.5, "y":3, "w":1.5}, {"label":"Alt Gr", "x":10, "y":3}] + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"Back
Space", "x":11, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.25}, {"label":"A", "x":1.25, "y":1}, {"label":"S", "x":2.25, "y":1}, {"label":"D", "x":3.25, "y":1}, {"label":"F", "x":4.25, "y":1}, {"label":"G", "x":5.25, "y":1}, {"label":"H", "x":6.25, "y":1}, {"label":"J", "x":7.25, "y":1}, {"label":"K", "x":8.25, "y":1}, {"label":"L", "x":9.25, "y":1}, {"label":"Enter", "x":10.25, "y":1, "w":1.75}, {"label":"Shift", "x":0, "y":2, "w":1.75}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"label":"N", "x":6.75, "y":2}, {"label":"M", "x":7.75, "y":2}, {"label":"<", "x":8.75, "y":2}, {"label":"Shift", "x":9.75, "y":2, "w":1.25}, {"label":"Fn", "x":11, "y":2}, {"label":"Hyper", "x":1, "y":3, "w":1.25}, {"label":"Super", "x":2.25, "y":3, "w":1.25}, {"x":3.5, "y":3, "w":1.75}, {"x":5.25, "y":3}, {"x":6.25, "y":3, "w":2.25}, {"label":"Meta", "x":8.5, "y":3, "w":1.25}, {"label":"Super", "x":9.75, "y":3, "w":1.25}] } } -} \ No newline at end of file +} diff --git a/keyboards/wete/keymaps/via/config.h b/keyboards/wete/keymaps/via/config.h new file mode 100644 index 00000000000..4dadf6a1695 --- /dev/null +++ b/keyboards/wete/keymaps/via/config.h @@ -0,0 +1 @@ +#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 2047 diff --git a/keyboards/wete/keymaps/via/keymap.c b/keyboards/wete/keymaps/via/keymap.c new file mode 100644 index 00000000000..0f1a0bedb1c --- /dev/null +++ b/keyboards/wete/keymaps/via/keymap.c @@ -0,0 +1,53 @@ +/* +Copyright 2012,2013 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ansi_rhnp( + KC_INSERT, KC_PSCREEN, KC_PAUSE, KC_SLCK, 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_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, KC_TAB, KC_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, + KC_KP_4, KC_KP_5, KC_KP_6, 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_ENTER, KC_PGUP, + KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, 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_KP_0, KC_KP_DOT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + ), + [1] = LAYOUT_ansi_rhnp( + KC_NO, KC_NO, KC_NO, KC_NO, BL_TOGG, 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, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, BL_INC, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, BL_OFF, BL_DEC, BL_ON + ), + [2] = LAYOUT_ansi_rhnp( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO + ), + [3] = LAYOUT_ansi_rhnp( + KC_NO, KC_NO, KC_NO, KC_NO, BL_TOGG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO + ) +}; diff --git a/keyboards/wete/keymaps/via/rules.mk b/keyboards/wete/keymaps/via/rules.mk new file mode 100644 index 00000000000..ee1e4ceeb4b --- /dev/null +++ b/keyboards/wete/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +BOOTMAGIC_ENABLE = lite diff --git a/keyboards/wete/wete.h b/keyboards/wete/wete.h index e9f44e185dd..46daf6d6f1f 100644 --- a/keyboards/wete/wete.h +++ b/keyboards/wete/wete.h @@ -16,14 +16,14 @@ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2i, k2j, \ k30, k31, k32, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3i, k3j, \ k40, k41, k42, k43, k44, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, k4h, k4i, k4j, \ - k50, k52, k54, k55, k56, k5a, k5d, k5e, k5h, k5i, k5j \ + k50, k52, k54, k55, k56, k5a, k5d, k5f, k5h, k5i, k5j \ ) { \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, XXX, k0a, k0b, k0c, k0d, XXX, k0f, k0g, k0h, k0i, k0j }, \ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, XXX, k1j }, \ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, XXX, k2i, k2j }, \ { k30, k31, k32, XXX, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, XXX, XXX, k3i, k3j }, \ { k40, k41, k42, k43, k44, XXX, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, XXX, k4h, k4i, k4j }, \ - { k50, XXX, k52, XXX, k54, k55, k56, XXX, XXX, XXX, k5a, XXX, XXX, k5d, k5e, XXX, XXX, k5h, k5i, k5j } \ + { k50, XXX, k52, XXX, k54, k55, k56, XXX, XXX, XXX, k5a, XXX, XXX, k5d, XXX, k5f, XXX, k5h, k5i, k5j } \ } // ANSI layout @@ -37,14 +37,14 @@ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2i, k2j, \ k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3i, k3j, \ k40, k41, k42, k43, k44, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, k4h, k4i, k4j, \ - k51, k52, k54, k55, k56, k5a, k5d, k5e, k5h, k5i, k5j \ + k51, k52, k54, k55, k56, k5a, k5d, k5f, k5h, k5i, k5j \ ) { \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, XXX, k0a, k0b, k0c, k0d, XXX, k0f, k0g, k0h, k0i, k0j }, \ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, XXX, k1j }, \ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, XXX, k2i, k2j }, \ { XXX, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, XXX, XXX, k3i, k3j }, \ { k40, k41, k42, k43, k44, XXX, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, XXX, k4h, k4i, k4j }, \ - { XXX, k51, k52, XXX, k54, k55, k56, XXX, XXX, XXX, k5a, XXX, XXX, k5d, k5e, XXX, XXX, k5h, k5i, k5j } \ + { XXX, k51, k52, XXX, k54, k55, k56, XXX, XXX, XXX, k5a, XXX, XXX, k5d, XXX, k5f, XXX, k5h, k5i, k5j } \ } // ANSI layout @@ -58,14 +58,14 @@ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2i, k2j, \ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3i, k3j, \ k40, k41, k42, k43, k44, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, k4h, k4i, k4j, \ - k50, k51, k52, k53, k54, k55, k56, k5a, k5d, k5e, k5h, k5i, k5j \ + k50, k51, k52, k53, k54, k55, k56, k5a, k5d, k5f, k5h, k5i, k5j \ ) { \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, XXX, k0a, k0b, k0c, k0d, XXX, k0f, k0g, k0h, k0i, k0j }, \ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, XXX, k1j }, \ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, XXX, k2i, k2j }, \ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, XXX, XXX, k3i, k3j }, \ { k40, k41, k42, k43, k44, XXX, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, XXX, k4h, k4i, k4j }, \ - { k50, k51, k52, k53, k54, k55, k56, XXX, XXX, XXX, k5a, XXX, XXX, k5d, k5e, XXX, XXX, k5h, k5i, k5j } \ + { k50, k51, k52, k53, k54, k55, k56, XXX, XXX, XXX, k5a, XXX, XXX, k5d, XXX, k5f, XXX, k5h, k5i, k5j } \ } @@ -82,14 +82,14 @@ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2i, k2j, \ k30, k31, k32, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3i, k3j, \ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, k4h, k4i, k4j, \ - k50, k52, k54, k55, k56, k5a, k5d, k5e, k5h, k5i, k5j \ + k50, k52, k54, k55, k56, k5a, k5d, k5f, k5h, k5i, k5j \ ) { \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, XXX, k0a, k0b, k0c, k0d, XXX, k0f, k0g, k0h, k0i, k0j }, \ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, XXX, k1j }, \ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, XXX, k2i, k2j }, \ { k30, k31, k32, XXX, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, XXX, XXX, k3i, k3j }, \ { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, XXX, k4h, k4i, k4j }, \ - { k50, XXX, k52, XXX, k54, k55, k56, XXX, XXX, XXX, k5a, XXX, XXX, k5d, k5e, XXX, XXX, k5h, k5i, k5j } \ + { k50, XXX, k52, XXX, k54, k55, k56, XXX, XXX, XXX, k5a, XXX, XXX, k5d, XXX, k5f, XXX, k5h, k5i, k5j } \ } // ISO layout @@ -104,14 +104,14 @@ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2i, k2j, \ k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3i, k3j, \ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, k4h, k4i, k4j, \ - k51, k52, k54, k55, k56, k5a, k5d, k5e, k5h, k5i, k5j \ + k51, k52, k54, k55, k56, k5a, k5d, k5f, k5h, k5i, k5j \ ) { \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, XXX, k0a, k0b, k0c, k0d, XXX, k0f, k0g, k0h, k0i, k0j }, \ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, XXX, k1j }, \ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, XXX, k2i, k2j }, \ { XXX, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, XXX, XXX, k3i, k3j }, \ { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, XXX, k4h, k4i, k4j }, \ - { XXX, k51, k52, XXX, k54, k55, k56, XXX, XXX, XXX, k5a, XXX, XXX, k5d, k5e, XXX, XXX, k5h, k5i, k5j } \ + { XXX, k51, k52, XXX, k54, k55, k56, XXX, XXX, XXX, k5a, XXX, XXX, k5d, XXX, k5f, XXX, k5h, k5i, k5j } \ } // ISO layout @@ -126,14 +126,14 @@ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2i, k2j, \ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3i, k3j, \ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, k4h, k4i, k4j, \ - k50, k51, k52, k53, k54, k55, k56, k5a, k5d, k5e, k5h, k5i, k5j \ + k50, k51, k52, k53, k54, k55, k56, k5a, k5d, k5f, k5h, k5i, k5j \ ) { \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, XXX, k0a, k0b, k0c, k0d, XXX, k0f, k0g, k0h, k0i, k0j }, \ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, XXX, k1j }, \ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, XXX, k2i, k2j }, \ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, XXX, XXX, k3i, k3j }, \ { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, XXX, k4h, k4i, k4j }, \ - { k50, k51, k52, k53, k54, k55, k56, XXX, XXX, XXX, k5a, XXX, XXX, k5d, k5e, XXX, XXX, k5h, k5i, k5j } \ + { k50, k51, k52, k53, k54, k55, k56, XXX, XXX, XXX, k5a, XXX, XXX, k5d, XXX, k5f, XXX, k5h, k5i, k5j } \ } //////////////////////////////// JIS //////////////////////////////// diff --git a/keyboards/wheatfield/blocked65/config.h b/keyboards/wheatfield/blocked65/config.h index ebcbf8fc689..ea5c3161125 100644 --- a/keyboards/wheatfield/blocked65/config.h +++ b/keyboards/wheatfield/blocked65/config.h @@ -58,4 +58,4 @@ along with this program. If not, see . */ #define RGB_DI_PIN E2 #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 2 \ No newline at end of file +#define RGBLED_NUM 14 diff --git a/keyboards/winkeyless/bface/config.h b/keyboards/winkeyless/bface/config.h index 0ef8a42b6fd..27ee761e9b7 100644 --- a/keyboards/winkeyless/bface/config.h +++ b/keyboards/winkeyless/bface/config.h @@ -19,7 +19,7 @@ along with this program. If not, see . #pragma once #define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422D +#define PRODUCT_ID 0x4246 // BF #define DEVICE_VER 0x0200 #define MANUFACTURER Winkeyless #define PRODUCT B.face diff --git a/keyboards/winkeyless/bface/keymaps/via/config.h b/keyboards/winkeyless/bface/keymaps/via/config.h new file mode 100644 index 00000000000..0865e452088 --- /dev/null +++ b/keyboards/winkeyless/bface/keymaps/via/config.h @@ -0,0 +1 @@ +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/winkeyless/bface/keymaps/via/keymap.c b/keyboards/winkeyless/bface/keymaps/via/keymap.c new file mode 100644 index 00000000000..1d472e05567 --- /dev/null +++ b/keyboards/winkeyless/bface/keymaps/via/keymap.c @@ -0,0 +1,43 @@ +/* +Copyright 2020 MechMerlin + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, + KC_F1, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_ENT, + KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL,KC_LALT,KC_LGUI, KC_SPC, KC_RALT,KC_RGUI,MO(1), KC_RCTL + ), + [1] = LAYOUT_60_ansi( + KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,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_INC, BL_DEC, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,RGB_MOD,KC_TRNS,BL_ON, BL_OFF, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS + ), + + [2] = LAYOUT_60_ansi( + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS + ), +}; diff --git a/keyboards/winkeyless/bface/keymaps/via/rules.mk b/keyboards/winkeyless/bface/keymaps/via/rules.mk new file mode 100644 index 00000000000..97010a994b6 --- /dev/null +++ b/keyboards/winkeyless/bface/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes + +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = no diff --git a/keyboards/winkeyless/bmini/bmini.h b/keyboards/winkeyless/bmini/bmini.h index 7bdf66fd250..82b9ec01c9e 100644 --- a/keyboards/winkeyless/bmini/bmini.h +++ b/keyboards/winkeyless/bmini/bmini.h @@ -14,9 +14,7 @@ GNU General 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 BMINI_H -#define BMINI_H +#pragma once #include "quantum.h" @@ -56,23 +54,3 @@ 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 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, \ - K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \ - K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \ - K00, K10, K20, K56, K57, KB0, KC0, K66, K76, K96 \ -) \ -{ \ - { KC_##K00, KC_##K10, KC_##K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KB0, KC_##KC0, KC_##KD0, KC_##KE0 }, \ - { KC_##K01, KC_##K11, KC_##K21, KC_##K31, KC_##K41, KC_##K51, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA1, KC_##KB1, KC_NO, KC_##KD1, KC_##KE1 }, \ - { KC_##K02, KC_##K12, KC_##K22, KC_##K32, KC_##K42, KC_##K52, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA2, KC_##KB2, KC_NO, KC_##KD2, KC_##KE2 }, \ - { KC_##K03, KC_##K13, KC_##K23, KC_##K33, KC_##K43, KC_##K53, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA3, KC_##KB3, KC_##KC3, KC_##KD3, KC_NO }, \ - { KC_##K04, KC_##K14, KC_##K24, KC_##K34, KC_##K44, KC_##K54, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA4, KC_##KB4, KC_##KC4, KC_NO, KC_##KE4 }, \ - { KC_##K05, KC_NO, KC_##K25, KC_##K35, KC_##K45, KC_##K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KB5, KC_##KC5, KC_##KD5, KC_##KE5 }, \ - { KC_##K06, KC_##K16, KC_##K26, KC_##K36, KC_##K46, KC_##K56, KC_##K66, KC_##K76, KC_##K86, KC_##K96, KC_##KA6, KC_##KB6, KC_##KC6, KC_##KD6, KC_##KE6 }, \ - { KC_##K07, KC_##K17, KC_##K27, KC_##K37, KC_##K47, KC_##K57, KC_##K67, KC_##K77, KC_NO, KC_NO, KC_##KA7, KC_##KB7, KC_##KC7, KC_##KD7, KC_##KE7 } \ -} - -#endif diff --git a/keyboards/winkeyless/bmini/config.h b/keyboards/winkeyless/bmini/config.h index ccce0b6c84e..6e91241af8e 100644 --- a/keyboards/winkeyless/bmini/config.h +++ b/keyboards/winkeyless/bmini/config.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include "config_common.h" #define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422D +#define PRODUCT_ID 0x424D // BM #define DEVICE_VER 0x0200 #define MANUFACTURER Winkeyless #define PRODUCT B.mini diff --git a/keyboards/winkeyless/bmini/keymaps/via/config.h b/keyboards/winkeyless/bmini/keymaps/via/config.h new file mode 100644 index 00000000000..0865e452088 --- /dev/null +++ b/keyboards/winkeyless/bmini/keymaps/via/config.h @@ -0,0 +1 @@ +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/winkeyless/bmini/keymaps/via/keymap.c b/keyboards/winkeyless/bmini/keymaps/via/keymap.c new file mode 100644 index 00000000000..75ba043e5d4 --- /dev/null +++ b/keyboards/winkeyless/bmini/keymaps/via/keymap.c @@ -0,0 +1,46 @@ +/* +Copyright 2020 MechMerlin + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + 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, + MO(0), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_ENT, KC_PGUP, + KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL,KC_LALT,KC_LGUI, KC_SPC, KC_RGUI,KC_RALT,KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT + ), + [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, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_RGHT + ), + + [2] = 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_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, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_RGHT + ), +}; diff --git a/keyboards/winkeyless/bmini/keymaps/via/rules.mk b/keyboards/winkeyless/bmini/keymaps/via/rules.mk new file mode 100644 index 00000000000..97010a994b6 --- /dev/null +++ b/keyboards/winkeyless/bmini/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes + +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = no diff --git a/keyboards/winkeyless/bminiex/bminiex.h b/keyboards/winkeyless/bminiex/bminiex.h index 8d897f639fe..b9532f2f0e6 100644 --- a/keyboards/winkeyless/bminiex/bminiex.h +++ b/keyboards/winkeyless/bminiex/bminiex.h @@ -72,23 +72,3 @@ along with this program. If not, see . { K06, K16, K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6, KD6, KE6 }, \ { K07, K17, K27, K37, K47, K57, K67, K77, KC_NO, KC_NO, KA7, KB7, KC7, KD7, KE7 } \ } - -#define LAYOUT_kc( \ - K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, K65, K75, K85, K95, \ - K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, K64, K74, K84, K94, \ - K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, K63, K73, K83, \ - K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KC2, KD2, KE0, K62, K72, K82, K92, \ - K01, K30, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, K61, K71, K81, \ - K00, K10, K20, K56, K57, KB0, KC0, K66, K76, K96, K60, K80, K90 \ -) \ -{ \ - { KC_##K00, KC_##K10, KC_##K20, KC_##K30, KC_NO, KC_NO, KC_##K60, KC_NO, KC_##K80, KC_##K90, KC_NO, KC_##KB0, KC_##KC0, KC_##KD0, KC_##KE0 }, \ - { KC_##K01, KC_##K11, KC_##K21, KC_##K31, KC_##K41, KC_##K51, KC_##K61, KC_##K71, KC_##K81, KC_NO, KC_##KA1, KC_##KB1, KC_NO, KC_##KD1, KC_##KE1 }, \ - { KC_##K02, KC_##K12, KC_##K22, KC_##K32, KC_##K42, KC_##K52, KC_##K62, KC_##K72, KC_##K82, KC_##K92, KC_##KA2, KC_##KB2, KC_##KC2, KC_##KD2, KC_##KE2 }, \ - { KC_##K03, KC_##K13, KC_##K23, KC_##K33, KC_##K43, KC_##K53, KC_##K63, KC_##K73, KC_##K83, KC_NO, KC_##KA3, KC_##KB3, KC_##KC3, KC_##KD3, KC_NO }, \ - { KC_##K04, KC_##K14, KC_##K24, KC_##K34, KC_##K44, KC_##K54, KC_##K64, KC_##K74, KC_##K84, KC_##K94, KC_##KA4, KC_##KB4, KC_##KC4, KC_NO, KC_##KE4 }, \ - { KC_##K05, KC_NO, KC_##K25, KC_##K35, KC_##K45, KC_##K55, KC_##K65, KC_##K75, KC_##K85, KC_##K95, KC_NO, KC_##KB5, KC_##KC5, KC_##KD5, KC_##KE5 }, \ - { KC_##K06, KC_##K16, KC_##K26, KC_##K36, KC_##K46, KC_##K56, KC_##K66, KC_##K76, KC_##K86, KC_##K96, KC_##KA6, KC_##KB6, KC_##KC6, KC_##KD6, KC_##KE6 }, \ - { KC_##K07, KC_##K17, KC_##K27, KC_##K37, KC_##K47, KC_##K57, KC_##K67, KC_##K77, KC_NO, KC_NO, KC_##KA7, KC_##KB7, KC_##KC7, KC_##KD7, KC_##KE7 } \ -} - diff --git a/keyboards/winkeyless/bminiex/config.h b/keyboards/winkeyless/bminiex/config.h index 6e35c9e82be..7c9c11c1116 100644 --- a/keyboards/winkeyless/bminiex/config.h +++ b/keyboards/winkeyless/bminiex/config.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include "config_common.h" #define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422E +#define PRODUCT_ID 0x4258 // BX #define DEVICE_VER 0x0200 #define MANUFACTURER Winkeyless #define PRODUCT B.mini EX diff --git a/keyboards/winkeyless/bminiex/keymaps/via/config.h b/keyboards/winkeyless/bminiex/keymaps/via/config.h new file mode 100644 index 00000000000..0865e452088 --- /dev/null +++ b/keyboards/winkeyless/bminiex/keymaps/via/config.h @@ -0,0 +1 @@ +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/winkeyless/bminiex/keymaps/via/keymap.c b/keyboards/winkeyless/bminiex/keymaps/via/keymap.c new file mode 100644 index 00000000000..d612843f816 --- /dev/null +++ b/keyboards/winkeyless/bminiex/keymaps/via/keymap.c @@ -0,0 +1,47 @@ +/* +Copyright 2020 MechMerlin + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + 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_NO, KC_NO, KC_NO, KC_NO, + 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_NO, KC_INS, KC_P7, KC_P8, KC_P9, + KC_LCAP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS,KC_ENT, KC_PGUP, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT,KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, KC_PGDN, KC_P1, KC_P2, KC_P3, + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_APP ,KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT, KC_P0, KC_PDOT, KC_PENT + ), + + [1] = 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_RBRC,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [2] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_RBRC,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, 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/winkeyless/bminiex/keymaps/via/rules.mk b/keyboards/winkeyless/bminiex/keymaps/via/rules.mk new file mode 100644 index 00000000000..97010a994b6 --- /dev/null +++ b/keyboards/winkeyless/bminiex/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes + +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = no diff --git a/keyboards/winkeyless/readme.md b/keyboards/winkeyless/readme.md index 91719f6da0e..a4eb6d6bd5d 100644 --- a/keyboards/winkeyless/readme.md +++ b/keyboards/winkeyless/readme.md @@ -10,4 +10,4 @@ Most Winkeyless boards were low profile and constructed out of acrylic showcasin In late 2018, Winkeyless closed its doors. The numerous unlicensed implementations of its hardware and software were cited as one of many reasons for shutting down. -This directory contains official Winkeyless boards that have had QMK firmware ported to work with them. +This directory contains official Winkeyless boards that have had QMK firmware and VIA support added. diff --git a/keyboards/wsk/gothic50/rules.mk b/keyboards/wsk/gothic50/rules.mk index 6a1221aa1a1..ea21d62b3f2 100644 --- a/keyboards/wsk/gothic50/rules.mk +++ b/keyboards/wsk/gothic50/rules.mk @@ -7,7 +7,8 @@ MCU = atmega32u4 # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/wsk/gothic70/rules.mk b/keyboards/wsk/gothic70/rules.mk index 6a1221aa1a1..ea21d62b3f2 100644 --- a/keyboards/wsk/gothic70/rules.mk +++ b/keyboards/wsk/gothic70/rules.mk @@ -7,7 +7,8 @@ MCU = atmega32u4 # Atmel DFU atmel-dfu # LUFA DFU lufa-dfu # QMK DFU qmk-dfu -# atmega32a bootloadHID +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options diff --git a/keyboards/yd60mq/info.json b/keyboards/yd60mq/info.json index 816d653bcef..60a62af7aa4 100644 --- a/keyboards/yd60mq/info.json +++ b/keyboards/yd60mq/info.json @@ -135,6 +135,77 @@ {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":2.75}, + {"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, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}, + {"x":13.75, "y":4, "w":1.25} + ] + }, + "LAYOUT_60_iso": { + "key_count": 62, + "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, "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":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}, + {"x":13.75, "y":1, "w":1.25, "h":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":2.75}, + {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, diff --git a/keyboards/yd60mq/keymaps/iso/keymap.c b/keyboards/yd60mq/keymaps/iso/keymap.c new file mode 100644 index 00000000000..9a4debed77f --- /dev/null +++ b/keyboards/yd60mq/keymaps/iso/keymap.c @@ -0,0 +1,28 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _BL, + _FL, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + //,: Base Layer + [0] = LAYOUT_60_iso( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, LT(1,KC_RGHT) + ), + + //,: Function Layer + [1] = LAYOUT_60_iso( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, KC_PGUP, KC_HOME, KC_PSCR, + KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, RGB_HUI, RGB_SAI, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_END, XXXXXXX, KC_MNXT, + KC_TRNS, RGB_MOD, RGB_RMOD, RGB_VAI, RGB_VAD, RGB_HUD, RGB_SAD, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MPRV, + KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_SPI, RGB_SPD, XXXXXXX, KC_TRNS + ) + +}; \ No newline at end of file diff --git a/keyboards/yd60mq/rules.mk b/keyboards/yd60mq/rules.mk index 98b13aca432..6619c187f4f 100644 --- a/keyboards/yd60mq/rules.mk +++ b/keyboards/yd60mq/rules.mk @@ -31,6 +31,6 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs -LAYOUTS = 60_ansi +LAYOUTS = 60_ansi 60_iso DEFAULT_FOLDER = yd60mq/12led diff --git a/keyboards/yd60mq/yd60mq.h b/keyboards/yd60mq/yd60mq.h index 0f6fde9657e..6b3824baa37 100644 --- a/keyboards/yd60mq/yd60mq.h +++ b/keyboards/yd60mq/yd60mq.h @@ -30,4 +30,19 @@ { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, K49, K4A, KC_NO, K4C, K4D, KC_NO } \ } +#define LAYOUT_60_iso( \ + 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, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K1d, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, K3d, \ + K40, K41, K42, K47, K49, K4A, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, K1c, KC_NO, }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K1d }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, KC_NO, K3d, KC_NO }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, K49, K4A, KC_NO, K4C, K4D, KC_NO } \ +} + + #define LAYOUT LAYOUT_all diff --git a/keyboards/ymd75/README.md b/keyboards/ymd75/README.md index 9a618c59437..7c4779c9f55 100644 --- a/keyboards/ymd75/README.md +++ b/keyboards/ymd75/README.md @@ -1,19 +1,19 @@ # YMD75 / MT84 -75% keyboard from YMDK. YMDK sell the board and name it "YMD75", however the PCB has "MT84" printed on both sides. +75% keyboard from YMDK. YMDK sell the board and name it "YMD75", however revision 1 of the PCB has "MT84" printed on both sides. * Keyboard Maintainer: [Wayne K Jones](github.com/WarmCatUK) -* Hardware Supported: YMD75/MT84 with the ATmega32a chip. +* Hardware Supported: YMD75/MT84 (rev1 and rev2) with the ATmega32a chip. * Hardware Availability: Make example for this keyboard (after setting up your build environment): - make ymd75:default + make ymd75/rev1:default Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) - make ymd75:default:flash + make ymd75/rev1:default:flash -**Reset Key**: Hold down the key located at *Key below the top right key*, commonly programmed as *Backspace* while plugging in the keyboard. +**Reset Key**: Hold down the key located at *Key below the top right key*, commonly programmed as *Backspace* while plugging in the keyboard. On PCB revision 2, enter the bootloader by holding `L_CTRL` while plugging in the keyboard. See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/ymd75/config.h b/keyboards/ymd75/config.h index 8aa2bba41b4..0ea23bc4632 100644 --- a/keyboards/ymd75/config.h +++ b/keyboards/ymd75/config.h @@ -24,16 +24,11 @@ along with this program. If not, see . #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D #define DEVICE_VER 0x0200 + #define MANUFACTURER YMDK #define PRODUCT YMD75 / MT84 #define DESCRIPTION 75% Keyboard -/* matrix size */ -#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, D7 } -#define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 12 diff --git a/keyboards/ymd75/keymaps/default/keymap.c b/keyboards/ymd75/keymaps/default/keymap.c index 17c5244bd28..2b641246811 100644 --- a/keyboards/ymd75/keymaps/default/keymap.c +++ b/keyboards/ymd75/keymaps/default/keymap.c @@ -82,12 +82,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { switch(keycode) { case P_MACRO: - SEND_STRING(SS_DOWN(X_LALT)); - SEND_STRING(SS_TAP(X_KP_1)); - SEND_STRING(SS_TAP(X_KP_5)); - SEND_STRING(SS_TAP(X_KP_6)); - SEND_STRING(SS_UP(X_LALT)); - return false; break; + register_code(KC_LALT); + tap_code(KC_KP_1); + tap_code(KC_KP_5); + tap_code(KC_KP_6); + unregister_code(KC_LALT); + return false; } } return true; diff --git a/keyboards/ymd75/rev1/config.h b/keyboards/ymd75/rev1/config.h new file mode 100644 index 00000000000..e9009ee0eb0 --- /dev/null +++ b/keyboards/ymd75/rev1/config.h @@ -0,0 +1,27 @@ +/* +Base Copyright 2017 Luiz Ribeiro +Modified 2017 Andrew Novak +Modified 2018 Wayne Jones (WarmCatUK) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +/* matrix size */ +#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, D7 } +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ymd75/rev1/rev1.c b/keyboards/ymd75/rev1/rev1.c new file mode 100644 index 00000000000..0870a6cc027 --- /dev/null +++ b/keyboards/ymd75/rev1/rev1.c @@ -0,0 +1,34 @@ +/* +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 "ymd75.h" + +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} + +void led_init_ports(void) { + setPinOutput(D1); +} + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D1, led_state.caps_lock); + } + return true; +} diff --git a/keyboards/ymd75/rev1/rev1.h b/keyboards/ymd75/rev1/rev1.h new file mode 100644 index 00000000000..0a426ffa571 --- /dev/null +++ b/keyboards/ymd75/rev1/rev1.h @@ -0,0 +1,39 @@ +/* +Base Copyright 2017 Luiz Ribeiro +Modified 2017 Andrew Novak +Modified 2018 Wayne Jones (WarmCatUK) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once +#include "quantum.h" + +#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, \ +K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \ +K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \ +K00, K10, K20, K56, K57, KB0, KC0, K96, K76, K66 \ +){ \ +{ K00, K10, K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB0, KC0, KD0, KC_NO }, \ +{ K01, K11, K21, K31, K41, K51, KC_NO, KC_NO, KC_NO, KC_NO, KA1, KB1, KC_NO, KD1, KE1 }, \ +{ K02, K12, K22, K32, K42, K52, KC_NO, KC_NO, KC_NO, KC_NO, KA2, KB2, KC_NO, KD2, KE2 }, \ +{ K03, K13, K23, K33, K43, K53, KC_NO, KC_NO, KC_NO, KC_NO, KA3, KB3, KC3, KD3, KC_NO }, \ +{ K04, K14, K24, K34, K44, K54, KC_NO, KC_NO, KC_NO, KC_NO, KA4, KB4, KC4, KC_NO, KE4 }, \ +{ K05, KC_NO, K25, K35, K45, K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KC5, KD5, KE5 }, \ +{ K06, K16, K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6, KD6, KE6 }, \ +{ K07, K17, K27, K37, K47, K57, K67, K77, KE0, KC_NO, KA7, KB7, KC7, KD7, KE7 } \ +} diff --git a/keyboards/ymd75/rev1/rules.mk b/keyboards/ymd75/rev1/rules.mk new file mode 100644 index 00000000000..66ffbb499dd --- /dev/null +++ b/keyboards/ymd75/rev1/rules.mk @@ -0,0 +1,15 @@ +# build options +BOOTMAGIC_ENABLE = yes +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes +WS2812_DRIVER = i2c +NKRO_ENABLE = no +# Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work + +KEY_LOCK_ENABLE = yes +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/ymd75/rev2/config.h b/keyboards/ymd75/rev2/config.h new file mode 100644 index 00000000000..9718b19dd1d --- /dev/null +++ b/keyboards/ymd75/rev2/config.h @@ -0,0 +1,8 @@ +#pragma once + +/* matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 +#define MATRIX_ROW_PINS { B7, B6, B5, B4, B3, B0 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/ymd75/rev2/rev2.c b/keyboards/ymd75/rev2/rev2.c new file mode 100644 index 00000000000..0870a6cc027 --- /dev/null +++ b/keyboards/ymd75/rev2/rev2.c @@ -0,0 +1,34 @@ +/* +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 "ymd75.h" + +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} + +void led_init_ports(void) { + setPinOutput(D1); +} + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D1, led_state.caps_lock); + } + return true; +} diff --git a/keyboards/ymd75/rev2/rev2.h b/keyboards/ymd75/rev2/rev2.h new file mode 100644 index 00000000000..b2dd7b8e1cd --- /dev/null +++ b/keyboards/ymd75/rev2/rev2.h @@ -0,0 +1,18 @@ +#pragma once +#include "quantum.h" + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K514, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K513, \ + K200, K201, 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, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, \ + K500, K501, K502, K505, K506, K507, K508, K509, K510, K511 \ +) { \ + { 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, KC_NO, K114 }, \ + { K200, K201, 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, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414 }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, K506, K507, K508, K509, K510, K511, KC_NO, K513, K514 } \ +} diff --git a/keyboards/ymd75/rev2/rules.mk b/keyboards/ymd75/rev2/rules.mk new file mode 100644 index 00000000000..66ffbb499dd --- /dev/null +++ b/keyboards/ymd75/rev2/rules.mk @@ -0,0 +1,15 @@ +# build options +BOOTMAGIC_ENABLE = yes +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes +WS2812_DRIVER = i2c +NKRO_ENABLE = no +# Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work + +KEY_LOCK_ENABLE = yes +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/ymd75/rules.mk b/keyboards/ymd75/rules.mk index 9d584b2b418..437f9f4a52c 100644 --- a/keyboards/ymd75/rules.mk +++ b/keyboards/ymd75/rules.mk @@ -11,20 +11,4 @@ MCU = atmega32a # ATmega328P USBasp BOOTLOADER = bootloadHID -# build options -BOOTMAGIC_ENABLE = yes -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = yes -CONSOLE_ENABLE = no -COMMAND_ENABLE = yes -BACKLIGHT_ENABLE = yes -RGBLIGHT_ENABLE = yes -WS2812_DRIVER = i2c -NKRO_ENABLE = no -# Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work - -DISABLE_WS2812 = no - -KEY_LOCK_ENABLE = yes -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +DEFAULT_FOLDER = ymd75/rev1 diff --git a/keyboards/ymd75/ymd75.c b/keyboards/ymd75/ymd75.c index 0870a6cc027..2fca021f785 100644 --- a/keyboards/ymd75/ymd75.c +++ b/keyboards/ymd75/ymd75.c @@ -1,34 +1 @@ -/* -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 "ymd75.h" - -void keyboard_pre_init_kb(void) { - led_init_ports(); - keyboard_pre_init_user(); -} - -void led_init_ports(void) { - setPinOutput(D1); -} - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - writePin(D1, led_state.caps_lock); - } - return true; -} diff --git a/keyboards/ymd75/ymd75.h b/keyboards/ymd75/ymd75.h index 0c9fff58cbe..afeb095670f 100644 --- a/keyboards/ymd75/ymd75.h +++ b/keyboards/ymd75/ymd75.h @@ -1,55 +1,9 @@ -/* -Base Copyright 2017 Luiz Ribeiro -Modified 2017 Andrew Novak -Modified 2018 Wayne Jones (WarmCatUK) - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#ifndef KEYMAP_COMMON_H -#define KEYMAP_COMMON_H +#pragma once #include "quantum.h" -#include "quantum_keycodes.h" -#include "keycode.h" -#include "action.h" - -#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, \ -K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \ -K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \ -K00, K10, K20, K56, K57, KB0, KC0, K96, K76, K66 \ -){ \ -{ K00, K10, K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB0, KC0, KD0, KC_NO }, \ -{ K01, K11, K21, K31, K41, K51, KC_NO, KC_NO, KC_NO, KC_NO, KA1, KB1, KC_NO, KD1, KE1 }, \ -{ K02, K12, K22, K32, K42, K52, KC_NO, KC_NO, KC_NO, KC_NO, KA2, KB2, KC_NO, KD2, KE2 }, \ -{ K03, K13, K23, K33, K43, K53, KC_NO, KC_NO, KC_NO, KC_NO, KA3, KB3, KC3, KD3, KC_NO }, \ -{ K04, K14, K24, K34, K44, K54, KC_NO, KC_NO, KC_NO, KC_NO, KA4, KB4, KC4, KC_NO, KE4 }, \ -{ K05, KC_NO, K25, K35, K45, K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KC5, KD5, KE5 }, \ -{ K06, K16, K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6, KD6, KE6 }, \ -{ K07, K17, K27, K37, K47, K57, K67, K77, KE0, KC_NO, KA7, KB7, KC7, KD7, KE7 } \ -} +#if defined(KEYBOARD_ymd75_rev1) + #include "rev1.h" +#elif defined(KEYBOARD_ymd75_rev2) + #include "rev2.h" #endif - - - - - - - - - diff --git a/keyboards/ymdk/ymd09/config.h b/keyboards/ymdk/ymd09/config.h index b7e5539df2b..372046b8bc4 100644 --- a/keyboards/ymdk/ymd09/config.h +++ b/keyboards/ymdk/ymd09/config.h @@ -60,7 +60,5 @@ along with this program. If not, see . #define LOCKING_RESYNC_ENABLE /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/yosino58/config.h b/keyboards/yosino58/config.h index 4357a218d4a..fb1cdf3962a 100644 --- a/keyboards/yosino58/config.h +++ b/keyboards/yosino58/config.h @@ -24,11 +24,5 @@ along with this program. If not, see . #define USE_I2C #define USE_SERIAL -#ifdef USE_Link_Time_Optimization - // LTO has issues with macros (action_get_macro) and "functions" (fn_actions), - // so just disable them - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION - - #define DISABLE_LEADER -#endif // USE_Link_Time_Optimization +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/yurei/config.h b/keyboards/yurei/config.h index da37d3ce88d..24d6229bdd1 100644 --- a/keyboards/yurei/config.h +++ b/keyboards/yurei/config.h @@ -192,10 +192,9 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + /* * MIDI options */ diff --git a/keyboards/yushakobo/quick7/config.h b/keyboards/yushakobo/quick7/config.h new file mode 100644 index 00000000000..4fb8ba6d96d --- /dev/null +++ b/keyboards/yushakobo/quick7/config.h @@ -0,0 +1,252 @@ +/* +Copyright 2020 yushakobo + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x3265 +#define PRODUCT_ID 0x0002 +#define DEVICE_VER 0x0001 +#define MANUFACTURER yushakobo +#define PRODUCT quick7 +#define DESCRIPTION A simple macropad with rotary encoders. + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 3 + +/* + * 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 DIRECT_PINS { \ + { D2, D4, F4 }, \ + { D7, B1, B3 }, \ + { E6, B4, B2 }, \ +} + +#define ENCODERS_PAD_A { D1, F5 } +#define ENCODERS_PAD_B { D0, F6 } + +#define UNUSED_PINS + + + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#ifdef RGBLIGHT_ENABLE +# define RGB_DI_PIN D3 +# define RGBLED_NUM 13 +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +///*== all animations enable ==*/ +//# define RGBLIGHT_ANIMATIONS +///*== or choose animations ==*/ +//# define RGBLIGHT_EFFECT_BREATHING +# define RGBLIGHT_EFFECT_RAINBOW_MOOD +//# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +//# define RGBLIGHT_EFFECT_SNAKE +//# define RGBLIGHT_EFFECT_KNIGHT +# define RGBLIGHT_EFFECT_CHRISTMAS +# define RGBLIGHT_EFFECT_STATIC_GRADIENT +# define RGBLIGHT_EFFECT_RGB_TEST +//# define RGBLIGHT_EFFECT_ALTERNATING +/*== customize breathing effect ==*/ + /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 + /*==== use exp() and sin() ====*/ +// # define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// # define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 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 */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* 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_HELP H +//#define MAGIC_KEY_HELP_ALT 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 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#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 B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#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 + +/* disable these deprecated features by default */ +#ifndef LINK_TIME_OPTIMIZATION_ENABLE + #define NO_ACTION_MACRO + #define NO_ACTION_FUNCTION +#endif +/* + * 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 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/yushakobo/quick7/info.json b/keyboards/yushakobo/quick7/info.json new file mode 100644 index 00000000000..fd0f94a4ed9 --- /dev/null +++ b/keyboards/yushakobo/quick7/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "quick7", + "url": "", + "maintainer": "yushakobo", + "width": 3, + "height": 2, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, + {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2} + ] + } + } +} diff --git a/keyboards/yushakobo/quick7/keymaps/default/keymap.c b/keyboards/yushakobo/quick7/keymaps/default/keymap.c new file mode 100644 index 00000000000..3137f5853d2 --- /dev/null +++ b/keyboards/yushakobo/quick7/keymaps/default/keymap.c @@ -0,0 +1,72 @@ +/* Copyright 2020 yushakobo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FUNC1 +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + YUSHAURL = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT( + KC_MUTE, MO(_FUNC1), RGB_MOD, + S(KC_TAB), KC_UP, KC_TAB, + KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FUNC1] = LAYOUT( + RESET, KC_TRNS, RGB_TOG, + KC_HOME, KC_VOLU, KC_END, + KC_MPRV, KC_VOLD, KC_MNXT + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case YUSHAURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://yushakobo.jp/\n"); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { // Left encoder + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + else if (index == 1) { // Right encoder + if (clockwise) { + rgblight_decrease_hue_noeeprom(); + } else { + rgblight_increase_hue_noeeprom(); + } + } +} diff --git a/keyboards/yushakobo/quick7/keymaps/default/readme.md b/keyboards/yushakobo/quick7/keymaps/default/readme.md new file mode 100644 index 00000000000..9db29d7ae6e --- /dev/null +++ b/keyboards/yushakobo/quick7/keymaps/default/readme.md @@ -0,0 +1,25 @@ +# The default keymap for quick7 + +### Base Layer +``` +Left Encoder(CW: Vol+, CCW: Vol-) +Right Encoder(CW: RGB HUE-, CCW: RGB HUE+) +,----------- --------- ------------, +| MUTE | Func1 | RGB MODE | + ----------- --------- ------------ +| Shift+Tab | UP | TAB | + ----------- --------- ------------ +| LEFT | DOWN | RIGHT | +`----------- --------- ------------' +``` + +### Func1 Layer +``` +,----------- --------- ------------, +| RESET | Func1 | RGB TOGGLE | + ----------- --------- ------------ +| HOME | VOL+ | END | + ----------- --------- ------------ +| MEDIA << | VOL- | MEDIA >> | +`----------- --------- ------------' +``` \ No newline at end of file diff --git a/keyboards/yushakobo/quick7/quick7.c b/keyboards/yushakobo/quick7/quick7.c new file mode 100644 index 00000000000..632bcf1ae52 --- /dev/null +++ b/keyboards/yushakobo/quick7/quick7.c @@ -0,0 +1,17 @@ +/* Copyright 2020 yushakobo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "quick7.h" diff --git a/keyboards/yushakobo/quick7/quick7.h b/keyboards/yushakobo/quick7/quick7.h new file mode 100644 index 00000000000..2e86487c7f5 --- /dev/null +++ b/keyboards/yushakobo/quick7/quick7.h @@ -0,0 +1,38 @@ +/* Copyright 2020 yushakobo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, k02, \ + k10, k11, k12, \ + k20, k21, k22 \ +) \ +{ \ + { k00, k01, k02 }, \ + { k10, k11, k12 }, \ + { k20, k21, k22 } \ +} diff --git a/keyboards/yushakobo/quick7/readme.md b/keyboards/yushakobo/quick7/readme.md new file mode 100644 index 00000000000..5e9f85c248e --- /dev/null +++ b/keyboards/yushakobo/quick7/readme.md @@ -0,0 +1,15 @@ +# quick7 + +![quick7](https://cdn-ak.f.st-hatena.com/images/fotolife/s/segata24/20200329/20200329150121.jpg) + +A simple macropad for the beginners. + +* Keyboard Maintainer: [yushakobo](https://github.com/yushakobo) +* Hardware Supported: quick7, Pro Micro (ATmega32U4) +* Hardware Availability: (Under Preparation) + +Make example for this keyboard (after setting up your build environment): + + make yushakobo/quick7:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/yushakobo/quick7/rules.mk b/keyboards/yushakobo/quick7/rules.mk new file mode 100644 index 00000000000..3812422e1cf --- /dev/null +++ b/keyboards/yushakobo/quick7/rules.mk @@ -0,0 +1,34 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +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 +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +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 +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +ENCODER_ENABLE = yes # Enable support for Rotary Encoder diff --git a/keyboards/zinc/config.h b/keyboards/zinc/config.h index 9c60d631bce..712db0ac6d2 100644 --- a/keyboards/zinc/config.h +++ b/keyboards/zinc/config.h @@ -40,11 +40,7 @@ along with this program. If not, see . // ./tmk_core // ...... -#ifdef USE_Link_Time_Optimization - // LTO has issues with macros (action_get_macro) and "functions" (fn_actions), - // so just disable them - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif // USE_Link_Time_Optimization +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION //#endif /* CONFIG_H */ diff --git a/keyboards/zinc/keymaps/toshi0383/keymap.c b/keyboards/zinc/keymaps/toshi0383/keymap.c index 45863a71e02..72c3fee6f30 100644 --- a/keyboards/zinc/keymaps/toshi0383/keymap.c +++ b/keyboards/zinc/keymaps/toshi0383/keymap.c @@ -13,77 +13,32 @@ enum layer_names { #define RAISE MO(_RAISE) #define ADJUST MO(_ADJUST) -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { \ - /* Qwerty - * ,-----------------------------------------. ,-----------------------------------------. - * | Esc | Q | W | E | R | T | | Y | U | I | O | P |BSpace| - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Tab | A | S | D | F | G | | H | J | K | L |Shift | GUI | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * |Space | Z | X | C | V | B | | N | M | Ctrl | . | Alt | SCMD | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | GUI | | | |Lower |Enter | |Enter |Raise | | | | | - * `-----------------------------------------' `-----------------------------------------' - */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_ortho_4x12( - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPACE, \ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPACE, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SFT_T(KC_SCLN), KC_RGUI, - KC_SPC, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_RCTL, KC_DOT, KC_RALT, RGUI(KC_RSFT), \ - KC_RGUI, _______, _______, _______, LOWER, KC_ENT, KC_ENT, RAISE, _______, _______, _______, _______ \ + KC_SPC, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_RCTL, KC_DOT, KC_RALT, RGUI(KC_RSFT), + KC_LGUI, KC_LALT, _______, _______, LOWER, KC_ENT, KC_ENT, RAISE, _______, _______, _______, _______ ), - /* Lower - * ,-----------------------------------------. ,-----------------------------------------. - * | ~ | ! | @ | # | $ | % | | ^ | & | * | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | < | > | ( | ) | ` | | - | { | } | [ | ] | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | = | ? | | _ | + | , | . | / | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | |------| TRSP | | TRSP | GUI | | | | | - * `-----------------------------------------' `-----------------------------------------' - */ - [_LOWER] = LAYOUT_ortho_4x12( \ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, _______, _______, _______,\ - _______, KC_LT, KC_GT, KC_LPRN, KC_RPRN, KC_GRV, KC_MINS, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_PIPE, \ - KC_LALT, _______, _______, _______, KC_EQL, KC_QUES, KC_UNDS, KC_PLUS, KC_COMM, _______, KC_SLSH, _______, \ - _______, _______, _______, KC_TRNS, _______, KC_TRNS, ADJUST, KC_RGUI, _______, _______, _______, _______ \ - ), - - /* Raise - * ,-----------------------------------------. ,-----------------------------------------. - * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | : | ; | " | ' | \ | | Left | Down | Up |Right | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | |ADJUST| | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | GUI |Shift | |Shift |------| | | | | - * `-----------------------------------------' `-----------------------------------------' - */ - [_RAISE] = LAYOUT_ortho_4x12( \ - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ - _______, KC_COLN, KC_SCLN, KC_DQT, KC_QUOT, KC_BSLS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \ - _______, _______, _______, _______, _______, _______, ADJUST, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, KC_LGUI, KC_LSFT, KC_LSFT, _______, _______, _______, _______, _______ \ - ), - - /* Adjust (Lower + Raise) - * ,-----------------------------------------. ,-----------------------------------------. - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | |RESET | |------| | | | | | - * `-----------------------------------------' `-----------------------------------------' - */ - [_ADJUST] = LAYOUT_ortho_4x12( \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______ \ - ), + [_LOWER] = LAYOUT_ortho_4x12( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, _______, _______, _______, + _______, KC_LT, KC_GT, KC_LPRN, KC_RPRN, KC_GRV, KC_MINS, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_PIPE, + KC_LALT, _______, _______, _______, KC_EQL, KC_QUES, KC_UNDS, KC_PLUS, KC_COMM, _______, KC_SLSH, _______, + _______, _______, _______, _______, _______, KC_TRNS, KC_TRNS, KC_RGUI, _______, _______, _______, _______ + ), + [_RAISE] = LAYOUT_ortho_4x12( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_COLN, KC_SCLN, KC_DQT, KC_QUOT, KC_BSLS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, ADJUST, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KC_LGUI, KC_TRNS, KC_TRNS, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT_ortho_4x12( + RGB_VAI, RGB_SAI, RGB_HUI, RGB_MOD, XXXXXXX, RGB_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, + RGB_VAD, RGB_SAD, RGB_HUD, RGB_RMOD, XXXXXXX, XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, + KC_MUTE, KC_VOLD, KC_VOLU, KC_BRID, KC_BRIU, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LANG1, KC_LANG2, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_KANA + ), }; diff --git a/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c b/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c index ac5f2dcef71..c52302aeca6 100644 --- a/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c +++ b/layouts/community/60_ansi_split_bs_rshift/bcat/keymap.c @@ -2,12 +2,12 @@ enum layer { LAYER_DEFAULT, - LAYER_FUNCTION, - LAYER_ADJUST, + LAYER_FUNCTION_1, + LAYER_FUNCTION_2, }; -#define LY_FUNC MO(LAYER_FUNCTION) -#define LY_ADJST MO(LAYER_ADJUST) +#define LY_FN1 MO(LAYER_FUNCTION_1) +#define LY_FN2 MO(LAYER_FUNCTION_2) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Default layer: http://www.keyboard-layout-editor.com/#/gists/327b41b5a933b3d44bf60ca9822e85dc */ @@ -15,25 +15,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, LY_FUNC, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LY_ADJST, KC_APP, KC_RCTL + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, LY_FN1, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LY_FN2, KC_APP, KC_RCTL ), - /* Function layer: http://www.keyboard-layout-editor.com/#/gists/c7a55e75285d474b6301140eaf53f915 */ - [LAYER_FUNCTION] = LAYOUT_60_ansi_split_bs_rshift( + /* Function 1 layer: http://www.keyboard-layout-editor.com/#/gists/c7a55e75285d474b6301140eaf53f915 */ + [LAYER_FUNCTION_1] = LAYOUT_60_ansi_split_bs_rshift( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, + _______, KC_APP, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/6e1068e4f91bbacccaf5ac0acbeec79c */ - [LAYER_ADJUST] = LAYOUT_60_ansi_split_bs_rshift( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, BL_BRTG, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, _______, _______, _______, RGB_VAI, _______, _______, - _______, BL_INC, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, RGB_SPI, RGB_HUI, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_TOG, - _______, BL_DEC, _______, KC_MUTE, _______, _______, _______, RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, + /* Function 2 layer: http://www.keyboard-layout-editor.com/#/gists/6e1068e4f91bbacccaf5ac0acbeec79c */ + [LAYER_FUNCTION_2] = LAYOUT_60_ansi_split_bs_rshift( + _______, KC_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_MPLY, KC_VOLU, KC_MSTP, BL_BRTG, EEP_RST, RESET, _______, _______, _______, RGB_VAI, _______, _______, + _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, BL_INC, _______, RGB_SPI, RGB_HUI, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_TOG, + _______, _______, _______, KC_MUTE, _______, BL_DEC, _______, RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; diff --git a/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md b/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md index d08ddb136d5..645da6cd0bb 100644 --- a/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md +++ b/layouts/community/60_ansi_split_bs_rshift/bcat/readme.md @@ -1,26 +1,24 @@ # bcat's 60% ANSI split backspace/right-shift layout -This is a hybrid of an HHKB layout and a standard ANSI bottom row. It's nice if -you want to fill out a 60% case with no blockers, or just really want a 6.25U -spacebar. The arrow and navigation keys match a standard HHKB layout using the -Fn key next to the right shift key. Additionally, the redundant Fn key on the -bottom row activates an adjust layer with controls for RGB underglow and -backlight, as well as media keys centered around the ESDF cluster. +This is a hybrid of a Tsangan/HHKB layout and a standard ANSI bottom row. It's +not my favorite layout, but it's nice enough if you only have a 6.25u spacebar. +Other than the bottom row, this is identical to my regular [Tsangan +layout](https://github.com/qmk/qmk_firmware/tree/master/layouts/community/60_tsangan_hhkb/bcat). ## Default layer -![Default layer layout](https://i.imgur.com/HM0115k.png) +![Default layer layout](https://i.imgur.com/auP2mWT.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/327b41b5a933b3d44bf60ca9822e85dc)) -## Function layer +## Function 1 layer -![Function layer layout](https://i.imgur.com/3swWxPn.png) +![Function 1 layer layout](https://i.imgur.com/iRNy6Zy.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/c7a55e75285d474b6301140eaf53f915)) -## Adjust layer +## Function 2 layer -![Adjust layer layout](https://i.imgur.com/lQfcnQV.png) +![Function 2 layer layout](https://i.imgur.com/WRvsEuZ.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/6e1068e4f91bbacccaf5ac0acbeec79c)) diff --git a/layouts/community/60_tsangan_hhkb/bcat/keymap.c b/layouts/community/60_tsangan_hhkb/bcat/keymap.c index ab639b05ff9..aa70c913295 100644 --- a/layouts/community/60_tsangan_hhkb/bcat/keymap.c +++ b/layouts/community/60_tsangan_hhkb/bcat/keymap.c @@ -2,12 +2,12 @@ enum layer { LAYER_DEFAULT, - LAYER_FUNCTION, - LAYER_ADJUST, + LAYER_FUNCTION_1, + LAYER_FUNCTION_2, }; -#define LY_FUNC MO(LAYER_FUNCTION) -#define LY_ADJST LT(LAYER_ADJUST, KC_APP) +#define LY_FN1 MO(LAYER_FUNCTION_1) +#define LY_FN2 MO(LAYER_FUNCTION_2) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Default layer: http://www.keyboard-layout-editor.com/#/gists/86b33d75aa6f56d8781ab3d8475f4e77 */ @@ -15,25 +15,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, LY_FUNC, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LY_ADJST, KC_RCTL + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, LY_FN1, + KC_LCTL, LY_FN2, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL ), - /* Function layer: http://www.keyboard-layout-editor.com/#/gists/f6311fd7e315de781143b80eb040a551 */ - [LAYER_FUNCTION] = LAYOUT_60_tsangan_hhkb( + /* Function 1 layer: http://www.keyboard-layout-editor.com/#/gists/f6311fd7e315de781143b80eb040a551 */ + [LAYER_FUNCTION_1] = LAYOUT_60_tsangan_hhkb( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, + _______, KC_APP, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - /* Adjust layer: http://www.keyboard-layout-editor.com/#/gists/65ac939caec878401603bc36290852d4 */ - [LAYER_ADJUST] = LAYOUT_60_tsangan_hhkb( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, BL_BRTG, KC_MPLY, KC_VOLU, KC_MSTP, _______, EEP_RST, RESET, _______, _______, _______, RGB_VAI, _______, _______, - _______, BL_INC, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, RGB_SPI, RGB_HUI, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_TOG, - _______, BL_DEC, _______, KC_MUTE, _______, _______, _______, RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, + /* Function 2 layer: http://www.keyboard-layout-editor.com/#/gists/65ac939caec878401603bc36290852d4 */ + [LAYER_FUNCTION_2] = LAYOUT_60_tsangan_hhkb( + _______, KC_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_MPLY, KC_VOLU, KC_MSTP, BL_BRTG, EEP_RST, RESET, _______, _______, _______, RGB_VAI, _______, _______, + _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, BL_INC, _______, RGB_SPI, RGB_HUI, RGB_SAI, RGB_RMOD, RGB_MOD, RGB_TOG, + _______, _______, _______, KC_MUTE, _______, BL_DEC, _______, RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; diff --git a/layouts/community/60_tsangan_hhkb/bcat/readme.md b/layouts/community/60_tsangan_hhkb/bcat/readme.md index eb6722261e3..b4eddfcf045 100644 --- a/layouts/community/60_tsangan_hhkb/bcat/readme.md +++ b/layouts/community/60_tsangan_hhkb/bcat/readme.md @@ -1,25 +1,44 @@ # bcat's 60% Tsangan HHKB layout -This is a normal Tsangan/HHKB (split backspace, split right shift) layout with -arrow and navigation keys that match a standard HHKB layout. Additionally, the -redundant right Super key on the bottom row actives an adjust layer with -controls for RGB underglow and backlight, as well as media keys centered around -the ESDF cluster. +This is a Tsangan/HHKB (split backspace, split right shift) layout following +the [traditional HHKB layout](https://deskthority.net/wiki/HHKB_Professional2) +with a few changes: + +* The Delete key is mapped as Backspace (HHKB DIP switch 3). + +* The Alt and Super keys are swapped to put Alt directly adjacent to the +spacebar (HHKB DIP switch 5). + +* The left Super key is replaced with another Function key (HHKB DIP switch 2). +Unlike on the real HHKB, this key triggers a different Function 2 layer. (This +also helps prevent accidental Super key presses while gaming.) + +* The Function 2 layer contains reset keys, RGB underglow and backlight +controls (in place of the arrow and navigation keys), and media controls +(centered around the ESDF cluster). + +* The Function 2 layer also has the F1-F12 keys mapped just like the Function 1 +layer. This is a concession to gaming because it enables these keys to be +easily typed with the left hand, without taking the right hand off the mouse. + +* The leftmost and rightmost bottom row keys are mapped to Ctrl rather than +anything more useful because most of my Tsangan PCBs actually have HHKB plates +and/or blockers, so there aren't switches installed in those positions. ## Default layer -![Default layer layout](https://i.imgur.com/et26km2.png) +![Default layer layout](https://i.imgur.com/3tBxms8.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/86b33d75aa6f56d8781ab3d8475f4e77)) -## Function layer +## Function 1 layer -![Function layer layout](https://i.imgur.com/NdJTW9f.png) +![Function l 1ayer layout](https://i.imgur.com/jn4HtA5.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/f6311fd7e315de781143b80eb040a551)) -## Adjust layer +## Function 2 layer -![Adjust layer layout](https://i.imgur.com/XQR4AEf.png) +![Function 2 layer layout](https://i.imgur.com/37APm7c.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/65ac939caec878401603bc36290852d4)) diff --git a/layouts/community/ergodox/333fred/config.h b/layouts/community/ergodox/333fred/config.h index 82255e05ec7..5a91ea3aa4e 100644 --- a/layouts/community/ergodox/333fred/config.h +++ b/layouts/community/ergodox/333fred/config.h @@ -1,7 +1,6 @@ #pragma once #include QMK_KEYBOARD_CONFIG_H -#include "333fred_config.h" #undef TAPPING_TERM #define TAPPING_TERM 200 diff --git a/layouts/community/ergodox/333fred/rules.mk b/layouts/community/ergodox/333fred/rules.mk index 1549bcfc84d..f6c71feb462 100644 --- a/layouts/community/ergodox/333fred/rules.mk +++ b/layouts/community/ergodox/333fred/rules.mk @@ -1,7 +1,5 @@ LCD_BACKLIGHT_ENABLE = yes LCD_ENABLE = yes BACKLIGHT_ENABLE = yes -NKRO_ENABLE = yes KEY_LOCK_ENABLE = yes -TAP_DANCE_ENABLE = yes CONSOLE_ENABLE = no diff --git a/layouts/community/ortho_5x12/333fred/config.h b/layouts/community/ortho_5x12/333fred/config.h index 7835fa1f07d..2e5dfe2e297 100644 --- a/layouts/community/ortho_5x12/333fred/config.h +++ b/layouts/community/ortho_5x12/333fred/config.h @@ -1,7 +1,5 @@ #pragma once -#include "333fred_config.h" - #define USE_SERIAL #define MASTER_LEFT diff --git a/layouts/community/ortho_5x12/333fred/rules.mk b/layouts/community/ortho_5x12/333fred/rules.mk index 0cfb234665e..9a3e2b97e59 100644 --- a/layouts/community/ortho_5x12/333fred/rules.mk +++ b/layouts/community/ortho_5x12/333fred/rules.mk @@ -1,4 +1,2 @@ KEY_LOCK_ENABLE = yes -NKRO_ENABLE = yes CONSOLE_ENABLE = no -TAP_DANCE_ENABLE = yes diff --git a/layouts/default/65_ansi_blocker_split_bs/default_65_ansi_blocker_split_bs/keymap.c b/layouts/default/65_ansi_blocker_split_bs/default_65_ansi_blocker_split_bs/keymap.c new file mode 100644 index 00000000000..34e10d54703 --- /dev/null +++ b/layouts/default/65_ansi_blocker_split_bs/default_65_ansi_blocker_split_bs/keymap.c @@ -0,0 +1,24 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │Bsp│Bsp│Hom│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │  \  │PgU│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │  Enter │PgD│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ Shift  │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift│ ↑ │End│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │Ctrl│GUI │Alt │                        │ Alt│Ctrl│ │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + [0] = LAYOUT_65_ansi_blocker_split_bs( + 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_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ) +}; diff --git a/layouts/default/65_ansi_blocker_split_bs/info.json b/layouts/default/65_ansi_blocker_split_bs/info.json new file mode 100644 index 00000000000..a388086b1e6 --- /dev/null +++ b/layouts/default/65_ansi_blocker_split_bs/info.json @@ -0,0 +1,85 @@ +{ + "keyboard_name": "65% ANSI layout with blocker and split Backspace", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi_blocker_split_bs": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + {"x":15, "y":0}, + + {"x":0, "y":1, "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, "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, "y":2}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15, "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, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + } + } +} diff --git a/layouts/default/65_ansi_blocker_split_bs/layout.json b/layouts/default/65_ansi_blocker_split_bs/layout.json new file mode 100644 index 00000000000..93486ce97dd --- /dev/null +++ b/layouts/default/65_ansi_blocker_split_bs/layout.json @@ -0,0 +1,5 @@ +[{a:7},"","","","","","","","","","","","","","","",""], +[{w:1.5},"","","","","","","","","","","","","",{w:1.5},"",""], +[{w:1.75},"","","","","","","","","","","","",{w:2.25},"",""], +[{w:2.25},"","","","","","","","","","","",{w:1.75},"","",""], +[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"",{w:1.25},"",{w:1.25},"",{x:0.5},"","",""] diff --git a/layouts/default/65_ansi_blocker_split_bs/readme.md b/layouts/default/65_ansi_blocker_split_bs/readme.md new file mode 100644 index 00000000000..7c49f42b953 --- /dev/null +++ b/layouts/default/65_ansi_blocker_split_bs/readme.md @@ -0,0 +1,5 @@ +# 65_ansi_blocker_split_bs + + LAYOUT_65_ansi_blocker_split_bs + +This is the 65% ANSI layout with a blocker next to the arrows and split Backspace. diff --git a/layouts/default/65_ansi_blocker_tsangan/default_65_ansi_blocker_tsangan/keymap.c b/layouts/default/65_ansi_blocker_tsangan/default_65_ansi_blocker_tsangan/keymap.c new file mode 100644 index 00000000000..ed7cec1e17f --- /dev/null +++ b/layouts/default/65_ansi_blocker_tsangan/default_65_ansi_blocker_tsangan/keymap.c @@ -0,0 +1,24 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│Hom│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │  \  │PgU│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │  Enter │PgD│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ Shift  │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift│ ↑ │End│ + * ├─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬─┬───┼───┼───┤ + * │Ctrl │GUI│Alt  │                           │  Alt│ │ ← │ ↓ │ → │ + * └─────┴───┴─────┴───────────────────────────┴─────┘ └───┴───┴───┘ + */ + [0] = LAYOUT_65_ansi_blocker_tsangan( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ) +}; diff --git a/layouts/default/65_ansi_blocker_tsangan/info.json b/layouts/default/65_ansi_blocker_tsangan/info.json new file mode 100644 index 00000000000..cec0ca8134b --- /dev/null +++ b/layouts/default/65_ansi_blocker_tsangan/info.json @@ -0,0 +1,83 @@ +{ + "keyboard_name": "65% ANSI Tsangan layout with blocker", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi_blocker_tsangan": { + "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":15, "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, "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, "y":2}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15, "y":3}, + + {"x":0, "y":4, "w":1.5}, + {"x":1.5, "y":4}, + {"x":2.5, "y":4, "w":1.5}, + {"x":4, "y":4, "w":7}, + {"x":11, "y":4, "w":1.5}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + } + } +} diff --git a/layouts/default/65_ansi_blocker_tsangan/layout.json b/layouts/default/65_ansi_blocker_tsangan/layout.json new file mode 100644 index 00000000000..519b6538520 --- /dev/null +++ b/layouts/default/65_ansi_blocker_tsangan/layout.json @@ -0,0 +1,5 @@ +[{a:7},"","","","","","","","","","","","","",{w:2},"",""], +[{w:1.5},"","","","","","","","","","","","","",{w:1.5},"",""], +[{w:1.75},"","","","","","","","","","","","",{w:2.25},"",""], +[{w:2.25},"","","","","","","","","","","",{w:1.75},"","",""], +[{w:1.5},"","",{w:1.5},"",{w:7},"",{w:1.5},"",{x:0.5},"","",""] diff --git a/layouts/default/65_ansi_blocker_tsangan/readme.md b/layouts/default/65_ansi_blocker_tsangan/readme.md new file mode 100644 index 00000000000..879742fee85 --- /dev/null +++ b/layouts/default/65_ansi_blocker_tsangan/readme.md @@ -0,0 +1,6 @@ +# 65_ansi_blocker_tsangan + + LAYOUT_65_ansi_blocker_tsangan + +This is a Tsangan-inspired 65% ANSI layout with a blocker next to the arrows and 1.5u-1u-1.5u-7u-1.5u bottom row. + \ No newline at end of file diff --git a/lib/python/milc.py b/lib/python/milc.py index 83edfc7f515..eb18984eb3f 100644 --- a/lib/python/milc.py +++ b/lib/python/milc.py @@ -242,15 +242,24 @@ class SubparserWrapper(object): This also stores the default for the argument in `self.cli.default_arguments`. """ - if 'action' in kwargs and kwargs['action'] == 'store_boolean': + if kwargs.get('action') == 'store_boolean': # Store boolean will call us again with the enable/disable flag arguments return handle_store_boolean(self, *args, **kwargs) self.cli.acquire_lock() + argument_name = self.cli.get_argument_name(*args, **kwargs) + self.subparser.add_argument(*args, **kwargs) + + if kwargs.get('action') == 'store_false': + self.cli._config_store_false.append(argument_name) + + if kwargs.get('action') == 'store_true': + self.cli._config_store_true.append(argument_name) + if self.submodule not in self.cli.default_arguments: self.cli.default_arguments[self.submodule] = {} - self.cli.default_arguments[self.submodule][self.cli.get_argument_name(*args, **kwargs)] = kwargs.get('default') + self.cli.default_arguments[self.submodule][argument_name] = kwargs.get('default') self.cli.release_lock() @@ -268,11 +277,13 @@ class MILC(object): # Define some basic info self.acquire_lock() + self._config_store_true = [] + self._config_store_false = [] self._description = None self._entrypoint = None self._inside_context_manager = False self.ansi = ansi_colors - self.arg_only = [] + self.arg_only = {} self.config = self.config_source = None self.config_file = None self.default_arguments = {} @@ -377,7 +388,7 @@ class MILC(object): self.add_argument('--log-file', help='File to write log messages to') self.add_argument('--color', action='store_boolean', default=True, help='color in output') self.add_argument('--config-file', help='The location for the configuration file') - self.arg_only.append('config_file') + self.arg_only['config_file'] = ['general'] def add_subparsers(self, title='Sub-commands', **kwargs): if self._inside_context_manager: @@ -427,17 +438,20 @@ class MILC(object): raise RuntimeError('You must run this before the with statement!') def argument_function(handler): - if 'arg_only' in kwargs and kwargs['arg_only']: + subcommand_name = handler.__name__.replace("_", "-") + + if kwargs.get('arg_only'): arg_name = self.get_argument_name(*args, **kwargs) - self.arg_only.append(arg_name) + if arg_name not in self.arg_only: + self.arg_only[arg_name] = [] + self.arg_only[arg_name].append(subcommand_name) del kwargs['arg_only'] - name = handler.__name__.replace("_", "-") if handler is self._entrypoint: self.add_argument(*args, **kwargs) - elif name in self.subcommands: - self.subcommands[name].add_argument(*args, **kwargs) + elif subcommand_name in self.subcommands: + self.subcommands[subcommand_name].add_argument(*args, **kwargs) else: raise RuntimeError('Decorated function is not entrypoint or subcommand!') @@ -511,35 +525,37 @@ class MILC(object): if argument in ('subparsers', 'entrypoint'): continue - if argument not in self.arg_only: - # Find the argument's section - # Underscores in command's names are converted to dashes during initialization. - # TODO(Erovia) Find a better solution - entrypoint_name = self._entrypoint.__name__.replace("_", "-") - if entrypoint_name in self.default_arguments and argument in self.default_arguments[entrypoint_name]: - argument_found = True - section = self._entrypoint.__name__ - if argument in self.default_arguments['general']: - argument_found = True - section = 'general' - - if not argument_found: - raise RuntimeError('Could not find argument in `self.default_arguments`. This should be impossible!') - exit(1) + # Find the argument's section + # Underscores in command's names are converted to dashes during initialization. + # TODO(Erovia) Find a better solution + entrypoint_name = self._entrypoint.__name__.replace("_", "-") + if entrypoint_name in self.default_arguments and argument in self.default_arguments[entrypoint_name]: + argument_found = True + section = self._entrypoint.__name__ + if argument in self.default_arguments['general']: + argument_found = True + section = 'general' + + if not argument_found: + raise RuntimeError('Could not find argument in `self.default_arguments`. This should be impossible!') + exit(1) + + if argument not in self.arg_only or section not in self.arg_only[argument]: + # Determine the arg value and source + arg_value = getattr(self.args, argument) + if argument in self._config_store_true and arg_value: + passed_on_cmdline = True + elif argument in self._config_store_false and not arg_value: + passed_on_cmdline = True + elif arg_value is not None: + passed_on_cmdline = True + else: + passed_on_cmdline = False # Merge this argument into self.config - if argument in self.default_arguments['general'] or argument in self.default_arguments[entrypoint_name]: - arg_value = getattr(self.args, argument) - if arg_value is not None: - self.config[section][argument] = arg_value - self.config_source[section][argument] = 'argument' - else: - if argument not in self.config[entrypoint_name]: - # Check if the argument exist for this section - arg = getattr(self.args, argument) - if arg is not None: - self.config[section][argument] = arg - self.config_source[section][argument] = 'argument' + if passed_on_cmdline and (argument in self.default_arguments['general'] or argument in self.default_arguments[entrypoint_name] or argument not in self.config[entrypoint_name]): + self.config[section][argument] = arg_value + self.config_source[section][argument] = 'argument' self.release_lock() diff --git a/lib/python/qmk/cli/__init__.py b/lib/python/qmk/cli/__init__.py index eb524217cde..394a1353bc4 100644 --- a/lib/python/qmk/cli/__init__.py +++ b/lib/python/qmk/cli/__init__.py @@ -2,6 +2,8 @@ We list each subcommand here explicitly because all the reliable ways of searching for modules are slow and delay startup. """ +import sys + from milc import cli from . import cformat @@ -19,5 +21,6 @@ from . import new from . import pyformat from . import pytest -if not hasattr(cli, 'config_source'): - cli.log.warning("Your QMK CLI is out of date. Please upgrade with `pip3 install --upgrade qmk` or by using your package manager.") +if sys.version_info[0] != 3 or sys.version_info[1] < 6: + cli.log.error('Your Python is too old! Please upgrade to Python 3.6 or later.') + exit(127) diff --git a/lib/python/qmk/cli/cformat.py b/lib/python/qmk/cli/cformat.py index 536ee30fd85..0cd8b6192a0 100644 --- a/lib/python/qmk/cli/cformat.py +++ b/lib/python/qmk/cli/cformat.py @@ -22,9 +22,8 @@ def cformat_run(files, all_files): cli.log.warn('No changes detected. Use "qmk cformat -a" to format all files') return False if files and all_files: - cli.log.warning('Filenames passed with -a, only formatting: %s', ','.join(cli.args.files)) - # 3.6+: Can remove the str casting, python will cast implicitly - subprocess.run(clang_format + [str(file) for file in files], check=True) + cli.log.warning('Filenames passed with -a, only formatting: %s', ','.join(files)) + subprocess.run(clang_format + [file for file in files], check=True) cli.log.info('Successfully formatted the C code.') except subprocess.CalledProcessError: diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py index 3e6f6fe54ed..3c46248372c 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -135,16 +135,15 @@ def check_udev_rules(): } if udev_dir.exists(): - udev_rules = [str(rule_file) for rule_file in udev_dir.glob('*.rules')] + udev_rules = [rule_file for rule_file in udev_dir.glob('*.rules')] current_rules = set() # Collect all rules from the config files for rule_file in udev_rules: - with open(rule_file, "r") as fd: - for line in fd.readlines(): - line = line.strip() - if not line.startswith("#") and len(line): - current_rules.add(line) + for line in rule_file.read_text().split('\n'): + line = line.strip() + if not line.startswith("#") and len(line): + current_rules.add(line) # Check if the desired rules are among the currently present rules for bootloader, rules in desired_rules.items(): @@ -191,7 +190,7 @@ def is_executable(command): cli.log.debug('Found {fg_cyan}%s', command) return True - cli.log.error("{fg_red}Can't run `%s %s`", (command, version_arg)) + cli.log.error("{fg_red}Can't run `%s %s`", command, version_arg) return False diff --git a/lib/python/qmk/cli/json2c.py b/lib/python/qmk/cli/json2c.py index 46c4d04bb70..52184050707 100755 --- a/lib/python/qmk/cli/json2c.py +++ b/lib/python/qmk/cli/json2c.py @@ -10,29 +10,27 @@ import qmk.path @cli.argument('-o', '--output', arg_only=True, type=qmk.path.normpath, help='File to write to') @cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages") -@cli.argument('filename', arg_only=True, help='Configurator JSON file') +@cli.argument('filename', type=qmk.path.normpath, arg_only=True, help='Configurator JSON file') @cli.subcommand('Creates a keymap.c from a QMK Configurator export.') def json2c(cli): """Generate a keymap.c from a configurator export. This command uses the `qmk.keymap` module to generate a keymap.c from a configurator export. The generated keymap is written to stdout, or to a file if -o is provided. """ - cli.args.filename = qmk.path.normpath(cli.args.filename) - # Error checking if not cli.args.filename.exists(): cli.log.error('JSON file does not exist!') cli.print_usage() exit(1) - if str(cli.args.filename) == '-': + if cli.args.filename.name == '-': # TODO(skullydazed/anyone): Read file contents from STDIN cli.log.error('Reading from STDIN is not (yet) supported.') cli.print_usage() exit(1) # Environment processing - if cli.args.output == ('-'): + if cli.args.output.name == ('-'): cli.args.output = None # Parse the configurator json diff --git a/lib/python/qmk/cli/kle2json.py b/lib/python/qmk/cli/kle2json.py index 3ed6594e0bb..5268462f927 100755 --- a/lib/python/qmk/cli/kle2json.py +++ b/lib/python/qmk/cli/kle2json.py @@ -37,12 +37,12 @@ def kle2json(cli): file_path = Path(os.environ['ORIG_CWD'], cli.args.filename) # Check for valid file_path for more graceful failure if not file_path.exists(): - return cli.log.error('File {fg_cyan}%s{style_reset_all} was not found.', str(file_path)) + return cli.log.error('File {fg_cyan}%s{style_reset_all} was not found.', file_path) out_path = file_path.parent raw_code = file_path.open().read() # Check if info.json exists, allow overwrite with force if Path(out_path, "info.json").exists() and not cli.args.force: - cli.log.error('File {fg_cyan}%s/info.json{style_reset_all} already exists, use -f or --force to overwrite.', str(out_path)) + cli.log.error('File {fg_cyan}%s/info.json{style_reset_all} already exists, use -f or --force to overwrite.', out_path) return False try: # Convert KLE raw to x/y coordinates (using kle2xy package from skullydazed) @@ -69,7 +69,7 @@ def kle2json(cli): # Replace layout in keyboard json keyboard = keyboard.replace('"LAYOUT_JSON_HERE"', layout) # Write our info.json - file = open(str(out_path) + "/info.json", "w") + file = open(out_path + "/info.json", "w") file.write(keyboard) file.close() - cli.log.info('Wrote out {fg_cyan}%s/info.json', str(out_path)) + cli.log.info('Wrote out {fg_cyan}%s/info.json', out_path) diff --git a/lib/python/qmk/cli/new/keymap.py b/lib/python/qmk/cli/new/keymap.py index 5ae26285659..474fe7974f8 100755 --- a/lib/python/qmk/cli/new/keymap.py +++ b/lib/python/qmk/cli/new/keymap.py @@ -40,7 +40,7 @@ def new_keymap(cli): exit(1) # create user directory with default keymap files - shutil.copytree(str(keymap_path_default), str(keymap_path_new), symlinks=True) + shutil.copytree(keymap_path_default, keymap_path_new, symlinks=True) # end message to user cli.log.info("%s keymap directory created in: %s", keymap, keymap_path_new) diff --git a/lib/python/qmk/commands.py b/lib/python/qmk/commands.py index 3424cdf0851..5d2a03c9a8a 100644 --- a/lib/python/qmk/commands.py +++ b/lib/python/qmk/commands.py @@ -5,6 +5,7 @@ import os import platform import subprocess import shlex +import shutil import qmk.keymap @@ -28,11 +29,12 @@ def create_make_command(keyboard, keymap, target=None): A command that can be run to make the specified keyboard and keymap """ make_args = [keyboard, keymap] + make_cmd = 'gmake' if shutil.which('gmake') else 'make' if target: make_args.append(target) - return ['make', ':'.join(make_args)] + return [make_cmd, ':'.join(make_args)] def compile_configurator_json(user_keymap, bootloader=None): diff --git a/lib/python/qmk/keymap.py b/lib/python/qmk/keymap.py index 4aa87de20d9..69cdc8d5b5a 100644 --- a/lib/python/qmk/keymap.py +++ b/lib/python/qmk/keymap.py @@ -1,6 +1,5 @@ """Functions that help you work with QMK keymaps. """ -import os from pathlib import Path import qmk.path @@ -127,7 +126,7 @@ def list_keymaps(keyboard_name): while kb_path != keyboards_dir: keymaps_dir = kb_path / "keymaps" if keymaps_dir.exists(): - names = names.union([keymap for keymap in os.listdir(str(keymaps_dir)) if (keymaps_dir / keymap / "keymap.c").is_file()]) + names = names.union([keymap for keymap in keymaps_dir.iterdir() if (keymaps_dir / keymap / "keymap.c").is_file()]) kb_path = kb_path.parent # if community layouts are supported, get them @@ -135,6 +134,6 @@ def list_keymaps(keyboard_name): for layout in rules_mk["LAYOUTS"].split(): cl_path = Path.cwd() / "layouts" / "community" / layout if cl_path.exists(): - names = names.union([keymap for keymap in os.listdir(str(cl_path)) if (cl_path / keymap / "keymap.c").is_file()]) + names = names.union([keymap for keymap in cl_path.iterdir() if (cl_path / keymap / "keymap.c").is_file()]) return sorted(names) diff --git a/quantum/dip_switch.c b/quantum/dip_switch.c index ab74222d100..66c166ce45d 100644 --- a/quantum/dip_switch.c +++ b/quantum/dip_switch.c @@ -52,13 +52,13 @@ void dip_switch_read(bool forced) { for (uint8_t i = 0; i < NUMBER_OF_DIP_SWITCHES; i++) { dip_switch_state[i] = !readPin(dip_switch_pad[i]); dip_switch_mask |= dip_switch_state[i] << i; - if (last_dip_switch_state[i] ^ dip_switch_state[i] || forced) { + if (last_dip_switch_state[i] != dip_switch_state[i] || forced) { has_dip_state_changed = true; dip_switch_update_kb(i, dip_switch_state[i]); } } if (has_dip_state_changed) { dip_switch_update_mask_kb(dip_switch_mask); + memcpy(last_dip_switch_state, dip_switch_state, sizeof(dip_switch_state)); } - memcpy(last_dip_switch_state, dip_switch_state, sizeof(&dip_switch_state)); } diff --git a/quantum/keymap_extras/keymap_belgian.h b/quantum/keymap_extras/keymap_belgian.h index a6912afef54..c6363a4377c 100644 --- a/quantum/keymap_extras/keymap_belgian.h +++ b/quantum/keymap_extras/keymap_belgian.h @@ -111,7 +111,7 @@ #define BE_8 S(BE_EXLM) // 8 #define BE_9 S(BE_CCED) // 9 #define BE_0 S(BE_AGRV) // 0 -#define BE_RNGA S(BE_RPRN) // ° +#define BE_DEG S(BE_RPRN) // ° #define BE_UNDS S(BE_MINS) // _ // Row 2 #define BE_DIAE S(BE_DCIR) // ¨ (dead) @@ -163,7 +163,7 @@ #define BE_PARA BE_SECT #define BE_MU BE_MICR #define BE_LESS BE_LABK -#define BE_OVRR BE_RNGA +#define BE_OVRR BE_DEG #define BE_UMLT BE_DIAE #define BE_GRTR BE_RABK #define BE_LSBR BE_LBRC diff --git a/quantum/keymap_extras/keymap_bepo.h b/quantum/keymap_extras/keymap_bepo.h index 718baaa6838..ea04aed3c1d 100644 --- a/quantum/keymap_extras/keymap_bepo.h +++ b/quantum/keymap_extras/keymap_bepo.h @@ -1,4 +1,4 @@ -/* Copyright 2016 Didier Loiseau +/* Copyright 2020 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -13,305 +13,393 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -/* Keymap macros for the French BÉPO layout - http://bepo.fr */ -#ifndef KEYMAP_BEPO_H -#define KEYMAP_BEPO_H -#include "keymap.h" - -// Normal characters -// First row (on usual keyboards) -#define BP_DOLLAR KC_GRAVE // $ -#define BP_DLR BP_DOLLAR -#define BP_DOUBLE_QUOTE KC_1 // " -#define BP_DQOT BP_DOUBLE_QUOTE -#define BP_LEFT_GUILLEMET KC_2 // « -#define BP_LGIL BP_LEFT_GUILLEMET -#define BP_RIGHT_GUILLEMET KC_3 // » -#define BP_RGIL BP_RIGHT_GUILLEMET -#define BP_LEFT_PAREN KC_4 // ( -#define BP_LPRN BP_LEFT_PAREN -#define BP_RIGHT_PAREN KC_5 // ) -#define BP_RPRN BP_RIGHT_PAREN -#define BP_AT KC_6 // @ -#define BP_PLUS KC_7 // + -#define BP_MINUS KC_8 // - -#define BP_MINS BP_MINUS -#define BP_SLASH KC_9 // / -#define BP_SLSH BP_SLASH -#define BP_ASTERISK KC_0 // * -#define BP_ASTR BP_ASTERISK -#define BP_EQUAL KC_MINUS // = -#define BP_EQL BP_EQUAL -#define BP_PERCENT KC_EQUAL // % -#define BP_PERC BP_PERCENT - -// Second row -#define BP_B KC_Q -#define BP_E_ACUTE KC_W // é -#define BP_ECUT BP_E_ACUTE -#define BP_P KC_E -#define BP_O KC_R -#define BP_E_GRAVE KC_T // è -#define BP_EGRV BP_E_GRAVE -#define BP_DEAD_CIRCUMFLEX KC_Y // dead ^ -#define BP_DCRC BP_DEAD_CIRCUMFLEX -#define BP_V KC_U -#define BP_D KC_I -#define BP_L KC_O -#define BP_J KC_P -#define BP_Z KC_LBRACKET -#define BP_W KC_RBRACKET - -// Third row -#define BP_A KC_A -#define BP_U KC_S -#define BP_I KC_D -#define BP_E KC_F -#define BP_COMMA KC_G // , -#define BP_COMM BP_COMMA -#define BP_C KC_H -#define BP_T KC_J -#define BP_S KC_K -#define BP_R KC_L -#define BP_N KC_SCOLON -#define BP_M KC_QUOTE -#define BP_C_CEDILLA KC_BSLASH // ç -#define BP_CCED BP_C_CEDILLA - -// Fourth row -#define BP_E_CIRCUMFLEX KC_NONUS_BSLASH // ê -#define BP_ECRC BP_E_CIRCUMFLEX -#define BP_A_GRAVE KC_Z // à -#define BP_AGRV BP_A_GRAVE -#define BP_Y KC_X -#define BP_X KC_C -#define BP_DOT KC_V // . -#define BP_K KC_B -#define BP_APOSTROPHE KC_N -#define BP_APOS BP_APOSTROPHE // ' -#define BP_Q KC_M -#define BP_G KC_COMMA -#define BP_H KC_DOT -#define BP_F KC_SLASH - -// Shifted characters -// First row -#define BP_HASH LSFT(BP_DOLLAR) // # -#define BP_1 LSFT(KC_1) -#define BP_2 LSFT(KC_2) -#define BP_3 LSFT(KC_3) -#define BP_4 LSFT(KC_4) -#define BP_5 LSFT(KC_5) -#define BP_6 LSFT(KC_6) -#define BP_7 LSFT(KC_7) -#define BP_8 LSFT(KC_8) -#define BP_9 LSFT(KC_9) -#define BP_0 LSFT(KC_0) -#define BP_DEGREE LSFT(BP_EQUAL) // ° -#define BP_DEGR BP_DEGREE -#define BP_GRAVE LSFT(BP_PERCENT) // ` -#define BP_GRV BP_GRAVE - -// Second row -#define BP_EXCLAIM LSFT(BP_DEAD_CIRCUMFLEX) // ! -#define BP_EXLM BP_EXCLAIM - -// Third row -#define BP_SCOLON LSFT(BP_COMMA) // ; -#define BP_SCLN BP_SCOLON - -// Fourth row -#define BP_COLON LSFT(BP_DOT) // : -#define BP_COLN BP_COLON -#define BP_QUESTION LSFT(BP_APOS) // ? -#define BP_QEST BP_QUESTION - -// Space bar -#define BP_NON_BREAKING_SPACE LSFT(KC_SPACE) -#define BP_NBSP BP_NON_BREAKING_SPACE +#pragma once -// AltGr-ed characters -// First row -#define BP_EN_DASH ALGR(BP_DOLLAR) // – -#define BP_NDSH BP_EN_DASH -#define BP_EM_DASH ALGR(KC_1) // — -#define BP_MDSH BP_EM_DASH -#define BP_LESS ALGR(KC_2) // < -#define BP_GREATER ALGR(KC_3) // > -#define BP_GRTR BP_GREATER -#define BP_LBRACKET ALGR(KC_4) // [ -#define BP_LBRC BP_LBRACKET -#define BP_RBRACKET ALGR(KC_5) // ] -#define BP_RBRC BP_RBRACKET -#define BP_CIRCUMFLEX ALGR(KC_6) // ^ -#define BP_CIRC BP_CIRCUMFLEX -#define BP_PLUS_MINUS ALGR(KC_7) // ± -#define BP_PSMS BP_PLUS_MINUS -#define BP_MATH_MINUS ALGR(KC_8) // − -#define BP_MMNS BP_MATH_MINUS -#define BP_OBELUS ALGR(KC_9) // ÷ -#define BP_OBEL BP_OBELUS -// more conventional name of the symbol -#define BP_DIVISION_SIGN BP_OBELUS -#define BP_DVSN BP_DIVISION_SIGN -#define BP_TIMES ALGR(KC_0) // × -#define BP_TIMS BP_TIMES -#define BP_DIFFERENT ALGR(BP_EQUAL) // ≠ -#define BP_DIFF BP_DIFFERENT -#define BP_PERMILLE ALGR(BP_PERCENT) // ‰ -#define BP_PMIL BP_PERMILLE - -// Second row -#define BP_PIPE ALGR(BP_B) // | -#define BP_DEAD_ACUTE ALGR(BP_E_ACUTE) // dead ´ -#define BP_DACT BP_DEAD_ACUTE -#define BP_AMPERSAND ALGR(BP_P) // & -#define BP_AMPR BP_AMPERSAND -#define BP_OE_LIGATURE ALGR(BP_O) // œ -#define BP_OE BP_OE_LIGATURE -#define BP_DEAD_GRAVE ALGR(BP_E_GRAVE) // ` -#define BP_DGRV BP_DEAD_GRAVE -#define BP_INVERTED_EXCLAIM ALGR(BP_DEAD_CIRCUMFLEX) // ¡ -#define BP_IXLM BP_INVERTED_EXCLAIM -#define BP_DEAD_CARON ALGR(BP_V) // dead ˇ -#define BP_DCAR BP_DEAD_CARON -#define BP_ETH ALGR(BP_D) // ð -#define BP_DEAD_SLASH ALGR(BP_L) // dead / -#define BP_DSLH BP_DEAD_SLASH -#define BP_IJ_LIGATURE ALGR(BP_J) // ij -#define BP_IJ BP_IJ_LIGATURE -#define BP_SCHWA ALGR(BP_Z) // ə -#define BP_SCWA BP_SCHWA -#define BP_DEAD_BREVE ALGR(BP_W) // dead ˘ -#define BP_DBRV BP_DEAD_BREVE - -// Third row -#define BP_AE_LIGATURE ALGR(BP_A) // æ -#define BP_AE BP_AE_LIGATURE -#define BP_U_GRAVE ALGR(BP_U) // ù -#define BP_UGRV BP_U_GRAVE -#define BP_DEAD_TREMA ALGR(BP_I) // dead ¨ (trema/umlaut/diaresis) -#define BP_DTRM BP_DEAD_TREMA -#define BP_EURO ALGR(BP_E) // € -#define BP_TYPOGRAPHICAL_APOSTROPHE ALGR(BP_COMMA) // ’ -#define BP_TAPO BP_TYPOGRAPHICAL_APOSTROPHE -#define BP_COPYRIGHT ALGR(BP_C) // © -#define BP_CPRT BP_COPYRIGHT -#define BP_THORN ALGR(BP_T) // þ -#define BP_THRN BP_THORN -#define BP_SHARP_S ALGR(BP_S) // ß -#define BP_SRPS BP_SHARP_S -#define BP_REGISTERED_TRADEMARK ALGR(BP_R) // ® -#define BP_RTM BP_REGISTERED_TRADEMARK -#define BP_DEAD_TILDE ALGR(BP_N) // dead ~ -#define BP_DTLD BP_DEAD_TILDE -#define BP_DEAD_MACRON ALGR(BP_M) // dead ¯ -#define BP_DMCR BP_DEAD_MACRON -#define BP_DEAD_CEDILLA ALGR(BP_C_CEDILLA) // dead ¸ -#define BP_DCED BP_DEAD_CEDILLA - -// Fourth row -#define BP_NONUS_SLASH ALGR(BP_E_CIRCUMFLEX) // / on non-us backslash key (102nd key, ê in bépo) -#define BP_NUSL BP_NONUS_SLASH -#define BP_BACKSLASH ALGR(BP_A_GRAVE) /* \ */ -#define BP_BSLS BP_BACKSLASH -#define BP_LEFT_CURLY_BRACE ALGR(BP_Y) // { -#define BP_LCBR BP_LEFT_CURLY_BRACE -#define BP_RIGHT_CURLY_BRACE ALGR(BP_X) // } -#define BP_RCBR BP_RIGHT_CURLY_BRACE -#define BP_ELLIPSIS ALGR(BP_DOT) // … -#define BP_ELPS BP_ELLIPSIS -#define BP_TILDE ALGR(BP_K) // ~ -#define BP_TILD BP_TILDE -#define BP_INVERTED_QUESTION ALGR(BP_QUESTION) // ¿ -#define BP_IQST BP_INVERTED_QUESTION -#define BP_DEAD_RING ALGR(BP_Q) // dead ° -#define BP_DRNG BP_DEAD_RING -#define BP_DEAD_GREEK ALGR(BP_G) // dead Greek key (following key will make a Greek letter) -#define BP_DGRK BP_DEAD_GREEK -#define BP_DAGGER ALGR(BP_H) // † -#define BP_DAGR BP_DAGGER -#define BP_DEAD_OGONEK ALGR(BP_F) // dead ˛ -#define BP_DOGO BP_DEAD_OGONEK - -// Space bar -#define BP_UNDERSCORE ALGR(KC_SPACE) // _ -#define BP_UNDS BP_UNDERSCORE +#include "keymap.h" -// AltGr-Shifted characters (different from capitalised AltGr-ed characters) -// First row -#define BP_PARAGRAPH ALGR(BP_HASH) // ¶ -#define BP_PARG BP_PARAGRAPH -#define BP_LOW_DOUBLE_QUOTE ALGR(BP_1) // „ -#define BP_LWQT BP_LOW_DOUBLE_QUOTE -#define BP_LEFT_DOUBLE_QUOTE ALGR(BP_2) // “ -#define BP_LDQT BP_LEFT_DOUBLE_QUOTE -#define BP_RIGHT_DOUBLE_QUOTE ALGR(BP_3) // ” -#define BP_RDQT BP_RIGHT_DOUBLE_QUOTE -#define BP_LESS_OR_EQUAL ALGR(BP_4) // ≤ -#define BP_LEQL BP_LESS_OR_EQUAL -#define BP_GREATER_OR_EQUAL ALGR(BP_5) // ≥ -#define BP_GEQL BP_GREATER_OR_EQUAL -// nothing on ALGR(BP_6) -#define BP_NEGATION ALGR(BP_7) // ¬ -#define BP_NEGT BP_NEGATION -#define BP_ONE_QUARTER ALGR(BP_8) // ¼ -#define BP_1QRT BP_ONE_QUARTER -#define BP_ONE_HALF ALGR(BP_9) // ½ -#define BP_1HLF BP_ONE_HALF -#define BP_THREE_QUARTERS ALGR(BP_0) // ¾ -#define BP_3QRT BP_THREE_QUARTERS -#define BP_MINUTES ALGR(BP_DEGREE) // ′ -#define BP_MNUT BP_MINUTES -#define BP_SECONDS ALGR(BP_GRAVE) // ″ -#define BP_SCND BP_SECONDS +// clang-format off -// Second row -#define BP_BROKEN_PIPE LSFT(BP_PIPE) // ¦ -#define BP_BPIP BP_BROKEN_PIPE -#define BP_DEAD_DOUBLE_ACUTE LSFT(BP_DEAD_ACUTE) // ˝ -#define BP_DDCT BP_DEAD_DOUBLE_ACUTE -#define BP_SECTION ALGR(LSFT(BP_P)) // § -#define BP_SECT BP_SECTION -// LSFT(BP_DEAD_GRAVE) is actually the same character as LSFT(BP_PERCENT) -#define BP_GRAVE_BIS LSFT(BP_DEAD_GRAVE) // ` -#define BP_GRVB BP_GRAVE_BIS +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ $ │ " │ « │ » │ ( │ ) │ @ │ + │ - │ / │ * │ = │ % │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │ B │ É │ P │ O │ È │ ^ │ V │ D │ L │ J │ Z │ W │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │ A │ U │ I │ E │ , │ C │ T │ S │ R │ N │ M │ Ç │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │ Ê │ À │ Y │ X │ . │ K │ ' │ Q │ G │ H │ F │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define BP_DLR KC_GRV // $ +#define BP_DQUO KC_1 // " +#define BP_LDAQ KC_2 // « +#define BP_RDAQ KC_3 // » +#define BP_LPRN KC_4 // ( +#define BP_RPRN KC_5 // ) +#define BP_AT KC_6 // @ +#define BP_PLUS KC_7 // + +#define BP_MINS KC_8 // - +#define BP_SLSH KC_9 // / +#define BP_ASTR KC_0 // * +#define BP_EQL KC_MINS // = +#define BP_PERC KC_EQL // % +// Row 2 +#define BP_B KC_Q // B +#define BP_EACU KC_W // É +#define BP_P KC_E // P +#define BP_O KC_R // O +#define BP_EGRV KC_T // È +#define BP_DCIR KC_Y // ^ (dead) +#define BP_V KC_U // V +#define BP_D KC_I // D +#define BP_L KC_O // L +#define BP_J KC_P // J +#define BP_Z KC_LBRC // Z +#define BP_W KC_RBRC // W +// Row 3 +#define BP_A KC_A // A +#define BP_U KC_S // U +#define BP_I KC_D // I +#define BP_E KC_F // E +#define BP_COMM KC_G // , +#define BP_C KC_H // C +#define BP_T KC_J // T +#define BP_S KC_K // S +#define BP_R KC_L // R +#define BP_N KC_SCLN // N +#define BP_M KC_QUOT // M +#define BP_CCED KC_BSLS // Ç +// Row 4 +#define BP_ECIR KC_NUBS // Ê +#define BP_AGRV KC_Z // À +#define BP_Y KC_X // Y +#define BP_X KC_C // X +#define BP_DOT KC_V // . +#define BP_K KC_B // K +#define BP_QUOT KC_N // ' +#define BP_Q KC_M // Q +#define BP_G KC_COMM // G +#define BP_H KC_DOT // H +#define BP_F KC_SLSH // F -// Third row -#define BP_DEAD_DOT_ABOVE LSFT(BP_DEAD_TREMA) // dead ˙ -#define BP_DDTA BP_DEAD_DOT_ABOVE -#define BP_DEAD_CURRENCY LSFT(BP_EURO) // dead ¤ (next key will generate a currency code like ¥ or £) -#define BP_DCUR BP_DEAD_CURRENCY -#define BP_DEAD_HORN LSFT(ALGR(BP_COMMA)) // dead ̛ -#define BP_DHRN BP_DEAD_HORN -#define BP_LONG_S LSFT(ALGR(BP_C)) // ſ -#define BP_LNGS BP_LONG_S -#define BP_TRADEMARK LSFT(BP_REGISTERED_TRADEMARK) // ™ -#define BP_TM BP_TRADEMARK -#define BP_ORDINAL_INDICATOR_O LSFT(ALGR(BP_M)) // º -#define BP_ORDO BP_ORDINAL_INDICATOR_O -#define BP_DEAD_COMMA LSFT(BP_DEAD_CEDILLA) // dead ˛ -#define BP_DCOM BP_DEAD_COMMA +/* Shifted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ # │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ° │ ` │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │   │   │   │   │   │ ! │   │   │   │   │   │   │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │   │   │   │   │ ; │   │   │   │   │   │   │   │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │   │   │   │   │ : │   │ ? │   │   │   │   │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define BP_HASH S(BP_DLR) // # +#define BP_1 S(BP_DQUO) // 1 +#define BP_2 S(BP_LDAQ) // 2 +#define BP_3 S(BP_RDAQ) // 3 +#define BP_4 S(BP_LPRN) // 4 +#define BP_5 S(BP_RPRN) // 5 +#define BP_6 S(BP_AT) // 6 +#define BP_7 S(BP_PLUS) // 7 +#define BP_8 S(BP_MINS) // 8 +#define BP_9 S(BP_SLSH) // 9 +#define BP_0 S(BP_ASTR) // 0 +#define BP_DEG S(BP_EQL) // ° +#define BP_GRV S(BP_PERC) // ` +// Row 2 +#define BP_EXLM S(BP_DCIR) // ! +// Row 3 +#define BP_SCLN S(BP_COMM) // ; +// Row 4 +#define BP_COLN S(BP_DOT) // : +#define BP_QUES S(BP_QUOT) // ? +// Row 5 +#define BP_NBSP S(KC_SPC) // (non-breaking space) -// Fourth row -#define BP_LEFT_QUOTE LSFT(ALGR(BP_Y)) // ‘ -#define BP_LQOT BP_LEFT_QUOTE -#define BP_RIGHT_QUOTE LSFT(ALGR(BP_X)) // ’ -#define BP_RQOT BP_RIGHT_QUOTE -#define BP_INTERPUNCT LSFT(ALGR(BP_DOT)) // · -#define BP_IPCT BP_INTERPUNCT -#define BP_DEAD_HOOK_ABOVE LSFT(ALGR(BP_QUESTION)) // dead ̉ -#define BP_DHKA BP_DEAD_HOOK_ABOVE -#define BP_DEAD_UNDERDOT LSFT(BP_DEAD_RING) // dead ̣ -#define BP_DUDT BP_DEAD_UNDERDOT -#define BP_DOUBLE_DAGGER LSFT(BP_DAGGER) // ‡ -#define BP_DDGR BP_DOUBLE_DAGGER -#define BP_ORDINAL_INDICATOR_A LSFT(ALGR(BP_F)) // ª -#define BP_ORDA BP_ORDINAL_INDICATOR_A +/* AltGr symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ – │ — │ < │ > │ [ │ ] │ ^ │ ± │ − │ ÷ │ × │ ≠ │ ‰ │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │ | │ ´ │ & │ Œ │ ` │ ¡ │ ˇ │ Ð │ / │ IJ │ Ə │ ˘ │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │ Æ │ Ù │ ¨ │ € │   │ © │ Þ │ ẞ │ ® │ ~ │ ¯ │ ¸ │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │   │ \ │ { │ } │ … │ ~ │ ¿ │ ° │   │ † │ ˛ │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │           _            │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define BP_NDSH ALGR(BP_DLR) // – +#define BP_MDSH ALGR(BP_DQUO) // — +#define BP_LABK ALGR(BP_LDAQ) // < +#define BP_RABK ALGR(BP_RDAQ) // > +#define BP_LBRC ALGR(BP_LPRN) // [ +#define BP_RBRC ALGR(BP_RPRN) // ] +#define BP_CIRC ALGR(BP_AT) // ^ +#define BP_PLMN ALGR(BP_PLUS) // ± +#define BP_MMNS ALGR(BP_MINS) // − +#define BP_DIV ALGR(BP_SLSH) // ÷ +#define BP_MUL ALGR(BP_ASTR) // × +#define BP_NEQL ALGR(BP_EQL) // ≠ +#define BP_PERM ALGR(BP_PERC) // ‰ +// Row 2 +#define BP_PIPE ALGR(BP_B) // | +#define BP_ACUT ALGR(BP_EACU) // ´ (dead) +#define BP_AMPR ALGR(BP_P) // & +#define BP_OE ALGR(BP_O) // Œ +#define BP_DGRV ALGR(BP_EGRV) // ` (dead) +#define BP_IEXL ALGR(BP_DCIR) // ¡ +#define BP_CARN ALGR(BP_V) // ˇ (dead) +#define BP_ETH ALGR(BP_D) // Ð +#define BP_DSLS ALGR(BP_L) // / (dead) +#define BP_IJ ALGR(BP_J) // IJ +#define BP_SCHW ALGR(BP_Z) // Ə +#define BP_BREV ALGR(BP_W) // ˘ (dead) +// Row 3 +#define BP_AE ALGR(BP_A) // Æ +#define BP_UGRV ALGR(BP_U) // Ù +#define BP_DIAE ALGR(BP_I) // ¨ (dead) +#define BP_EURO ALGR(BP_E) // € +#define BP_COPY ALGR(BP_C) // © +#define BP_THRN ALGR(BP_T) // Þ +#define BP_SS ALGR(BP_S) // ẞ +#define BP_REGD ALGR(BP_R) // ® +#define BP_DTIL ALGR(BP_N) // ~ (dead) +#define BP_MACR ALGR(BP_M) // ¯ (dead) +#define BP_CEDL ALGR(BP_CCED) // ¸ (dead) +// Row 4 +#define BP_BSLS ALGR(BP_AGRV) // (backslash) +#define BP_LCBR ALGR(BP_Y) // { +#define BP_RCBR ALGR(BP_X) // } +#define BP_ELLP ALGR(BP_DOT) // … +#define BP_TILD ALGR(BP_K) // ~ +#define BP_IQUE ALGR(BP_QEST) // ¿ +#define BP_RNGA ALGR(BP_Q) // ° (dead) +#define BP_DGRK ALGR(BP_G) // µ (dead Greek key) +#define BP_DAGG ALGR(BP_H) // † +#define BP_OGON ALGR(BP_F) // ˛ (dead) +// Row 5 +#define BP_UNDS ALGR(KC_SPC) // _ -// Space bar -#define BP_NARROW_NON_BREAKING_SPACE ALGR(BP_NON_BREAKING_SPACE) -#define BP_NNBS BP_NARROW_NON_BREAKING_SPACE +/* Shift+AltGr symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ ¶ │ „ │ “ │ ” │ ≤ │ ≥ │   │ ¬ │ ¼ │ ½ │ ¾ │ ′ │ ″ │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │ ¦ │ ˝ │ § │   │   │   │   │   │   │   │   │   │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │   │   │ ˙ │ ¤ │ ̛  │ ſ │   │   │ ™ │   │ º │ , │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │   │   │ ‘ │ ’ │ · │ ⌨ │ ̉  │ ̣  │   │ ‡ │ ª │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define BP_PARA S(ALGR(BP_DLR)) // ¶ +#define BP_DLQU S(ALGR(BP_DQUO)) // „ +#define BP_LDQU S(ALGR(BP_LDAQ)) // “ +#define BP_RDQU S(ALGR(BP_RDAQ)) // ” +#define BP_LEQL S(ALGR(BP_LPRN)) // ≤ +#define BP_GEQL S(ALGR(BP_RPRN)) // ≥ +#define BP_NOT S(ALGR(BP_PLUS)) // ¬ +#define BP_QRTR S(ALGR(BP_MINS)) // ¼ +#define BP_HALF S(ALGR(BP_SLSH)) // ½ +#define BP_TQTR S(ALGR(BP_ASTR)) // ¾ +#define BP_PRIM S(ALGR(BP_EQL)) // ′ +#define BP_DPRM S(ALGR(BP_PERC)) // ″ +// Row 2 +#define BP_BRKP S(ALGR(BP_B)) // ¦ +#define BP_DACU S(ALGR(BP_EACU)) // ˝ (dead) +#define BP_SECT S(ALGR(BP_P)) // § +// Row 3 +#define BP_DOTA S(ALGR(BP_I)) // ˙ (dead) +#define BP_CURR S(ALGR(BP_E)) // ¤ (dead) +#define BP_HORN S(ALGR(BP_COMM)) // ̛ (dead) +#define BP_LNGS S(ALGR(BP_C)) // ſ +#define BP_TM S(ALGR(BP_R)) // ™ +#define BP_MORD S(ALGR(BP_M)) // º +#define BP_DCMM S(ALGR(BP_CCED)) // , (dead) +// Row 4 +#define BP_LSQU S(ALGR(BP_Y)) // ‘ +#define BP_RSQU S(ALGR(BP_X)) // ’ +#define BP_MDDT S(ALGR(BP_DOT)) // · +#define BP_KEYB S(ALGR(BP_K)) // ⌨ +#define BP_HOKA S(ALGR(BP_QUOT)) // ̉ (dead) +#define BP_DOTB S(ALGR(BP_Q)) // ̣ (dead) +#define BP_DDAG S(ALGR(BP_H)) // ‡ +#define BP_FORD S(ALGR(BP_F)) // ª +// Row 5 +#define BP_NNBS S(ALGR(BP_)) // (narrow non-breaking space) -#endif +// DEPRECATED +#define BP_DOLLAR BP_DLR +#define BP_DOUBLE_QUOTE BP_DQUO +#define BP_DQOT BP_DQUO +#define BP_LEFT_GUILLEMET BP_LDAQ +#define BP_LGIL BP_LDAQ +#define BP_RIGHT_GUILLEMET BP_RDAQ +#define BP_RGIL BP_RDAQ +#define BP_LEFT_PAREN BP_LPRN +#define BP_RIGHT_PAREN BP_RPRN +#define BP_MINUS BP_MINS +#define BP_SLASH BP_SLSH +#define BP_ASTERISK BP_ASTR +#define BP_EQUAL BP_EQL +#define BP_PERCENT BP_PERC +#define BP_E_ACUTE BP_EACU +#define BP_ECUT BP_EACU +#define BP_E_GRAVE BP_EGRV +#define BP_DEAD_CIRCUMFLEX BP_DCIR +#define BP_DCRC BP_DCIR +#define BP_COMMA BP_COMM +#define BP_C_CEDILLA BP_CCED +#define BP_E_CIRCUMFLEX BP_ECIR +#define BP_ECRC BP_ECIR +#define BP_A_GRAVE BP_AGRV +#define BP_APOSTROPHE BP_QUOT +#define BP_APOS BP_QUOT +#define BP_DEGREE BP_DEG +#define BP_DEGR BP_DEG +#define BP_GRAVE BP_GRV +#define BP_EXCLAIM BP_EXLM +#define BP_SCOLON BP_SCLN +#define BP_COLON BP_COLN +#define BP_QUESTION BP_QUES +#define BP_QEST BP_QUES +#define BP_NON_BREAKING_SPACE BP_NBSP +#define BP_EN_DASH BP_NDSH +#define BP_EM_DASH BP_MDSH +#define BP_LESS BP_LABK +#define BP_GREATER BP_RABK +#define BP_GRTR BP_RABK +#define BP_LBRACKET BP_LBRC +#define BP_RBRACKET BP_RBRC +#define BP_CIRCUMFLEX CIRC +#define BP_PLUS_MINUS BP_PLMN +#define BP_PSMS BP_PLMN +#define BP_MATH_MINUS BP_MMNS +#define BP_OBELUS BP_DIV +#define BP_OBEL BP_DIV +#define BP_DIVISION_SIGN BP_DIV +#define BP_DVSN BP_DIV +#define BP_TIMES BP_MUL +#define BP_TIMS BP_MUL +#define BP_DIFFERENT BP_NEQL +#define BP_DIFF BP_NEQL +#define BP_PERMILLE BP_PERM +#define BP_PMIL BP_PERM +#define BP_DEAD_ACUTE BP_ACUT +#define BP_DACT BP_ACUT +#define BP_AMPERSAND BP_AMPR +#define BP_OE_LIGATURE BP_OE +#define BP_DEAD_GRAVE BP_DGRV +#define BP_INVERTED_EXCLAIM BP_IEXL +#define BP_IXLM BP_IEXL +#define BP_DEAD_CARON BP_CARN +#define BP_DCAR BP_CARN +#define BP_DEAD_SLASH BP_DSLS +#define BP_DSLH BP_DSLS +#define BP_IJ_LIGATURE BP_IJ +#define BP_SCHWA BP_SCHW +#define BP_SCWA BP_SCHW +#define BP_DEAD_BREVE BP_BREV +#define BP_DBRV BP_BREV +#define BP_AE_LIGATURE BP_AE +#define BP_U_GRAVE BP_UGRV +#define BP_DEAD_TREMA BP_DIAE +#define BP_DTRM BP_DIAE +#define BP_TYPOGRAPHICAL_APOSTROPHE BP_COMM +#define BP_TAPO BP_COMM +#define BP_COPYRIGHT BP_COPY +#define BP_CPRT BP_COPY +#define BP_THORN BP_THRN +#define BP_SHARP_S BP_SS +#define BP_SRPS BP_SS +#define BP_REGISTERED_TRADEMARK BP_REGD +#define BP_RTM BP_REGD +#define BP_DEAD_TILDE BP_DTIL +#define BP_DTLD BP_DTIL +#define BP_DEAD_MACRON BP_MACR +#define BP_DMCR BP_MACR +#define BP_DEAD_CEDILLA BP_CEDL +#define BP_DCED BP_CEDL +#define BP_NONUS_SLASH BP_SLSH +#define BP_NUSL BP_SLSH +#define BP_BACKSLASH BP_BSLS +#define BP_LEFT_CURLY_BRACE BP_LCBR +#define BP_RIGHT_CURLY_BRACE BP_RCBR +#define BP_ELLIPSIS BP_ELLP +#define BP_ELPS BP_ELLP +#define BP_TILDE BP_TILD +#define BP_INVERTED_QUESTION BP_IQUE +#define BP_IQST BP_IQUE +#define BP_DEAD_RING BP_RNGA +#define BP_DRNG BP_RNGA +#define BP_DEAD_GREEK BP_DGRK +#define BP_DAGGER BP_DAGG +#define BP_DAGR BP_DAGG +#define BP_DEAD_OGONEK BP_OGON +#define BP_DOGO BP_OGON +#define BP_UNDERSCORE BP_UNDS +#define BP_PARAGRAPH BP_PARA +#define BP_PARG BP_PARA +#define BP_LOW_DOUBLE_QUOTE BP_DLQU +#define BP_LWQT BP_DLQU +#define BP_LEFT_DOUBLE_QUOTE BP_RDQU +#define BP_RIGHT_DOUBLE_QUOTE BP_RDQU +#define BP_LESS_OR_EQUAL BP_LEQL +#define BP_GREATER_OR_EQUAL BP_GEQL +#define BP_NEGATION BP_NOT +#define BP_NEGT BP_NOT +#define BP_ONE_QUARTER BP_QRTR +#define BP_1QRT BP_QRTR +#define BP_ONE_HALF BP_HALF +#define BP_1HLF BP_HALF +#define BP_THREE_QUARTERS TQTR +#define BP_3QRT BP_TQTR +#define BP_MINUTES BP_PRIM +#define BP_MNUT BP_PRIM +#define BP_SECONDS BP_DPRM +#define BP_SCND BP_DPRM +#define BP_BROKEN_PIPE BP_BRKP +#define BP_BPIP BP_BRKP +#define BP_DEAD_DOUBLE_ACUTE BP_DACU +#define BP_DDCT BP_DACU +#define BP_SECTION BP_SECT +#define BP_GRAVE_BIS BP_GRV +#define BP_GRVB BP_GRV +#define BP_DEAD_DOT_ABOVE BP_DOTA +#define BP_DDTA BP_DOTA +#define BP_DEAD_CURRENCY BP_CURR +#define BP_DCUR BP_CURR +#define BP_DEAD_HORN BP_HORN +#define BP_DHRN BP_HORN +#define BP_LONG_S BP_LNGS +#define BP_TRADEMARK BP_TM +#define BP_ORDINAL_INDICATOR_O MORD +#define BP_ORDO BP_MORD +#define BP_DEAD_COMMA BP_DCMM +#define BP_DCOM BP_DCMM +#define BP_LEFT_QUOTE BP_LSQU +#define BP_LQOT BP_LSQU +#define BP_RIGHT_QUOTE BP_RSQU +#define BP_RQOT BP_RSQU +#define BP_INTERPUNCT BP_MDDT +#define BP_IPCT BP_MDDT +#define BP_DEAD_HOOK_ABOVE BP_HOKA +#define BP_DHKA BP_HOKA +#define BP_DEAD_UNDERDOT BP_DOTB +#define BP_DUDT BP_DOTB +#define BP_DOUBLE_DAGGER BP_DDAG +#define BP_DDGR BP_DDAG +#define BP_ORDINAL_INDICATOR_A BP_FORD +#define BP_ORDA BP_FORD +#define BP_NARROW_NON_BREAKING_SPACE BP_NNBS diff --git a/quantum/keymap_extras/keymap_fr_ch.h b/quantum/keymap_extras/keymap_fr_ch.h index 8da5ae6aa50..02ee22a12e8 100644 --- a/quantum/keymap_extras/keymap_fr_ch.h +++ b/quantum/keymap_extras/keymap_fr_ch.h @@ -13,97 +13,226 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef KEYMAP_FR_CH -#define KEYMAP_FR_CH -#include "keymap.h" - -// normal characters -#define FR_CH_Z KC_Y -#define FR_CH_Y KC_Z - -#define FR_CH_A KC_A -#define FR_CH_B KC_B -#define FR_CH_C KC_C -#define FR_CH_D KC_D -#define FR_CH_E KC_E -#define FR_CH_F KC_F -#define FR_CH_G KC_G -#define FR_CH_H KC_H -#define FR_CH_I KC_I -#define FR_CH_J KC_J -#define FR_CH_K KC_K -#define FR_CH_L KC_L -#define FR_CH_M KC_M -#define FR_CH_N KC_N -#define FR_CH_O KC_O -#define FR_CH_P KC_P -#define FR_CH_Q KC_Q -#define FR_CH_R KC_R -#define FR_CH_S KC_S -#define FR_CH_T KC_T -#define FR_CH_U KC_U -#define FR_CH_V KC_V -#define FR_CH_W KC_W -#define FR_CH_X KC_X - -#define FR_CH_0 KC_0 -#define FR_CH_1 KC_1 -#define FR_CH_2 KC_2 -#define FR_CH_3 KC_3 -#define FR_CH_4 KC_4 -#define FR_CH_5 KC_5 -#define FR_CH_6 KC_6 -#define FR_CH_7 KC_7 -#define FR_CH_8 KC_8 -#define FR_CH_9 KC_9 +#pragma once -#define FR_CH_DOT KC_DOT -#define FR_CH_COMM KC_COMM +#include "keymap.h" -#define FR_CH_QUOT KC_MINS -#define FR_CH_AE KC_QUOT -#define FR_CH_UE KC_LBRC -#define FR_CH_OE KC_SCLN +// clang-format off -#define FR_CH_CIRC KC_EQL // accent circumflex ^ and grave ` and ~ -#define FR_CH_LESS KC_NUBS // < and > and backslash -#define FR_CH_MINS KC_SLSH // - and _ -#define FR_CH_DLR KC_BSLS // $, £ and } -#define FR_CH_PARA KC_GRV // § and ring ° -#define FR_CH_DIAE KC_RBRC // accent ¨ +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ § │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ' │ ^ │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │ Q │ W │ E │ R │ T │ Z │ U │ I │ O │ P │ è │ ¨ │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │ A │ S │ D │ F │ G │ H │ J │ K │ L │ é │ à │ $ │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │ < │ Y │ X │ C │ V │ B │ N │ M │ , │ . │ - │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define CH_SECT KC_GRV // § +#define CH_1 KC_1 // 1 +#define CH_2 KC_2 // 2 +#define CH_3 KC_3 // 3 +#define CH_4 KC_4 // 4 +#define CH_5 KC_5 // 5 +#define CH_6 KC_6 // 6 +#define CH_7 KC_7 // 7 +#define CH_8 KC_8 // 8 +#define CH_9 KC_9 // 9 +#define CH_0 KC_0 // 0 +#define CH_QUOT KC_MINS // ' +#define CH_CIRC KC_EQL // ^ (dead) +// Row 2 +#define CH_Q KC_Q // Q +#define CH_W KC_W // W +#define CH_E KC_E // E +#define CH_R KC_R // R +#define CH_T KC_T // T +#define CH_Z KC_Y // Z +#define CH_U KC_U // U +#define CH_I KC_I // I +#define CH_O KC_O // O +#define CH_P KC_P // P +#define CH_EGRV KC_LBRC // è +#define CH_DIAE KC_RBRC // ¨ (dead) +// Row 3 +#define CH_A KC_A // A +#define CH_S KC_S // S +#define CH_D KC_D // D +#define CH_F KC_F // F +#define CH_G KC_G // G +#define CH_H KC_H // H +#define CH_J KC_J // J +#define CH_K KC_K // K +#define CH_L KC_L // L +#define CH_EACU KC_SCLN // é +#define CH_AGRV KC_QUOT // à +#define CH_DLR KC_NUHS // $ +// Row 4 +#define CH_LABK KC_NUBS // < +#define CH_Y KC_Z // Y +#define CH_X KC_X // X +#define CH_C KC_C // C +#define CH_V KC_V // V +#define CH_B KC_B // B +#define CH_N KC_N // N +#define CH_M KC_M // M +#define CH_COMM KC_COMM // , +#define CH_DOT KC_DOT // . +#define CH_MINS KC_SLSH // - -// shifted characters -#define FR_CH_RING LSFT(KC_GRV) // ° -#define FR_CH_EXLM LSFT(KC_RBRC) // ! -#define FR_CH_PLUS LSFT(KC_1) // + -#define FR_CH_DQOT LSFT(KC_2) // " -#define FR_CH_ASTR LSFT(KC_3) // * -#define FR_CH_PERC LSFT(KC_5) // % -#define FR_CH_AMPR LSFT(KC_6) // & -#define FR_CH_SLSH LSFT(KC_7) // / -#define FR_CH_LPRN LSFT(KC_8) // ( -#define FR_CH_RPRN LSFT(KC_9) // ) -#define FR_CH_EQL LSFT(KC_0) // = -#define FR_CH_QST LSFT(FR_CH_QUOT) // ? -#define FR_CH_MORE LSFT(FR_CH_LESS) // > -#define FR_CH_COLN LSFT(KC_DOT) // : -#define FR_CH_SCLN LSFT(KC_COMM) // ; -#define FR_CH_UNDS LSFT(FR_CH_MINS) // _ -#define FR_CH_CCED LSFT(KC_4) // ç -#define FR_CH_GRV LSFT(FR_CH_CIRC) // accent grave ` +/* Shifted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ ° │ + │ " │ * │ ç │ % │ & │ / │ ( │ ) │ = │ ? │ ` │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │   │   │   │   │   │   │   │   │   │   │ ü │ ! │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │   │   │   │   │   │   │   │   │   │ ö │ ä │ £ │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │ > │   │   │   │   │   │   │   │ ; │ : │ _ │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define CH_DEG S(CH_SECT) // ° +#define CH_PLUS S(CH_1) // + +#define CH_DQUO S(CH_2) // " +#define CH_ASTR S(CH_3) // * +#define CH_CCED S(CH_4) // ç +#define CH_PERC S(CH_5) // % +#define CH_AMPR S(CH_6) // & +#define CH_SLSH S(CH_7) // / +#define CH_LPRN S(CH_8) // ( +#define CH_RPRN S(CH_9) // ) +#define CH_EQL S(CH_0) // = +#define CH_QUES S(CH_QUOT) // ? +#define CH_GRV S(CH_CIRC) // ` (dead) +// Row 2 +#define CH_UDIA S(CH_EGRV) // ü +#define CH_EXLM S(CH_DIAE) // ! +// Row 3 +#define CH_ODIA S(CH_EACU) // ö +#define CH_ADIA S(CH_AGRV) // ä +#define CH_PND S(CH_DLR) // £ +// Row 4 +#define CH_RABK S(CH_LABK) // > +#define CH_SCLN S(CH_COMM) // ; +#define CH_COLN S(CH_DOT) // : +#define CH_UNDS S(CH_MINS) // _ -// Alt Gr-ed characters -#define FR_CH_LCBR ALGR(KC_QUOT) // { -#define FR_CH_LBRC ALGR(KC_LBRC) // [ -#define FR_CH_RBRC ALGR(KC_9) // ] -#define FR_CH_RCBR ALGR(KC_0) // } -#define FR_CH_BSLS ALGR(FR_CH_LESS) // backslash -#define FR_CH_AT ALGR(KC_2) // @ -#define FR_CH_EURO ALGR(KC_E) // € -#define FR_CH_TILD ALGR(FR_CH_CIRC) // ~ -#define FR_CH_PIPE ALGR(KC_1) // | -#define FR_CH_HASH ALGR(KC_3) // # -#define FR_CH_ACUT ALGR(FR_CH_QUOT) // accent acute ´ +/* AltGr symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │   │ ¦ │ @ │ # │   │   │ ¬ │ | │ ¢ │   │   │ ´ │ ~ │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │   │   │ € │   │   │   │   │   │   │   │ [ │ ] │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │   │   │   │   │   │   │   │   │   │   │ { │ } │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │ \ │   │   │   │   │   │   │   │   │   │   │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define CH_BRKP ALGR(CH_1) // ¦ +#define CH_AT ALGR(CH_2) // @ +#define CH_HASH ALGR(CH_3) // # +#define CH_NOT ALGR(CH_6) // ¬ +#define CH_PIPE ALGR(CH_7) // | +#define CH_CENT ALGR(CH_8) // ¢ +#define CH_ACUT ALGR(CH_QUOT) // ´ (dead) +#define CH_TILD ALGR(CH_CIRC) // ~ (dead) +// Row 2 +#define CH_EURO ALGR(CH_E) // € +#define CH_LBRC ALGR(CH_EGRV) // [ +#define CH_RBRC ALGR(CH_DIAE) // ] +// Row 3 +#define CH_LCBR ALGR(CH_AGRV) // { +#define CH_RCBR ALGR(CH_DLR) // } +// Row 4 +#define CH_BSLS ALGR(CH_LABK) // (backslash) -#endif +// DEPRECATED +#define FR_CH_Z CH_Z +#define FR_CH_Y CH_Y +#define FR_CH_A CH_A +#define FR_CH_B CH_B +#define FR_CH_C CH_C +#define FR_CH_D CH_D +#define FR_CH_E CH_E +#define FR_CH_F CH_F +#define FR_CH_G CH_G +#define FR_CH_H CH_H +#define FR_CH_I CH_I +#define FR_CH_J CH_J +#define FR_CH_K CH_K +#define FR_CH_L CH_L +#define FR_CH_M CH_M +#define FR_CH_N CH_N +#define FR_CH_O CH_O +#define FR_CH_P CH_P +#define FR_CH_Q CH_Q +#define FR_CH_R CH_R +#define FR_CH_S CH_S +#define FR_CH_T CH_T +#define FR_CH_U CH_U +#define FR_CH_V CH_V +#define FR_CH_W CH_W +#define FR_CH_X CH_X +#define FR_CH_0 CH_0 +#define FR_CH_1 CH_1 +#define FR_CH_2 CH_2 +#define FR_CH_3 CH_3 +#define FR_CH_4 CH_4 +#define FR_CH_5 CH_5 +#define FR_CH_6 CH_6 +#define FR_CH_7 CH_7 +#define FR_CH_8 CH_8 +#define FR_CH_9 CH_9 +#define FR_CH_DOT CH_DOT +#define FR_CH_COMM CH_COMM +#define FR_CH_QUOT CH_QUOT +#define FR_CH_AE CH_AGRV +#define FR_CH_UE CH_EGRV +#define FR_CH_OE CH_EACU +#define FR_CH_CIRC CH_CIRC +#define FR_CH_LESS CH_LABK +#define FR_CH_MINS CH_MINS +#define FR_CH_DLR CH_DLR +#define FR_CH_PARA CH_SECT +#define FR_CH_DIAE CH_DIAE +#define FR_CH_RING CH_DEG +#define FR_CH_EXLM CH_EXLM +#define FR_CH_PLUS CH_PLUS +#define FR_CH_DQOT CH_DQUO +#define FR_CH_ASTR CH_ASTR +#define FR_CH_PERC CH_PERC +#define FR_CH_AMPR CH_AMPR +#define FR_CH_SLSH CH_SLSH +#define FR_CH_LPRN CH_LPRN +#define FR_CH_RPRN CH_RPRN +#define FR_CH_EQL CH_EQL +#define FR_CH_QST CH_QUES +#define FR_CH_MORE CH_RABK +#define FR_CH_COLN CH_COLN +#define FR_CH_SCLN CH_SCLN +#define FR_CH_UNDS CH_UNDS +#define FR_CH_CCED CH_CCED +#define FR_CH_GRV CH_GRV +#define FR_CH_LCBR CH_LCBR +#define FR_CH_LBRC CH_LBRC +#define FR_CH_RBRC CH_RBRC +#define FR_CH_RCBR CH_RCBR +#define FR_CH_BSLS CH_BSLS +#define FR_CH_AT CH_AT +#define FR_CH_EURO CH_EURO +#define FR_CH_TILD CH_TILD +#define FR_CH_PIPE CH_PIPE +#define FR_CH_HASH CH_HASH +#define FR_CH_ACUT CH_ACUT diff --git a/quantum/keymap_extras/keymap_french_osx.h b/quantum/keymap_extras/keymap_french_osx.h index 3a231874a42..d0132a2d855 100644 --- a/quantum/keymap_extras/keymap_french_osx.h +++ b/quantum/keymap_extras/keymap_french_osx.h @@ -13,80 +13,248 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef KEYMAP_FRENCH_OSX_H -#define KEYMAP_FRENCH_OSX_H -#include "keymap.h" - -// Normal characters -#define FR_AT KC_GRV -#define FR_AMP KC_1 -#define FR_EACU KC_2 -#define FR_QUOT KC_3 -#define FR_APOS KC_4 -#define FR_LPRN KC_5 -#define FR_SECT KC_6 -#define FR_EGRV KC_7 -#define FR_EXLM KC_8 -#define FR_CCED KC_9 -#define FR_AGRV KC_0 -#define FR_RPRN KC_MINS -#define FR_MINS KC_EQL - -#define FR_A KC_Q -#define FR_Z KC_W -#define FR_CIRC KC_LBRC -#define FR_DLR KC_RBRC - -#define FR_Q KC_A -#define FR_M KC_SCLN -#define FR_UGRV KC_QUOT -#define FR_GRV KC_NUHS - -#define FR_LESS KC_NUBS -#define FR_W KC_Z -#define FR_COMM KC_M -#define FR_SCLN KC_COMM -#define FR_COLN KC_DOT -#define FR_EQL KC_SLSH +#pragma once -// Shifted characters -#define FR_HASH LSFT(KC_GRV) -#define FR_1 LSFT(KC_1) -#define FR_2 LSFT(KC_2) -#define FR_3 LSFT(KC_3) -#define FR_4 LSFT(KC_4) -#define FR_5 LSFT(KC_5) -#define FR_6 LSFT(KC_6) -#define FR_7 LSFT(KC_7) -#define FR_8 LSFT(KC_8) -#define FR_9 LSFT(KC_9) -#define FR_0 LSFT(KC_0) -#define FR_UNDS LSFT(FR_MINS) +#include "keymap.h" -#define FR_UMLT LSFT(FR_CIRC) -#define FR_ASTR LSFT(FR_DLR) +// clang-format off -#define FR_PERC LSFT(FR_UGRV) -#define FR_PND LSFT(FR_GRV) +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ + * │ @ │ & │ é │ " │ ' │ ( │ § │ è │ ! │ ç │ à │ ) │ - │     │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ + * │     │ A │ Z │ E │ R │ T │ Y │ U │ I │ O │ P │ ^ │ $ │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐  │ + * │      │ Q │ S │ D │ F │ G │ H │ J │ K │ L │ M │ ù │ ` │  │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ + * │    │ < │ W │ X │ C │ V │ B │ N │ , │ ; │ : │ = │        │ + * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ + * │     │    │     │                       │     │    │     │ + * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ + */ +// Row 1 +#define FR_AT KC_GRV // @ +#define FR_AMPR KC_1 // & +#define FR_LEAC KC_2 // é +#define FR_DQUO KC_3 // " +#define FR_QUOT KC_4 // ' +#define FR_LPRN KC_5 // ( +#define FR_SECT KC_6 // § +#define FR_LEGR KC_7 // è +#define FR_EXLM KC_8 // ! +#define FR_LCCE KC_9 // ç +#define FR_LAGR KC_0 // à +#define FR_RPRN KC_MINS // ) +#define FR_MINS KC_EQL // - +// Row 2 +#define FR_A KC_Q // A +#define FR_Z KC_W // Z +#define FR_E KC_E // E +#define FR_R KC_R // R +#define FR_T KC_T // T +#define FR_Y KC_Y // Y +#define FR_U KC_U // U +#define FR_I KC_I // I +#define FR_O KC_O // O +#define FR_P KC_P // P +#define FR_CIRC KC_LBRC // ^ +#define FR_DLR KC_RBRC // $ +// Row 3 +#define FR_Q KC_A // Q +#define FR_S KC_S // S +#define FR_D KC_D // D +#define FR_F KC_F // F +#define FR_G KC_G // G +#define FR_H KC_H // H +#define FR_J KC_J // J +#define FR_K KC_K // K +#define FR_L KC_L // L +#define FR_M KC_SCLN // M +#define FR_LUGR KC_QUOT // ù +#define FR_GRV KC_NUHS // ` +// Row 4 +#define FR_LABK KC_NUBS // < +#define FR_W KC_Z // W +#define FR_X KC_X // X +#define FR_C KC_C // C +#define FR_V KC_V // V +#define FR_B KC_B // B +#define FR_N KC_N // N +#define FR_COMM KC_M // , +#define FR_SCLN KC_COMM // ; +#define FR_COLN KC_DOT // : +#define FR_EQL KC_SLSH // = -#define FR_GRTR LSFT(FR_LESS) -#define FR_QUES LSFT(FR_COMM) -#define FR_DOT LSFT(FR_SCLN) -#define FR_SLSH LSFT(FR_COLN) -#define FR_PLUS LSFT(FR_EQL) +/* Shifted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ + * │ # │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ° │ _ │     │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ + * │     │   │   │   │   │   │   │   │   │   │   │ ¨ │ * │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐  │ + * │      │   │   │   │   │   │   │   │   │   │   │ % │ £ │  │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ + * │    │ > │   │   │   │   │   │   │ ? │ . │ / │ + │        │ + * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ + * │     │    │     │                       │     │    │     │ + * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ + */ +// Row 1 +#define FR_HASH S(FR_AT) // # +#define FR_1 S(FR_AMPR) // 1 +#define FR_2 S(FR_LEAC) // 2 +#define FR_3 S(FR_DQUO) // 3 +#define FR_4 S(FR_QUOT) // 4 +#define FR_5 S(FR_LPRN) // 5 +#define FR_6 S(FR_SECT) // 6 +#define FR_7 S(FR_LEGR) // 7 +#define FR_8 S(FR_EXLM) // 8 +#define FR_9 S(FR_LCCE) // 9 +#define FR_0 S(FR_LAGR) // 0 +#define FR_DEG S(FR_RPRN) // ° +#define FR_UNDS S(FR_MINS) // _ +// Row 2 +#define FR_DIAE S(FR_CIRC) // ¨ (dead) +#define FR_ASTR S(FR_DLR) // * +// Row 3 +#define FR_PERC S(FR_LUGR) // % +#define FR_PND S(FR_GRV) // £ +// Row 4 +#define FR_RABK S(FR_LABK) // > +#define FR_QUES S(FR_COMM) // ? +#define FR_DOT S(FR_SCLN) // . +#define FR_SLSH S(FR_COLN) // / +#define FR_PLUS S(FR_EQL) // + -// Alted characters -#define FR_LCBR LALT(KC_5) -#define FR_RCBR LALT(FR_RPRN) -#define FR_EURO LALT(KC_E) -#define FR_BULT LALT(FR_DLR) -#define FR_TILD LALT(KC_N) +/* Alted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ + * │ • │  │ ë │ “ │ ‘ │ { │ ¶ │ « │ ¡ │ Ç │ Ø │ } │ — │     │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ + * │     │ Æ │ Â │ Ê │ ® │ † │ Ú │ º │ î │ Œ │ π │ Ô │ € │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐  │ + * │      │ ‡ │ Ò │ ∂ │ ƒ │ fi │ Ì │ Ï │ È │ ¬ │ µ │ Ù │   │  │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ + * │    │ ≤ │ ‹ │ ≈ │ © │ ◊ │ ß │ ~ │ ∞ │ … │ ÷ │ ≠ │        │ + * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ + * │     │    │     │                       │     │    │     │ + * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ + */ +// Row 1 +#define FR_BULT A(FR_AT) // • +#define FR_APPL A(FR_AMPR) //  (Apple logo) +#define FR_LEDI A(FR_LEAC) // ë +#define FR_LDQU A(FR_DQUO) // “ +#define FR_LSQU A(FR_QUOT) // ‘ +#define FR_LCBR A(FR_LPRN) // { +#define FR_PILC A(FR_SECT) // ¶ +#define FR_LDAQ A(FR_LEGR) // « +#define FR_IEXL A(FR_EXLM) // ¡ +#define FR_CCCE A(FR_LCCE) // Ç +#define FR_OSTR A(FR_LAGR) // Ø +#define FR_RCBR A(FR_RPRN) // } +#define FR_MDSH A(FR_MINS) // — +// Row 2 +#define FR_AE A(FR_A) // Æ +#define FR_CACI A(FR_Z) //  +#define FR_ECIR A(FR_E) // Ê +#define FR_REGD A(FR_R) // ® +#define FR_DAGG A(FR_T) // † +#define FR_CUAC A(FR_Y) // Ú +#define FR_MORD A(FR_U) // º +#define FR_LICI A(FR_I) // î +#define FR_OE A(FR_O) // Œ +#define FR_PI A(FR_P) // π +#define FR_OCIR A(FR_CIRC) // Ô +#define FR_EURO A(FR_DLR) // € +// Row 3 +#define FR_DDAG A(FR_Q) // ‡ +#define FR_COGR A(FR_S) // Ò +#define FR_PDIF A(FR_D) // ∂ +#define FR_FHK A(FR_F) // ƒ +#define FR_FI A(FR_G) // fi +#define FR_CIGR A(FR_H) // Ì +#define FR_CIDI A(FR_J) // Ï +#define FR_CEGR A(FR_K) // È +#define FR_NOT A(FR_L) // ¬ +#define FR_MICR A(FR_M) // µ +#define FR_CUGR A(FR_LUGR) // Ù +// Row 4 +#define FR_LTEQ A(FR_LABK) // ≤ +#define FR_LSAQ A(FR_W) // ‹ +#define FR_AEQL A(FR_X) // ≈ +#define FR_COPY A(FR_C) // © +#define FR_LOZN A(FR_V) // ◊ +#define FR_SS A(FR_B) // ß +#define FR_TILD A(FR_N) // ~ (dead) +#define FR_INFN A(FR_COMM) // ∞ +#define FR_ELLP A(FR_SCLN) // … +#define FR_DIV A(FR_COLN) // ÷ +#define FR_NEQL A(FR_EQL) // ≠ -// Shift+Alt-ed characters -#define FR_LBRC LSFT(LALT(KC_5)) -#define FR_RBRC LSFT(LALT(FR_RPRN)) -#define FR_PIPE LSFT(LALT(KC_L)) -#define FR_BSLS LSFT(LALT(FR_COLN)) +/* Shift+Alted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ + * │ Ÿ │ ´ │ „ │   │   │ [ │ å │ » │ Û │ Á │   │ ] │ – │     │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ + * │     │   │ Å │   │ ‚ │ ™ │   │ ª │ ï │   │ ∏ │   │ ¥ │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐  │ + * │      │ Ω │ ∑ │ ∆ │ · │ fl │ Î │ Í │ Ë │ | │ Ó │ ‰ │   │  │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ + * │    │ ≥ │ › │ ⁄ │ ¢ │ √ │ ∫ │ ı │ ¿ │   │ \ │ ± │        │ + * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ + * │     │    │     │                       │     │    │     │ + * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ + */ +// Row 1 +#define FR_CYDI S(A(FR_AT)) // Ÿ +#define FR_ACUT S(A(FR_AMPR)) // ´ (dead) +#define FR_DLQU S(A(FR_LEAC)) // „ +#define FR_LBRC S(A(FR_LPRN)) // [ +#define FR_LARI S(A(FR_SECT)) // å +#define FR_RDAQ S(A(FR_LEGR)) // » +#define FR_CUCI S(A(FR_EXLM)) // Û +#define FR_CAAC S(A(FR_LCCE)) // Á +#define FR_RBRC S(A(FR_RPRN)) // ] +#define FR_NDSH S(A(FR_MINS)) // – +// Row 2 +#define FR_CARI S(A(FR_Z)) // Å +#define FR_SLQU S(A(FR_R)) // ‚ +#define FR_TM S(A(FR_T)) // ™ +#define FR_FORD S(A(FR_U)) // ª +#define FR_LIDI S(A(FR_I)) // ï +#define FR_NARP S(A(FR_P)) // ∏ +#define FR_YEN S(A(FR_DLR)) // ¥ +// Row 3 +#define FR_OMEG S(A(FR_Q)) // Ω +#define FR_NARS S(A(FR_S)) // ∑ +#define FR_INCR S(A(FR_D)) // ∆ +#define FR_MDDT S(A(FR_F)) // · +#define FR_FL S(A(FR_G)) // fl +#define FR_CICI S(A(FR_H)) // Î +#define FR_CIAC S(A(FR_J)) // Í +#define FR_CEDI S(A(FR_K)) // Ë +#define FR_PIPE S(A(FR_L)) // | +#define FR_COAC S(A(FR_M)) // Ó +#define FR_PERM S(A(FR_LUGR)) // ‰ +// Row 4 +#define FR_GTEQ S(A(FR_LABK)) // ≥ +#define FR_LSAQ S(A(FR_W)) // › +#define FR_FRSL S(A(FR_X)) // ⁄ +#define FR_CENT S(A(FR_C)) // ¢ +#define FR_SQRT S(A(FR_V)) // √ +#define FR_INTG S(A(FR_B)) // ∫ +#define FR_DLSI S(A(FR_N)) // ı +#define FR_IQUE S(A(FR_COMM)) // ¿ +#define FR_BSLS S(A(FR_COLN)) // (backslash) +#define FR_PLMN S(A(FR_EQL)) // ± -#endif +// DEPRECATED +#define FR_AMP FR_AMPR +#define FR_EACU FR_LEAC +#define FR_APOS FR_QUOT +#define FR_EGRV FR_LEGR +#define FR_CCED FR_LCCE +#define FR_AGRV FR_LAGR +#define FR_UGRV FR_LUGR +#define FR_LESS FR_LABK +#define FR_UMLT FR_DIAE +#define FR_GRTR FR_RABK diff --git a/quantum/keymap_extras/keymap_german_ch.h b/quantum/keymap_extras/keymap_german_ch.h index 19b3627587d..07f4503a14b 100644 --- a/quantum/keymap_extras/keymap_german_ch.h +++ b/quantum/keymap_extras/keymap_german_ch.h @@ -13,105 +13,170 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef KEYMAP_SWISS_GERMAN -#define KEYMAP_SWISS_GERMAN + +#pragma once #include "keymap.h" -// normal characters -#define CH_Z KC_Y -#define CH_Y KC_Z +// clang-format off -#define CH_A KC_A -#define CH_B KC_B -#define CH_C KC_C -#define CH_D KC_D -#define CH_E KC_E -#define CH_F KC_F -#define CH_G KC_G #ifdef CH_H // The ChibiOS ch.h file defines this... # undef CH_H #endif -#define CH_H KC_H -#define CH_I KC_I -#define CH_J KC_J -#define CH_K KC_K -#define CH_L KC_L -#define CH_M KC_M -#define CH_N KC_N -#define CH_O KC_O -#define CH_P KC_P -#define CH_Q KC_Q -#define CH_R KC_R -#define CH_S KC_S -#define CH_T KC_T -#define CH_U KC_U -#define CH_V KC_V -#define CH_W KC_W -#define CH_X KC_X - -#define CH_0 KC_0 -#define CH_1 KC_1 -#define CH_2 KC_2 -#define CH_3 KC_3 -#define CH_4 KC_4 -#define CH_5 KC_5 -#define CH_6 KC_6 -#define CH_7 KC_7 -#define CH_8 KC_8 -#define CH_9 KC_9 - -#define CH_DOT KC_DOT -#define CH_COMM KC_COMM - -#define CH_QUOT KC_MINS // ' ? ´ -#define CH_AE KC_QUOT -#define CH_UE KC_LBRC -#define CH_OE KC_SCLN -#define CH_PARA KC_GRAVE // secction sign § and ° -#define CH_CARR KC_EQL // carret ^ ` ~ -#define CH_DIER KC_RBRC // dieresis ¨ ! ] -#define CH_DLR KC_BSLS // $ £ } -#define CH_LESS KC_NUBS // < and > and backslash -#define CH_MINS KC_SLSH // - and _ +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ § │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ' │ ^ │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │ Q │ W │ E │ R │ T │ Z │ U │ I │ O │ P │ ü │ ¨ │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ö │ ä │ $ │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │ < │ Y │ X │ C │ V │ B │ N │ M │ , │ . │ - │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define CH_SECT KC_GRV // § +#define CH_1 KC_1 // 1 +#define CH_2 KC_2 // 2 +#define CH_3 KC_3 // 3 +#define CH_4 KC_4 // 4 +#define CH_5 KC_5 // 5 +#define CH_6 KC_6 // 6 +#define CH_7 KC_7 // 7 +#define CH_8 KC_8 // 8 +#define CH_9 KC_9 // 9 +#define CH_0 KC_0 // 0 +#define CH_QUOT KC_MINS // ' +#define CH_CIRC KC_EQL // ^ (dead) +// Row 2 +#define CH_Q KC_Q // Q +#define CH_W KC_W // W +#define CH_E KC_E // E +#define CH_R KC_R // R +#define CH_T KC_T // T +#define CH_Z KC_Y // Z +#define CH_U KC_U // U +#define CH_I KC_I // I +#define CH_O KC_O // O +#define CH_P KC_P // P +#define CH_UDIA KC_LBRC // ü +#define CH_DIAE KC_RBRC // ¨ (dead) +// Row 3 +#define CH_A KC_A // A +#define CH_S KC_S // S +#define CH_D KC_D // D +#define CH_F KC_F // F +#define CH_G KC_G // G +#define CH_H KC_H // H +#define CH_J KC_J // J +#define CH_K KC_K // K +#define CH_L KC_L // L +#define CH_ODIA KC_SCLN // ö +#define CH_ADIA KC_QUOT // ä +#define CH_DLR KC_NUHS // $ +// Row 4 +#define CH_LABK KC_NUBS // < +#define CH_Y KC_Z // Y +#define CH_X KC_X // X +#define CH_C KC_C // C +#define CH_V KC_V // V +#define CH_B KC_B // B +#define CH_N KC_N // N +#define CH_M KC_M // M +#define CH_COMM KC_COMM // , +#define CH_DOT KC_DOT // . +#define CH_MINS KC_SLSH // - -// shifted characters -#define CH_RING LSFT(CH_PARA) // ° -#define CH_PLUS LSFT(KC_1) // + -#define CH_DQOT LSFT(KC_2) // " -#define CH_PAST LSFT(KC_3) // * -#define CH_CELA LSFT(KC_4) // ç -#define CH_PERC LSFT(KC_5) // % -#define CH_AMPR LSFT(KC_6) // & -#define CH_SLSH LSFT(KC_7) // / -#define CH_LPRN LSFT(KC_8) // ( -#define CH_RPRN LSFT(KC_9) // ) -#define CH_EQL LSFT(KC_0) // = -#define CH_QST LSFT(CH_QUOT) // ? -#define CH_GRV LSFT(CH_CARR) // ` -#define CH_EXLM LSFT(CH_DIER) // ! -#define CH_POND LSFT(CH_DLR) // £ -#define CH_MORE LSFT(CH_LESS) // > -#define CH_COLN LSFT(KC_DOT) // : -#define CH_SCLN LSFT(KC_COMM) // ; -#define CH_UNDS LSFT(CH_MINS) // _ +/* Shifted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ ° │ + │ " │ * │ ç │ % │ & │ / │ ( │ ) │ = │ ? │ ` │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │   │   │   │   │   │   │   │   │   │   │ è │ ! │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │   │   │   │   │   │   │   │   │   │ é │ à │ £ │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │ > │   │   │   │   │   │   │   │ ; │ : │ _ │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define CH_DEG S(CH_SECT) // ° +#define CH_PLUS S(CH_1) // + +#define CH_DQUO S(CH_2) // " +#define CH_ASTR S(CH_3) // * +#define CH_CCED S(CH_4) // ç +#define CH_PERC S(CH_5) // % +#define CH_AMPR S(CH_6) // & +#define CH_SLSH S(CH_7) // / +#define CH_LPRN S(CH_8) // ( +#define CH_RPRN S(CH_9) // ) +#define CH_EQL S(CH_0) // = +#define CH_QUES S(CH_QUOT) // ? +#define CH_GRV S(CH_CIRC) // ` (dead) +// Row 2 +#define CH_EGRV S(CH_UDIA) // è +#define CH_EXLM S(CH_DIAE) // ! +// Row 3 +#define CH_EACU S(CH_ODIA) // é +#define CH_AGRV S(CH_ADIA) // à +#define CH_PND S(CH_DLR) // £ +// Row 4 +#define CH_RABK S(CH_LABK) // > +#define CH_SCLN S(CH_COMM) // ; +#define CH_COLN S(CH_DOT) // : +#define CH_UNDS S(CH_MINS) // _ -// Alt Gr-ed characters -#define CH_BRBR ALGR(KC_1) // ¦ brocken bar -#define CH_AT ALGR(KC_2) // @ -#define CH_HASH ALGR(KC_3) // # -#define CH_NOTL ALGR(KC_6) // ¬ negative logic -#define CH_PIPE ALGR(KC_7) // | -#define CH_CENT ALGR(KC_8) // ¢ cent -#define CH_ACUT ALGR(CH_QUOT) // ´ -#define CH_TILD ALGR(CH_CARR) // ~ -#define CH_EURO ALGR(KC_E) // € -#define CH_LBRC ALGR(CH_UE) // [ -#define CH_RBRC ALGR(CH_DIER) // ] -#define CH_LCBR ALGR(CH_AE) // { -#define CH_RCBR ALGR(CH_DLR) // } -#define CH_BSLS ALGR(CH_LESS) // backslash +/* AltGr symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │   │ ¦ │ @ │ # │   │   │ ¬ │ | │ ¢ │   │   │ ´ │ ~ │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │   │   │ € │   │   │   │   │   │   │   │ [ │ ] │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │   │   │   │   │   │   │   │   │   │   │ { │ } │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │ \ │   │   │   │   │   │   │   │   │   │   │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define CH_BRKP ALGR(CH_1) // ¦ +#define CH_AT ALGR(CH_2) // @ +#define CH_HASH ALGR(CH_3) // # +#define CH_NOT ALGR(CH_6) // ¬ +#define CH_PIPE ALGR(CH_7) // | +#define CH_CENT ALGR(CH_8) // ¢ +#define CH_ACUT ALGR(CH_QUOT) // ´ (dead) +#define CH_TILD ALGR(CH_CIRC) // ~ (dead) +// Row 2 +#define CH_EURO ALGR(CH_E) // € +#define CH_LBRC ALGR(CH_UDIA) // [ +#define CH_RBRC ALGR(CH_DIAE) // ] +// Row 3 +#define CH_LCBR ALGR(CH_ADIA) // { +#define CH_RCBR ALGR(CH_DLR) // } +// Row 4 +#define CH_BSLS ALGR(CH_LABK) // (backslash) -#endif +// DEPRECATED +#define CH_AE CH_ADIA +#define CH_UE CH_UDIA +#define CH_OE CH_ODIA +#define CH_PARA CH_SECT +#define CH_CARR CH_CIRC +#define CH_DIER CH_DIAE +#define CH_LESS CH_LABK +#define CH_RING CH_DEG +#define CH_DQOT CH_DQUO +#define CH_PAST CH_ASTR +#define CH_CELA CH_CCED +#define CH_QST CH_QUES +#define CH_POND CH_PND +#define CH_MORE CH_RABK +#define CH_BRBR CH_BRKP +#define CH_NOTL CH_NOT diff --git a/quantum/keymap_extras/keymap_german_osx.h b/quantum/keymap_extras/keymap_german_osx.h index 29dee07ee03..0d15532e40e 100644 --- a/quantum/keymap_extras/keymap_german_osx.h +++ b/quantum/keymap_extras/keymap_german_osx.h @@ -13,100 +13,311 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef KEYMAP_GERMAN_OSX -#define KEYMAP_GERMAN_OSX -#include "keymap.h" - -// Alt gr +#pragma once -// normal characters -#define DE_OSX_Z KC_Y -#define DE_OSX_Y KC_Z +#include "keymap.h" -#define DE_OSX_A KC_A -#define DE_OSX_B KC_B -#define DE_OSX_C KC_C -#define DE_OSX_D KC_D -#define DE_OSX_E KC_E -#define DE_OSX_F KC_F -#define DE_OSX_G KC_G -#define DE_OSX_H KC_H -#define DE_OSX_I KC_I -#define DE_OSX_J KC_J -#define DE_OSX_K KC_K -#define DE_OSX_L KC_L -#define DE_OSX_M KC_M -#define DE_OSX_N KC_N -#define DE_OSX_O KC_O -#define DE_OSX_P KC_P -#define DE_OSX_Q KC_Q -#define DE_OSX_R KC_R -#define DE_OSX_S KC_S -#define DE_OSX_T KC_T -#define DE_OSX_U KC_U -#define DE_OSX_V KC_V -#define DE_OSX_W KC_W -#define DE_OSX_X KC_X +// clang-format off -#define DE_OSX_0 KC_0 -#define DE_OSX_1 KC_1 -#define DE_OSX_2 KC_2 -#define DE_OSX_3 KC_3 -#define DE_OSX_4 KC_4 -#define DE_OSX_5 KC_5 -#define DE_OSX_6 KC_6 -#define DE_OSX_7 KC_7 -#define DE_OSX_8 KC_8 -#define DE_OSX_9 KC_9 +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ + * │ ^ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ß │ ´ │     │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ + * │     │ Q │ W │ E │ R │ T │ Z │ U │ I │ O │ P │ Ü │ + │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐  │ + * │      │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ö │ Ä │ # │  │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ + * │    │ < │ Y │ X │ C │ V │ B │ N │ M │ , │ . │ - │        │ + * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ + * │     │    │     │                       │     │    │     │ + * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ + */ +// Row 1 +#define DE_CIRC KC_GRV // ^ (dead) +#define DE_1 KC_1 // 1 +#define DE_2 KC_2 // 2 +#define DE_3 KC_3 // 3 +#define DE_4 KC_4 // 4 +#define DE_5 KC_5 // 5 +#define DE_6 KC_6 // 6 +#define DE_7 KC_7 // 7 +#define DE_8 KC_8 // 8 +#define DE_9 KC_9 // 9 +#define DE_0 KC_0 // 0 +#define DE_SS KC_MINS // ß +#define DE_ACUT KC_EQL // ´ (dead) +// Row 2 +#define DE_Q KC_Q // Q +#define DE_W KC_W // W +#define DE_E KC_E // E +#define DE_R KC_R // R +#define DE_T KC_T // T +#define DE_Z KC_Y // Z +#define DE_U KC_U // U +#define DE_I KC_I // I +#define DE_O KC_O // O +#define DE_P KC_P // P +#define DE_UDIA KC_LBRC // Ü +#define DE_PLUS KC_RBRC // + +// Row 3 +#define DE_A KC_A // A +#define DE_S KC_S // S +#define DE_D KC_D // D +#define DE_F KC_F // F +#define DE_G KC_G // G +#define DE_H KC_H // H +#define DE_J KC_J // J +#define DE_K KC_K // K +#define DE_L KC_L // L +#define DE_ODIA KC_SCLN // Ö +#define DE_ADIA KC_QUOT // Ä +#define DE_HASH KC_NUHS // # +// Row 4 +#define DE_LABK KC_NUBS // < +#define DE_Y KC_Z // Y +#define DE_X KC_X // X +#define DE_C KC_C // C +#define DE_V KC_V // V +#define DE_B KC_B // B +#define DE_N KC_N // N +#define DE_M KC_M // M +#define DE_COMM KC_COMM // , +#define DE_DOT KC_DOT // . +#define DE_MINS KC_SLSH // - -#define DE_OSX_DOT KC_DOT -#define DE_OSX_COMM KC_COMM +/* Shifted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ + * │ ° │ ! │ " │ § │ $ │ % │ & │ / │ ( │ ) │ = │ ? │ ` │     │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ + * │     │   │   │   │   │   │   │   │   │   │   │   │ * │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐  │ + * │      │   │   │   │   │   │   │   │   │   │   │   │ ' │  │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ + * │    │ > │   │   │   │   │   │   │   │ ; │ : │ _ │        │ + * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ + * │     │    │     │                       │     │    │     │ + * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ + */ +// Row 1 +#define DE_DEG S(DE_CIRC) // ° +#define DE_EXLM S(DE_1) // ! +#define DE_DQUO S(DE_2) // " +#define DE_SECT S(DE_3) // § +#define DE_DLR S(DE_4) // $ +#define DE_PERC S(DE_5) // % +#define DE_AMPR S(DE_6) // & +#define DE_SLSH S(DE_7) // / +#define DE_LPRN S(DE_8) // ( +#define DE_RPRN S(DE_9) // ) +#define DE_EQL S(DE_0) // = +#define DE_QUES S(DE_SS) // ? +#define DE_GRV S(DE_ACUT) // ` (dead) +// Row 2 +#define DE_ASTR S(DE_PLUS) // * +// Row 3 +#define DE_QUOT S(DE_HASH) // ' +// Row 4 +#define DE_RABK S(DE_LABK) // > +#define DE_SCLN S(DE_COMM) // ; +#define DE_COLN S(DE_DOT) // : +#define DE_UNDS S(DE_MINS) // _ -#define DE_OSX_SS KC_MINS -#define DE_OSX_AE KC_QUOT -#define DE_OSX_UE KC_LBRC -#define DE_OSX_OE KC_SCLN +/* Alted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ + * │ „ │ ¡ │ “ │ ¶ │ ¢ │ [ │ ] │ | │ { │ } │ ≠ │ ¿ │   │     │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ + * │     │ « │ ∑ │ € │ ® │ † │ Ω │ ¨ │ ⁄ │ Ø │ π │ • │ ± │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐  │ + * │      │ Å │ ‚ │ ∂ │ ƒ │ © │ ª │ º │ ∆ │ @ │ Œ │ Æ │ ‘ │  │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ + * │    │ ≤ │ ¥ │ ≈ │ Ç │ √ │ ∫ │ ~ │ µ │ ∞ │ … │ – │        │ + * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ + * │     │    │     │                       │     │    │     │ + * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ + */ +// Row 1 +#define DE_DLQU A(DE_CIRC) // „ +#define DE_IEXL A(DE_1) // ¡ +#define DE_LDQU A(DE_2) // “ +#define DE_PILC A(DE_3) // ¶ +#define DE_CENT A(DE_4) // ¢ +#define DE_LBRC A(DE_5) // [ +#define DE_RBRC A(DE_6) // ] +#define DE_PIPE A(DE_7) // | +#define DE_LCBR A(DE_8) // { +#define DE_RCBR A(DE_9) // } +#define DE_NEQL A(DE_0) // ≠ +#define DE_IQUE A(DE_SS) // ¿ +// Row 2 +#define DE_LDAQ A(DE_Q) // « +#define DE_NARS A(DE_W) // ∑ +#define DE_EURO A(DE_E) // € +#define DE_REGD A(DE_R) // ® +#define DE_DAGG A(DE_T) // † +#define DE_OMEG A(DE_Z) // Ω +#define DE_DIAE A(DE_U) // ¨ (dead) +#define DE_FRSL A(DE_I) // ⁄ +#define DE_OSTR A(DE_O) // Ø +#define DE_PI A(DE_P) // π +#define DE_BULT A(DE_UDIA) // • +#define DE_PLMN A(DE_PLUS) // ± +// Row 3 +#define DE_ARNG A(DE_A) // Å +#define DE_SLQU A(DE_S) // ‚ +#define DE_PDIF A(DE_D) // ∂ +#define DE_FHK A(DE_F) // ƒ +#define DE_COPY A(DE_G) // © +#define DE_FORD A(DE_H) // ª +#define DE_MORD A(DE_J) // º +#define DE_INCR A(DE_K) // ∆ +#define DE_AT A(DE_L) // @ +#define DE_OE A(DE_ODIA) // Œ +#define DE_AE A(DE_ADIA) // Æ +#define DE_LSQU A(DE_HASH) // ‘ +// Row 4 +#define DE_LTEQ A(DE_LABK) // ≤ +#define DE_YEN A(DE_Y) // ¥ +#define DE_AEQL A(DE_X) // ≈ +#define DE_CCCE A(DE_C) // Ç +#define DE_SQRT A(DE_V) // √ +#define DE_INTG A(DE_B) // ∫ +#define DE_TILD A(DE_N) // ~ (dead) +#define DE_MICR A(DE_M) // µ +#define DE_INFN A(DE_COMM) // ∞ +#define DE_ELLP A(DE_DOT) // … +#define DE_NDSH A(DE_MINS) // – -#define DE_OSX_CIRC KC_NUBS // accent circumflex ^ and ring ° -#define DE_OSX_ACUT KC_EQL // accent acute ´ and grave ` -#define DE_OSX_PLUS KC_RBRC // + and * and ~ -#define DE_OSX_HASH KC_BSLS // # and ' -#define DE_OSX_LESS KC_GRV // < and > and | -#define DE_OSX_MINS KC_SLSH // - and _ +/* Shift+Alted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ + * │   │ ¬ │ ” │   │ £ │ fi │   │ \ │ ˜ │ · │ ¯ │ ˙ │ ˚ │     │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ + * │     │ » │   │ ‰ │ ¸ │ ˝ │ ˇ │ Á │ Û │   │ ∏ │   │  │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐  │ + * │      │   │ Í │ ™ │ Ï │ Ì │ Ó │ ı │   │ fl │   │   │   │  │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ + * │    │ ≥ │ ‡ │ Ù │   │ ◊ │ ‹ │ › │ ˘ │ ˛ │ ÷ │ — │        │ + * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ + * │     │    │     │                       │     │    │     │ + * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ + */ +// Row 1 +#define DE_NOT S(A(DE_1)) // ¬ +#define DE_RDQU S(A(DE_2)) // ” +#define DE_PND S(A(DE_4)) // £ +#define DE_FI S(A(DE_5)) // fi +#define DE_BSLS S(A(DE_7)) // (backslash) +#define DE_STIL S(A(DE_8)) // ˜ +#define DE_MDDT S(A(DE_9)) // · +#define DE_MACR S(A(DE_0)) // ¯ +#define DE_DOTA S(A(DE_SS)) // ˙ +#define DE_RNGA S(A(DE_ACUT)) // ˚ +// Row 2 +#define DE_RDAQ S(A(DE_Q)) // » +#define DE_PERM S(A(DE_E)) // ‰ +#define DE_CEDL S(A(DE_R)) // ¸ +#define DE_DACU S(A(DE_T)) // ˝ +#define DE_CARN S(A(DE_Z)) // ˇ +#define DE_AACU S(A(DE_U)) // Á +#define DE_UCIR S(A(DE_I)) // Û +#define DE_NARP S(A(DE_P)) // ∏ +#define DE_APPL S(A(DE_PLUS)) //  (Apple logo) +// Row 3 +#define DE_IACU S(A(DE_S)) // Í +#define DE_TM S(A(DE_D)) // ™ +#define DE_IDIA S(A(DE_F)) // Ï +#define DE_IGRV S(A(DE_G)) // Ì +#define DE_OACU S(A(DE_H)) // Ó +#define DE_DLSI S(A(DE_J)) // ı +#define DE_FL S(A(DE_L)) // fl +// Row 4 +#define DE_GTEQ S(A(DE_LABK)) // ≥ +#define DE_DDAG S(A(DE_Y)) // ‡ +#define DE_UGRV S(A(DE_X)) // Ù +#define DE_LOZN S(A(DE_V)) // ◊ +#define DE_LSAQ S(A(DE_B)) // ‹ +#define DE_RSAQ S(A(DE_N)) // › +#define DE_BREV S(A(DE_M)) // ˘ +#define DE_OGON S(A(DE_COMM)) // ˛ +#define DE_DIV S(A(DE_DOT)) // ÷ +#define DE_MDSH S(A(DE_MINS)) // — -// shifted characters -#define DE_OSX_RING LSFT(DE_OSX_CIRC) // ° -#define DE_OSX_EXLM LSFT(KC_1) // ! -#define DE_OSX_DQOT LSFT(KC_2) // " -#define DE_OSX_PARA LSFT(KC_3) // § -#define DE_OSX_DLR LSFT(KC_4) // $ -#define DE_OSX_PERC LSFT(KC_5) // % -#define DE_OSX_AMPR LSFT(KC_6) // & -#define DE_OSX_SLSH LSFT(KC_7) // / -#define DE_OSX_LPRN LSFT(KC_8) // ( -#define DE_OSX_RPRN LSFT(KC_9) // ) -#define DE_OSX_EQL LSFT(KC_0) // = -#define DE_OSX_QST LSFT(DE_OSX_SS) // ? -#define DE_OSX_GRV LSFT(DE_OSX_ACUT) // ` -#define DE_OSX_ASTR LSFT(DE_OSX_PLUS) // * -#define DE_OSX_QUOT LSFT(DE_OSX_HASH) // ' -#define DE_OSX_MORE LSFT(DE_OSX_LESS) // > -#define DE_OSX_COLN LSFT(KC_DOT) // : -#define DE_OSX_SCLN LSFT(KC_COMM) // ; -#define DE_OSX_UNDS LSFT(DE_OSX_MINS) // _ +// DEPRECATED +#define DE_OSX_CIRC DE_CIRC +#define DE_OSX_1 DE_1 +#define DE_OSX_2 DE_2 +#define DE_OSX_3 DE_3 +#define DE_OSX_4 DE_4 +#define DE_OSX_5 DE_5 +#define DE_OSX_6 DE_6 +#define DE_OSX_7 DE_7 +#define DE_OSX_8 DE_8 +#define DE_OSX_9 DE_9 +#define DE_OSX_0 DE_0 +#define DE_OSX_SS DE_SS +#define DE_OSX_ACUT DE_ACUT +#define DE_OSX_Q DE_Q +#define DE_OSX_W DE_W +#define DE_OSX_E DE_E +#define DE_OSX_R DE_R +#define DE_OSX_T DE_T +#define DE_OSX_Z DE_Z +#define DE_OSX_U DE_U +#define DE_OSX_I DE_I +#define DE_OSX_O DE_O +#define DE_OSX_P DE_P +#define DE_OSX_UE DE_UDIA +#define DE_OSX_PLUS DE_PLUS +#define DE_OSX_A DE_A +#define DE_OSX_S DE_S +#define DE_OSX_D DE_D +#define DE_OSX_F DE_F +#define DE_OSX_G DE_G +#define DE_OSX_H DE_H +#define DE_OSX_J DE_J +#define DE_OSX_K DE_K +#define DE_OSX_L DE_L +#define DE_OSX_OE DE_ODIA +#define DE_OSX_AE DE_ADIA +#define DE_OSX_HASH DE_HASH +#define DE_OSX_LESS DE_LABK +#define DE_OSX_Y DE_Y +#define DE_OSX_X DE_X +#define DE_OSX_C DE_C +#define DE_OSX_V DE_V +#define DE_OSX_B DE_B +#define DE_OSX_N DE_N +#define DE_OSX_M DE_M +#define DE_OSX_COMM DE_COMM +#define DE_OSX_DOT DE_DOT +#define DE_OSX_MINS DE_MINS -// Alt-ed characters -//#define DE_OSX_SQ2 LALT(KC_2) // ² -//#define DE_OSX_SQ3 LALT(KC_3) // ³ -#define DE_OSX_LCBR LALT(KC_8) // { -#define DE_OSX_LBRC LALT(KC_5) // [ -#define DE_OSX_RBRC LALT(KC_6) // ] -#define DE_OSX_RCBR LALT(KC_9) // } -#define DE_OSX_BSLS LALT(LSFT(KC_7)) // backslash -#define DE_OSX_AT LALT(DE_OSX_L) // @ -#define DE_OSX_EURO LALT(KC_E) // € -#define DE_OSX_TILD LALT(DE_OSX_N) // ~ -#define DE_OSX_PIPE LALT(DE_OSX_7) // | +#define DE_OSX_RING DE_DEG +#define DE_OSX_EXLM DE_EXLM +#define DE_OSX_DQOT DE_DQUO +#define DE_OSX_PARA DE_SECT +#define DE_OSX_DLR DE_DLR +#define DE_OSX_PERC DE_PERC +#define DE_OSX_AMPR DE_AMPR +#define DE_OSX_SLSH DE_SLSH +#define DE_OSX_LPRN DE_LPRN +#define DE_OSX_RPRN DE_RPRN +#define DE_OSX_EQL DE_EQL +#define DE_OSX_QST DE_QUES +#define DE_OSX_GRV DE_GRV +#define DE_OSX_ASTR DE_ASTR +#define DE_OSX_QUOT DE_QUOT +#define DE_OSX_MORE DE_RABK +#define DE_OSX_COLN DE_COLN +#define DE_OSX_SCLN DE_SCLN +#define DE_OSX_UNDS DE_UNDS -#endif +#define DE_OSX_LBRC DE_LBRC +#define DE_OSX_RBRC DE_RBRC +#define DE_OSX_PIPE DE_PIPE +#define DE_OSX_LCBR DE_LCBR +#define DE_OSX_RCBR DE_RCBR +#define DE_OSX_AT DE_AT +#define DE_OSX_EURO DE_EURO +#define DE_OSX_TILD DE_TILD +#define DE_OSX_BSLS DE_BSLS diff --git a/quantum/keymap_extras/keymap_greek.h b/quantum/keymap_extras/keymap_greek.h index 6ea9f289b09..a2525959bc9 100644 --- a/quantum/keymap_extras/keymap_greek.h +++ b/quantum/keymap_extras/keymap_greek.h @@ -114,7 +114,7 @@ #define GR_PLUS S(GR_EQL) // + // Row 2 #define GR_COLN S(GR_SCLN) // : -#define GR_DTON S(GR_FSIG) // ΅ (dead) +#define GR_DIAT S(GR_FSIG) // ΅ (dead) #define GR_LCBR S(GR_LBRC) // { #define GR_RCBR S(GR_RBRC) // } // Row 3 diff --git a/quantum/keymap_extras/keymap_italian_osx_ansi.h b/quantum/keymap_extras/keymap_italian_osx_ansi.h index fa12d05dce6..1f7fe8afc96 100644 --- a/quantum/keymap_extras/keymap_italian_osx_ansi.h +++ b/quantum/keymap_extras/keymap_italian_osx_ansi.h @@ -14,100 +14,255 @@ * along with this program. If not, see . */ -// This is a clone of quantum/keymap_extra/keymap_italian.h intended to be used with Apple devices - -#ifndef KEYMAP_ITALIAN -#define KEYMAP_ITALIAN +#pragma once #include "keymap.h" -// normal characters -#define IT_A KC_A -#define IT_B KC_B -#define IT_C KC_C -#define IT_D KC_D -#define IT_E KC_E -#define IT_F KC_F -#define IT_G KC_G -#define IT_H KC_H -#define IT_I KC_I -#define IT_J KC_J -#define IT_K KC_K -#define IT_L KC_L -#define IT_M KC_M -#define IT_N KC_N -#define IT_O KC_O -#define IT_P KC_P -#define IT_Q KC_Q -#define IT_R KC_R -#define IT_S KC_S -#define IT_T KC_T -#define IT_U KC_U -#define IT_V KC_V -#define IT_W KC_W -#define IT_X KC_X -#define IT_Y KC_Y -#define IT_Z KC_Z - -#define IT_0 KC_0 -#define IT_1 KC_1 -#define IT_2 KC_2 -#define IT_3 KC_3 -#define IT_4 KC_4 -#define IT_5 KC_5 -#define IT_6 KC_6 -#define IT_7 KC_7 -#define IT_8 KC_8 -#define IT_9 KC_9 +// clang-format off -// punctuation -#define IT_DOT KC_DOT // . and : -#define IT_COMM KC_COMM // , and ; -#define IT_APOS KC_MINS // ' and ? -#define IT_BSLS KC_NUBS // \ and | -#define IT_LESS KC_GRV // < and > -#define IT_MINS KC_SLSH // - and _ +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ + * │ < │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ' │ ì │     │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ + * │     │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ è │ + │ ù │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │      │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ò │ à │      │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──────┤ + * │        │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │        │ + * ├─────┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ + * │     │    │     │                       │     │    │     │ + * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ + */ +// Row 1 +#define IT_LABK KC_GRV // < +#define IT_1 KC_1 // 1 +#define IT_2 KC_2 // 2 +#define IT_3 KC_3 // 3 +#define IT_4 KC_4 // 4 +#define IT_5 KC_5 // 5 +#define IT_6 KC_6 // 6 +#define IT_7 KC_7 // 7 +#define IT_8 KC_8 // 8 +#define IT_9 KC_9 // 9 +#define IT_0 KC_0 // 0 +#define IT_QUOT KC_MINS // ' +#define IT_IGRV KC_EQL // ì +// Row 2 +#define IT_Q KC_Q // Q +#define IT_W KC_W // W +#define IT_E KC_E // E +#define IT_R KC_R // R +#define IT_T KC_T // T +#define IT_Y KC_Y // Y +#define IT_U KC_U // U +#define IT_I KC_I // I +#define IT_O KC_O // O +#define IT_P KC_P // P +#define IT_EGRV KC_LBRC // è +#define IT_PLUS KC_RBRC // + +#define IT_UGRV KC_BSLS // ù +// Row 3 +#define IT_A KC_A // A +#define IT_S KC_S // S +#define IT_D KC_D // D +#define IT_F KC_F // F +#define IT_G KC_G // G +#define IT_H KC_H // H +#define IT_J KC_J // J +#define IT_K KC_K // K +#define IT_L KC_L // L +#define IT_OGRV KC_SCLN // ò +#define IT_AGRV KC_QUOT // à +// Row 4 +#define IT_BSLS KC_NUBS // (backslash, not physically present) +#define IT_Z KC_Z // Z +#define IT_X KC_X // X +#define IT_C KC_C // C +#define IT_V KC_V // V +#define IT_B KC_B // B +#define IT_N KC_N // N +#define IT_M KC_M // M +#define IT_COMM KC_COMM // , +#define IT_DOT KC_DOT // . +#define IT_MINS KC_SLSH // - -// accented vowels (regular, with shift, with option, with option and shift) -#define IT_EACC KC_LBRC // è, é, [, { -#define IT_PLUS KC_RBRC // +, *, ], } -#define IT_OACC KC_SCLN // ò, ç, @, Ç -#define IT_AACC KC_QUOT // à, °, #, ∞ -#define IT_UACC KC_BSLS // ù, §, ¶, ◊ -#define IT_IACC KC_EQL // ì, ^, ˆ, ± +/* Shifted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ + * │ > │ ! │ " │ £ │ $ │ % │ & │ / │ ( │ ) │ = │ ? │ ^ │     │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ + * │     │   │   │   │   │   │   │   │   │   │   │ é │ * │ § │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │      │   │   │   │   │   │   │   │   │   │ ç │ ° │      │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──────┤ + * │        │   │   │   │   │   │   │   │ ; │ : │ _ │        │ + * ├─────┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ + * │     │    │     │                       │     │    │     │ + * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ + */ +// Row 1 +#define IT_RABK S(IT_LABK) // > +#define IT_EXLM S(IT_1) // ! +#define IT_DQUO S(IT_2) // " +#define IT_PND S(IT_3) // £ +#define IT_DLR S(IT_4) // $ +#define IT_PERC S(IT_5) // % +#define IT_AMPR S(IT_6) // & +#define IT_SLSH S(IT_7) // / +#define IT_LPRN S(IT_8) // ( +#define IT_RPRN S(IT_9) // ) +#define IT_EQL S(IT_0) // = +#define IT_QUES S(IT_QUOT) // ? +#define IT_CIRC S(IT_IGRV) // ^ +// Row 2 +#define IT_EACU S(IT_EGRV) // é +#define IT_ASTR S(IT_PLUS) // * +#define IT_SECT S(IT_UGRV) // § +// Row 3 +#define IT_LCCE S(IT_OGRV) // ç +#define IT_DEG S(IT_AGRV) // ° +// Row 4 +#define IT_PIPE S(IT_BSLS) // | (not physically present) +#define IT_SCLN S(IT_COMM) // ; +#define IT_COLN S(IT_DOT) // : +#define IT_UNDS S(IT_MINS) // _ -// shifted characters -#define IT_EXLM LSFT(KC_1) // ! -#define IT_DQOT LSFT(KC_2) // " -#define IT_STRL LSFT(KC_3) // £ -#define IT_DLR LSFT(KC_4) // $ -#define IT_PERC LSFT(KC_5) // % -#define IT_AMPR LSFT(KC_6) // & -#define IT_SLSH LSFT(KC_7) // / -#define IT_LPRN LSFT(KC_8) // ( -#define IT_RPRN LSFT(KC_9) // ) -#define IT_EQL LSFT(KC_0) // = -#define IT_DEGR LSFT(IT_AACC) // ° -#define IT_QST LSFT(IT_APOS) // ? -#define IT_CRC LSFT(IT_IACC) // ^ -#define IT_ASTR LSFT(IT_PLUS) // * -#define IT_MORE LSFT(IT_LESS) // > -#define IT_COLN LSFT(IT_DOT) // : -#define IT_SCLN LSFT(IT_COMM) // ; -#define IT_UNDS LSFT(IT_MINS) // _ -#define IT_LCBR LSFT(IT_LBRC) // { -#define IT_RCBR LSFT(IT_RBRC) // } -#define IT_PIPE LSFT(IT_BSLS) // | +/* Alted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ + * │ ≤ │ « │ “ │ ‘ │ ¥ │ ~ │ ‹ │ ÷ │ ´ │ ` │ ≠ │ ¡ │ ˆ │     │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ + * │     │ „ │ Ω │ € │ ® │ ™ │ Æ │ ¨ │ Œ │ Ø │ π │ [ │ ] │ ¶ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │      │ Å │ ß │ ∂ │ ƒ │ ∞ │ ∆ │ ª │ º │ ¬ │ @ │ # │      │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──────┤ + * │        │ ∑ │ † │ © │ √ │ ∫ │ ˜ │ µ │ … │ • │ – │        │ + * ├─────┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ + * │     │    │     │                       │     │    │     │ + * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ + */ +// Row 1 +#define IT_LTEQ A(IT_LABK) // ≤ +#define IT_LDAQ A(IT_1) // « +#define IT_LDQU A(IT_2) // “ +#define IT_LSQU A(IT_3) // ‘ +#define IT_YEN A(IT_4) // ¥ +#define IT_TILD A(IT_5) // ~ +#define IT_LSAQ A(IT_6) // ‹ +#define IT_DIV A(IT_7) // ÷ +#define IT_ACUT A(IT_8) // ´ (dead) +#define IT_DGRV A(IT_9) // ` (dead) +#define IT_NEQL A(IT_0) // ≠ +#define IT_IEXL A(IT_QUOT) // ¡ +#define IT_DCIR A(IT_IGRV) // ˆ (dead) +// Row 2 +#define IT_DLQU A(IT_Q) // „ +#define IT_OMEG A(IT_W) // Ω +#define IT_EURO A(IT_E) // € +#define IT_REGD A(IT_R) // ® +#define IT_TM A(IT_T) // ™ +#define IT_AE A(IT_Y) // Æ +#define IT_DIAE A(IT_U) // ¨ (dead) +#define IT_OE A(IT_I) // Œ +#define IT_OSTR A(IT_O) // Ø +#define IT_PI A(IT_P) // π +#define IT_LBRC A(IT_EGRV) // [ +#define IT_RBRC A(IT_PLUS) // ] +// Row 3 +#define IT_ARNG A(IT_A) // Å +#define IT_SS A(IT_S) // ß +#define IT_PDIF A(IT_D) // ∂ +#define IT_FHK A(IT_F) // ƒ +#define IT_INFN A(IT_G) // ∞ +#define IT_INCR A(IT_H) // ∆ +#define IT_FORD A(IT_J) // ª +#define IT_MORD A(IT_K) // º +#define IT_NOT A(IT_L) // ¬ +#define IT_AT A(IT_OGRV) // @ +#define IT_HASH A(IT_AGRV) // # +#define IT_PILC A(IT_UGRV) // ¶ +// Row 4 +#define IT_GRV A(IT_BSLS) // ` (not physically present) +#define IT_NARS A(IT_Z) // ∑ +#define IT_DAGG A(IT_X) // † +#define IT_COPY A(IT_C) // © +#define IT_SQRT A(IT_V) // √ +#define IT_INTG A(IT_B) // ∫ +#define IT_STIL A(IT_N) // ˜ (dead) +#define IT_MICR A(IT_M) // µ +#define IT_ELLP A(IT_COMM) // … +#define IT_BULT A(IT_DOT) // • +#define IT_NDSH A(IT_MINS) // – -// Alt -ed characters -#define IT_LBRC LALT(IT_EACC) // [ -#define IT_RBRC LALT(IT_PLUS) // ] -#define IT_AT LALT(IT_OACC) // @ -#define IT_EURO LALT(KC_E) // € -#define IT_SHRP LALT(IT_AACC) // # -#define IT_ACUT LALT(KC_8) // ´ -#define IT_GRAVE LALT(KC_9) // ` -#define IT_TILDE LALT(KC_5) // ~ -#define IT_PLMN LALT(LSFT(IT_IACC)) // ± +/* Shift+Alted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ + * │ ≥ │ » │ ” │ ’ │ ¢ │ ‰ │ › │ ⁄ │  │   │ ≈ │ ¿ │ ± │     │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ + * │     │ ‚ │ À │ È │ Ì │ Ò │   │ Ù │   │   │ ∏ │ { │ } │ ◊ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │      │   │ ¯ │ ˘ │ ˙ │ ˚ │ ¸ │ ˝ │ ˛ │ ˇ │ Ç │ ∞ │      │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──────┤ + * │        │   │ ‡ │ Á │ É │ Í │ Ó │ Ú │   │ · │ — │        │ + * ├─────┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ + * │     │    │     │                       │     │    │     │ + * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ + */ +// Row 1 +#define IT_GTEQ S(A(IT_LABK)) // ≥ +#define IT_RDAQ S(A(IT_1)) // » +#define IT_RDQU S(A(IT_2)) // ” +#define IT_RSQU S(A(IT_3)) // ’ +#define IT_CENT S(A(IT_4)) // ¢ +#define IT_PERM S(A(IT_5)) // ‰ +#define IT_RSAQ S(A(IT_6)) // › +#define IT_FRSL S(A(IT_7)) // ⁄ +#define IT_APPL S(A(IT_8)) //  (Apple logo) +#define IT_AEQL S(A(IT_0)) // ≈ +#define IT_IQUE S(A(IT_QUOT)) // ¿ +#define IT_PLMN S(A(IT_IGRV)) // ± +// Row 2 +#define IT_SLQU S(A(IT_Q)) // ‚ +#define IT_CAGR S(A(IT_W)) // À +#define IT_CEGR S(A(IT_E)) // È +#define IT_CIGR S(A(IT_R)) // Ì +#define IT_COGR S(A(IT_T)) // Ò +#define IT_CUGR S(A(IT_U)) // Ù +#define IT_NARP S(A(IT_P)) // ∏ +#define IT_LCBR S(A(IT_EGRV)) // { +#define IT_RCBR S(A(IT_PLUS)) // } +#define IT_LOZN S(A(IT_UGRV)) // ◊ +// Row 3 +#define IT_MACR S(A(IT_S)) // ¯ +#define IT_BREV S(A(IT_D)) // ˘ +#define IT_DOTA S(A(IT_F)) // ˙ +#define IT_RGNA S(A(IT_G)) // ˚ +#define IT_CEDL S(A(IT_H)) // ¸ +#define IT_DACU S(A(IT_J)) // ˝ +#define IT_OGON S(A(IT_K)) // ˛ +#define IT_CARN S(A(IT_L)) // ˇ +#define IT_CCCE S(A(IT_OGRV)) // Ç +// Row 4 +#define IT_DDAG S(A(IT_X)) // ‡ +#define IT_CAAC S(A(IT_C)) // Á +#define IT_CEAC S(A(IT_V)) // É +#define IT_CIAC S(A(IT_B)) // Í +#define IT_COAC S(A(IT_N)) // Ó +#define IT_CUAC S(A(IT_M)) // Ú +#define IT_MDDT S(A(IT_DOT)) // · +#define IT_MDSH S(A(IT_MINS)) // — -#endif +// DEPRECATED +#define IT_LESS IT_LABK +#define IT_APOS IT_QUOT +#define IT_IACC IT_IGRV +#define IT_EACC IT_EGRV +#define IT_UACC IT_UGRV +#define IT_OACC IT_OGRV +#define IT_AACC IT_AGRV +#define IT_MORE IT_RABK +#define IT_DQOT IT_DQUO +#define IT_STRL IT_PND +#define IT_QST IT_QUES +#define IT_CRC IT_CIRC +#define IT_DEGR IT_DEG +#define IT_TILDE IT_TILD +#define IT_GRAVE IT_GRV +#define IT_SHRP IT_HASH diff --git a/quantum/keymap_extras/keymap_italian_osx_iso.h b/quantum/keymap_extras/keymap_italian_osx_iso.h index a9b36f16e6e..5ed1e3abd48 100644 --- a/quantum/keymap_extras/keymap_italian_osx_iso.h +++ b/quantum/keymap_extras/keymap_italian_osx_iso.h @@ -14,100 +14,256 @@ * along with this program. If not, see . */ -// This is a clone of quantum/keymap_extra/keymap_italian.h intended to be used with Apple devices - -#ifndef KEYMAP_ITALIAN -#define KEYMAP_ITALIAN +#pragma once #include "keymap.h" -// normal characters -#define IT_A KC_A -#define IT_B KC_B -#define IT_C KC_C -#define IT_D KC_D -#define IT_E KC_E -#define IT_F KC_F -#define IT_G KC_G -#define IT_H KC_H -#define IT_I KC_I -#define IT_J KC_J -#define IT_K KC_K -#define IT_L KC_L -#define IT_M KC_M -#define IT_N KC_N -#define IT_O KC_O -#define IT_P KC_P -#define IT_Q KC_Q -#define IT_R KC_R -#define IT_S KC_S -#define IT_T KC_T -#define IT_U KC_U -#define IT_V KC_V -#define IT_W KC_W -#define IT_X KC_X -#define IT_Y KC_Y -#define IT_Z KC_Z - -#define IT_0 KC_0 -#define IT_1 KC_1 -#define IT_2 KC_2 -#define IT_3 KC_3 -#define IT_4 KC_4 -#define IT_5 KC_5 -#define IT_6 KC_6 -#define IT_7 KC_7 -#define IT_8 KC_8 -#define IT_9 KC_9 +// clang-format off -// punctuation -#define IT_DOT KC_DOT // . and : -#define IT_COMM KC_COMM // , and ; -#define IT_APOS KC_MINS // ' and ? -#define IT_BSLS KC_GRV // \ and | -#define IT_LESS KC_NUBS // < and > -#define IT_MINS KC_SLSH // - and _ +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ + * │ \ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ' │ ì │     │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ + * │     │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ è │ + │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐  │ + * │      │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ò │ à │ ù │  │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ + * │    │ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │        │ + * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ + * │     │    │     │                       │     │    │     │ + * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ + */ +// Row 1 +#define IT_BSLS KC_GRV // (backslash) +#define IT_1 KC_1 // 1 +#define IT_2 KC_2 // 2 +#define IT_3 KC_3 // 3 +#define IT_4 KC_4 // 4 +#define IT_5 KC_5 // 5 +#define IT_6 KC_6 // 6 +#define IT_7 KC_7 // 7 +#define IT_8 KC_8 // 8 +#define IT_9 KC_9 // 9 +#define IT_0 KC_0 // 0 +#define IT_QUOT KC_MINS // ' +#define IT_IGRV KC_EQL // ì +// Row 2 +#define IT_Q KC_Q // Q +#define IT_W KC_W // W +#define IT_E KC_E // E +#define IT_R KC_R // R +#define IT_T KC_T // T +#define IT_Y KC_Y // Y +#define IT_U KC_U // U +#define IT_I KC_I // I +#define IT_O KC_O // O +#define IT_P KC_P // P +#define IT_EGRV KC_LBRC // è +#define IT_PLUS KC_RBRC // + +// Row 3 +#define IT_A KC_A // A +#define IT_S KC_S // S +#define IT_D KC_D // D +#define IT_F KC_F // F +#define IT_G KC_G // G +#define IT_H KC_H // H +#define IT_J KC_J // J +#define IT_K KC_K // K +#define IT_L KC_L // L +#define IT_OGRV KC_SCLN // ò +#define IT_AGRV KC_QUOT // à +#define IT_UGRV KC_NUHS // ù +// Row 4 +#define IT_LABK KC_NUBS // < +#define IT_Z KC_Z // Z +#define IT_X KC_X // X +#define IT_C KC_C // C +#define IT_V KC_V // V +#define IT_B KC_B // B +#define IT_N KC_N // N +#define IT_M KC_M // M +#define IT_COMM KC_COMM // , +#define IT_DOT KC_DOT // . +#define IT_MINS KC_SLSH // - -// accented vowels (regular, with shift, with option, with option and shift) -#define IT_EACC KC_LBRC // è, é, [, { -#define IT_PLUS KC_RBRC // +, *, ], } -#define IT_OACC KC_SCLN // ò, ç, @, Ç -#define IT_AACC KC_QUOT // à, °, #, ∞ -#define IT_UACC KC_BSLS // ù, §, ¶, ◊ -#define IT_IACC KC_EQL // ì, ^, ˆ, ± +/* Shifted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ + * │ | │ ! │ " │ £ │ $ │ % │ & │ / │ ( │ ) │ = │ ? │ ^ │     │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ + * │     │   │   │   │   │   │   │   │   │   │   │ é │ * │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐  │ + * │      │   │   │   │   │   │   │   │   │   │ ç │ ° │ § │  │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ + * │    │ > │   │   │   │   │   │   │   │ ; │ : │ _ │        │ + * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ + * │     │    │     │                       │     │    │     │ + * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ + */ +// Row 1 +#define IT_PIPE S(IT_BSLS) // | +#define IT_EXLM S(IT_1) // ! +#define IT_DQUO S(IT_2) // " +#define IT_PND S(IT_3) // £ +#define IT_DLR S(IT_4) // $ +#define IT_PERC S(IT_5) // % +#define IT_AMPR S(IT_6) // & +#define IT_SLSH S(IT_7) // / +#define IT_LPRN S(IT_8) // ( +#define IT_RPRN S(IT_9) // ) +#define IT_EQL S(IT_0) // = +#define IT_QUES S(IT_QUOT) // ? +#define IT_CIRC S(IT_IGRV) // ^ +// Row 2 +#define IT_EACU S(IT_EGRV) // é +#define IT_ASTR S(IT_PLUS) // * +// Row 3 +#define IT_LCCE S(IT_OGRV) // ç +#define IT_DEG S(IT_AGRV) // ° +#define IT_SECT S(IT_UGRV) // § +// Row 4 +#define IT_RABK S(IT_LABK) // > +#define IT_SCLN S(IT_COMM) // ; +#define IT_COLN S(IT_DOT) // : +#define IT_UNDS S(IT_MINS) // _ -// shifted characters -#define IT_EXLM LSFT(KC_1) // ! -#define IT_DQOT LSFT(KC_2) // " -#define IT_STRL LSFT(KC_3) // £ -#define IT_DLR LSFT(KC_4) // $ -#define IT_PERC LSFT(KC_5) // % -#define IT_AMPR LSFT(KC_6) // & -#define IT_SLSH LSFT(KC_7) // / -#define IT_LPRN LSFT(KC_8) // ( -#define IT_RPRN LSFT(KC_9) // ) -#define IT_EQL LSFT(KC_0) // = -#define IT_DEGR LSFT(IT_AACC) // ° -#define IT_QST LSFT(IT_APOS) // ? -#define IT_CRC LSFT(IT_IACC) // ^ -#define IT_ASTR LSFT(IT_PLUS) // * -#define IT_MORE LSFT(IT_LESS) // > -#define IT_COLN LSFT(IT_DOT) // : -#define IT_SCLN LSFT(IT_COMM) // ; -#define IT_UNDS LSFT(IT_MINS) // _ -#define IT_LCBR LSFT(IT_LBRC) // { -#define IT_RCBR LSFT(IT_RBRC) // } -#define IT_PIPE LSFT(IT_BSLS) // | +/* Alted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ + * │ ` │ « │ “ │ ‘ │ ¥ │ ~ │ ‹ │ ÷ │ ´ │ ` │ ≠ │ ¡ │ ˆ │     │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ + * │     │ „ │ Ω │ € │ ® │ ™ │ Æ │ ¨ │ Œ │ Ø │ π │ [ │ ] │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐  │ + * │      │ Å │ ß │ ∂ │ ƒ │ ∞ │ ∆ │ ª │ º │ ¬ │ @ │ # │ ¶ │  │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ + * │    │ ≤ │ ∑ │ † │ © │ √ │ ∫ │ ˜ │ µ │ … │ • │ – │        │ + * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ + * │     │    │     │                       │     │    │     │ + * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ + */ +// Row 1 +#define IT_GRV A(IT_BSLS) // ` +#define IT_LDAQ A(IT_1) // « +#define IT_LDQU A(IT_2) // “ +#define IT_LSQU A(IT_3) // ‘ +#define IT_YEN A(IT_4) // ¥ +#define IT_TILD A(IT_5) // ~ +#define IT_LSAQ A(IT_6) // ‹ +#define IT_DIV A(IT_7) // ÷ +#define IT_ACUT A(IT_8) // ´ (dead) +#define IT_DGRV A(IT_9) // ` (dead) +#define IT_NEQL A(IT_0) // ≠ +#define IT_IEXL A(IT_QUOT) // ¡ +#define IT_DCIR A(IT_IGRV) // ˆ (dead) +// Row 2 +#define IT_DLQU A(IT_Q) // „ +#define IT_OMEG A(IT_W) // Ω +#define IT_EURO A(IT_E) // € +#define IT_REGD A(IT_R) // ® +#define IT_TM A(IT_T) // ™ +#define IT_AE A(IT_Y) // Æ +#define IT_DIAE A(IT_U) // ¨ (dead) +#define IT_OE A(IT_I) // Œ +#define IT_OSTR A(IT_O) // Ø +#define IT_PI A(IT_P) // π +#define IT_LBRC A(IT_EGRV) // [ +#define IT_RBRC A(IT_PLUS) // ] +// Row 3 +#define IT_ARNG A(IT_A) // Å +#define IT_SS A(IT_S) // ß +#define IT_PDIF A(IT_D) // ∂ +#define IT_FHK A(IT_F) // ƒ +#define IT_INFN A(IT_G) // ∞ +#define IT_INCR A(IT_H) // ∆ +#define IT_FORD A(IT_J) // ª +#define IT_MORD A(IT_K) // º +#define IT_NOT A(IT_L) // ¬ +#define IT_AT A(IT_OGRV) // @ +#define IT_HASH A(IT_AGRV) // # +#define IT_PILC A(IT_UGRV) // ¶ +// Row 4 +#define IT_LTEQ A(IT_LABK) // ≤ +#define IT_NARS A(IT_Z) // ∑ +#define IT_DAGG A(IT_X) // † +#define IT_COPY A(IT_C) // © +#define IT_SQRT A(IT_V) // √ +#define IT_INTG A(IT_B) // ∫ +#define IT_STIL A(IT_N) // ˜ (dead) +#define IT_MICR A(IT_M) // µ +#define IT_ELLP A(IT_COMM) // … +#define IT_BULT A(IT_DOT) // • +#define IT_NDSH A(IT_MINS) // – -// Alt -ed characters -#define IT_LBRC LALT(IT_EACC) // [ -#define IT_RBRC LALT(IT_PLUS) // ] -#define IT_AT LALT(IT_OACC) // @ -#define IT_EURO LALT(KC_E) // € -#define IT_SHRP LALT(IT_AACC) // # -#define IT_ACUT LALT(KC_8) // ´ -#define IT_GRAVE LALT(KC_9) // ` -#define IT_TILDE LALT(KC_5) // ~ -#define IT_PLMN LALT(LSFT(IT_IACC)) // ± +/* Shift+Alted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ + * │ ı │ » │ ” │ ’ │ ¢ │ ‰ │ › │ ⁄ │  │   │ ≈ │ ¿ │ ± │     │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤ + * │     │ ‚ │ À │ È │ Ì │ Ò │   │ Ù │   │   │ ∏ │ { │ } │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐  │ + * │      │   │ ¯ │ ˘ │ ˙ │ ˚ │ ¸ │ ˝ │ ˛ │ ˇ │ Ç │   │ ◊ │  │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤ + * │    │ ≥ │   │ ‡ │ Á │ É │ Í │ Ó │ Ú │   │ · │ — │        │ + * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤ + * │     │    │     │                       │     │    │     │ + * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘ + */ +// Row 1 +#define IT_DLSI S(A(IT_BSLS)) // ı +#define IT_RDAQ S(A(IT_1)) // » +#define IT_RDQU S(A(IT_2)) // ” +#define IT_RSQU S(A(IT_3)) // ’ +#define IT_CENT S(A(IT_4)) // ¢ +#define IT_PERM S(A(IT_5)) // ‰ +#define IT_RSAQ S(A(IT_6)) // › +#define IT_FRSL S(A(IT_7)) // ⁄ +#define IT_APPL S(A(IT_8)) //  (Apple logo) +#define IT_AEQL S(A(IT_0)) // ≈ +#define IT_IQUE S(A(IT_QUOT)) // ¿ +#define IT_PLMN S(A(IT_IGRV)) // ± +// Row 2 +#define IT_SLQU S(A(IT_Q)) // ‚ +#define IT_CAGR S(A(IT_W)) // À +#define IT_CEGR S(A(IT_E)) // È +#define IT_CIGR S(A(IT_R)) // Ì +#define IT_COGR S(A(IT_T)) // Ò +#define IT_CUGR S(A(IT_U)) // Ù +#define IT_NARP S(A(IT_P)) // ∏ +#define IT_LCBR S(A(IT_EGRV)) // { +#define IT_RCBR S(A(IT_PLUS)) // } +// Row 3 +#define IT_MACR S(A(IT_S)) // ¯ +#define IT_BREV S(A(IT_D)) // ˘ +#define IT_DOTA S(A(IT_F)) // ˙ +#define IT_RNGA S(A(IT_G)) // ˚ +#define IT_CEDL S(A(IT_H)) // ¸ +#define IT_DACU S(A(IT_J)) // ˝ +#define IT_OGON S(A(IT_K)) // ˛ +#define IT_CARN S(A(IT_L)) // ˇ +#define IT_CCCE S(A(IT_OGRV)) // Ç +#define IT_LOZN S(A(IT_UGRV)) // ◊ +// Row 4 +#define IT_GTEQ S(A(IT_LABK)) // ≥ +#define IT_DDAG S(A(IT_X)) // ‡ +#define IT_CAAC S(A(IT_C)) // Á +#define IT_CEAC S(A(IT_V)) // É +#define IT_CIAC S(A(IT_B)) // Í +#define IT_COAC S(A(IT_N)) // Ó +#define IT_CUAC S(A(IT_M)) // Ú +#define IT_MDDT S(A(IT_DOT)) // · +#define IT_MDSH S(A(IT_MINS)) // — -#endif +// DEPRECATED +#define IT_APOS IT_QUOT +#define IT_IACC IT_IGRV +#define IT_EACC IT_EGRV +#define IT_OACC IT_OGRV +#define IT_AACC IT_AGRV +#define IT_UACC IT_UGRV +#define IT_LESS IT_LABK +#define IT_DQOT IT_DQUO +#define IT_STRL IT_PND +#define IT_QST IT_QUES +#define IT_CRC IT_CIRC +#define IT_DEGR IT_DEG +#define IT_MORE IT_RABK +#define IT_TILDE IT_TILD +#define IT_GRAVE IT_GRV +#define IT_SHRP IT_HASH diff --git a/quantum/keymap_extras/keymap_serbian.h b/quantum/keymap_extras/keymap_serbian.h index 3cde5820af0..738a2d4afb3 100644 --- a/quantum/keymap_extras/keymap_serbian.h +++ b/quantum/keymap_extras/keymap_serbian.h @@ -111,8 +111,8 @@ #define RS_LPRN S(RS_8) // ( #define RS_RPRN S(RS_9) // ) #define RS_EQL S(RS_0) // = -#define RS_DEG S(RS_QUOT) // ? -#define RS_UNDS S(RS_PLUS) // * +#define RS_QUES S(RS_QUOT) // ? +#define RS_ASTR S(RS_PLUS) // * // Row 4 #define RS_RABK S(RS_LABK) // > #define RS_SCLN S(RS_COMM) // ; diff --git a/quantum/keymap_extras/keymap_serbian_latin.h b/quantum/keymap_extras/keymap_serbian_latin.h index 363b7fdc1e1..b514102c02d 100644 --- a/quantum/keymap_extras/keymap_serbian_latin.h +++ b/quantum/keymap_extras/keymap_serbian_latin.h @@ -111,8 +111,8 @@ #define RS_LPRN S(RS_8) // ( #define RS_RPRN S(RS_9) // ) #define RS_EQL S(RS_0) // = -#define RS_DEG S(RS_QUOT) // ? -#define RS_UNDS S(RS_PLUS) // * +#define RS_QUES S(RS_QUOT) // ? +#define RS_ASTR S(RS_PLUS) // * // Row 4 #define RS_RABK S(RS_LABK) // > #define RS_SCLN S(RS_COMM) // ; diff --git a/quantum/keymap_extras/keymap_slovenian.h b/quantum/keymap_extras/keymap_slovenian.h index c479cc07ba4..d24c9c6355e 100644 --- a/quantum/keymap_extras/keymap_slovenian.h +++ b/quantum/keymap_extras/keymap_slovenian.h @@ -137,11 +137,11 @@ #define SI_CARN ALGR(SI_2) // ˇ (dead) #define SI_CIRC ALGR(SI_3) // ^ (dead) #define SI_BREV ALGR(SI_4) // ˘ (dead) -#define SI_DEG ALGR(SI_5) // ° (dead) +#define SI_RNGA ALGR(SI_5) // ° (dead) #define SI_OGON ALGR(SI_6) // ˛ (dead) #define SI_GRV ALGR(SI_7) // ` #define SI_DOTA ALGR(SI_8) // ˙ (dead) -#define SI_ACCU ALGR(SI_9) // ´ (dead) +#define SI_ACUT ALGR(SI_9) // ´ (dead) #define SI_DACU ALGR(SI_0) // ˝ (dead) // Row 2 #define SI_BSLS ALGR(SI_Q) // (backslash) diff --git a/quantum/keymap_extras/keymap_spanish_dvorak.h b/quantum/keymap_extras/keymap_spanish_dvorak.h new file mode 100644 index 00000000000..3b8bd5df97e --- /dev/null +++ b/quantum/keymap_extras/keymap_spanish_dvorak.h @@ -0,0 +1,151 @@ +/* Copyright 2020 José Andrés García + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "keymap.h" + +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ º │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ' │ ¡ │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │ . │ , │ Ñ │ P │ Y │ F │ G │ C │ H │ L │ ` │ + │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │ A │ O │ E │ U │ I │ D │ R │ T │ N │ S │ ' │ Ç │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │ < │ - │ Q │ J │ K │ X │ B │ M │ W │ V │ Z │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define DV_MORD KC_GRV // º +#define DV_1 KC_1 // 1 +#define DV_2 KC_2 // 2 +#define DV_3 KC_3 // 3 +#define DV_4 KC_4 // 4 +#define DV_5 KC_5 // 5 +#define DV_6 KC_6 // 6 +#define DV_7 KC_7 // 7 +#define DV_8 KC_8 // 8 +#define DV_9 KC_9 // 9 +#define DV_0 KC_0 // 0 +#define DV_QUOT KC_MINS // ' +#define DV_IEXL KC_EQL // ¡ +// Row 2 +#define DV_DOT KC_Q // . +#define DV_COMM KC_W // , +#define DV_NTIL KC_E // Ñ +#define DV_P KC_R // P +#define DV_Y KC_T // Y +#define DV_F KC_Y // F +#define DV_G KC_U // G +#define DV_C KC_I // C +#define DV_H KC_O // H +#define DV_L KC_P // L +#define DV_GRV KC_LBRC // ` (dead) +#define DV_PLUS KC_RBRC // + +// Row 3 +#define DV_A KC_A // A +#define DV_O KC_S // O +#define DV_E KC_D // E +#define DV_U KC_F // U +#define DV_I KC_G // I +#define DV_D KC_H // D +#define DV_R KC_J // R +#define DV_T KC_K // T +#define DV_N KC_L // N +#define DV_S KC_SCLN // S +#define DV_ACUT KC_QUOT // ´ (dead) +#define DV_CCED KC_NUHS // Ç +// Row 4 +#define DV_LABK KC_NUBS // < +#define DV_MINS KC_Z // - +#define DV_Q KC_X // Q +#define DV_J KC_C // J +#define DV_K KC_V // K +#define DV_X KC_B // X +#define DV_B KC_N // B +#define DV_M KC_M // M +#define DV_W KC_COMM // W +#define DV_V KC_DOT // V +#define DV_Z KC_SLSH // Z + +/* Shifted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ ª │ ! │ " │ · │ $ │ % │ & │ / │ ( │ ) │ = │ ? │ ¿ │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │ : │ ; │   │   │   │   │   │   │   │   │ ^ │ * │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │   │   │   │   │   │   │   │   │   │   │ ¨ │   │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │ > │ _ │   │   │   │   │   │   │   │   │   │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define DV_FORD S(DV_MORD) // ª +#define DV_EXLM S(DV_1) // ! +#define DV_DQUO S(DV_2) // " +#define DV_BULT S(DV_3) // · +#define DV_DLR S(DV_4) // $ +#define DV_PERC S(DV_5) // % +#define DV_AMPR S(DV_6) // & +#define DV_SLSH S(DV_7) // / +#define DV_LPRN S(DV_8) // ( +#define DV_RPRN S(DV_9) // ) +#define DV_EQL S(DV_0) // = +#define DV_QUES S(DV_QUOT) // ? +#define DV_IQUE S(DV_IEXL) // ¿ +// Row 2 +#define DV_COLN S(KC_DOT) // : +#define DV_SCLN S(KC_COMM) // ; +#define DV_CIRC S(DV_GRV) // ^ (dead) +#define DV_ASTR S(DV_PLUS) // * +// Row 3 +#define DV_DIAE S(DV_GRV) // ¨ (dead) +// Row 4 +#define DV_RABK S(DV_LABK) // > +#define DV_UNDS S(DV_MINS) // _ + +/* AltGr symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ \ │ | │ @ │ # │ ~ │ € │ ¬ │   │   │   │   │   │   │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │   │   │   │   │   │   │   │   │   │   │ [ │ ] │     │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ + * │      │   │   │   │   │   │   │   │   │   │   │ { │ } │    │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │    │   │   │   │   │   │   │   │   │   │   │   │          │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define DV_BSLS ALGR(DV_MORD) // (backslash) +#define DV_PIPE ALGR(DV_1) // | +#define DV_AT ALGR(DV_2) // @ +#define DV_HASH ALGR(DV_3) // # +#define DV_TILD ALGR(DV_4) // ~ +#define DV_EURO ALGR(DV_5) // € +#define DV_NOT ALGR(DV_6) // ¬ +// Row 2 +#define DV_LBRC ALGR(DV_GRV) // [ +#define DV_RBRC ALGR(DV_PLUS) // ] +// Row 3 +#define DV_LCBR ALGR(DV_ACUT) // { +#define DV_RCBR ALGR(DV_CCED) // } diff --git a/quantum/keymap_extras/keymap_swedish.h b/quantum/keymap_extras/keymap_swedish.h index a4d4c3023d3..4d2eaa97838 100644 --- a/quantum/keymap_extras/keymap_swedish.h +++ b/quantum/keymap_extras/keymap_swedish.h @@ -162,6 +162,7 @@ #define SE_BULT SE_CURR #define SE_GRTR SE_RABK #define SE_AA SE_ARNG +#define SE_AE SE_ADIA #define SE_AM SE_ARNG #define SE_MU SE_MICR // Swedish macOS symbols (not vetted) diff --git a/quantum/keymap_extras/keymap_workman_zxcvm.h b/quantum/keymap_extras/keymap_workman_zxcvm.h new file mode 100644 index 00000000000..4ba2ada9e72 --- /dev/null +++ b/quantum/keymap_extras/keymap_workman_zxcvm.h @@ -0,0 +1,125 @@ +/* Copyright 2018 Jacob Jerrell + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "keymap.h" + +// clang-format off + +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │ Q │ D │ R │ W │ B │ J │ F │ U │ P │ ; │ [ │ ] │  \  │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │      │ A │ S │ H │ T │ G │ Y │ N │ E │ O │ I │ ' │        │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ + * │        │ Z │ X │ C │ V │ M │ K │ L │ , │ . │ / │          │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define WK_GRV KC_GRV // ` +#define WK_1 KC_1 // 1 +#define WK_2 KC_2 // 2 +#define WK_3 KC_3 // 3 +#define WK_4 KC_4 // 4 +#define WK_5 KC_5 // 5 +#define WK_6 KC_6 // 6 +#define WK_7 KC_7 // 7 +#define WK_8 KC_8 // 8 +#define WK_9 KC_9 // 9 +#define WK_0 KC_0 // 0 +#define WK_MINS KC_MINS // - +#define WK_EQL KC_EQL // = +// Row 2 +#define WK_Q KC_Q // Q +#define WK_D KC_W // D +#define WK_R KC_E // R +#define WK_W KC_R // W +#define WK_B KC_T // B +#define WK_J KC_Y // J +#define WK_F KC_U // F +#define WK_U KC_I // U +#define WK_P KC_O // P +#define WK_SCLN KC_P // ; +#define WK_LBRC KC_LBRC // [ +#define WK_RBRC KC_RBRC // ] +#define WK_BSLS KC_BSLS // (backslash) +// Row 3 +#define WK_A KC_A // A +#define WK_S KC_S // S +#define WK_H KC_D // H +#define WK_T KC_F // T +#define WK_G KC_G // G +#define WK_Y KC_H // Y +#define WK_N KC_J // N +#define WK_E KC_K // E +#define WK_O KC_L // O +#define WK_I KC_SCLN // I +#define WK_QUOT KC_QUOT // ' +// Row 4 +#define WK_Z KC_Z // Z +#define WK_X KC_X // X +#define WK_C KC_C // C +#define WK_V KC_V // V +#define WK_M KC_B // M +#define WK_K KC_N // K +#define WK_L KC_M // L +#define WK_COMM KC_COMM // , +#define WK_DOT KC_DOT // . +#define WK_SLSH KC_SLSH // / + +/* Shifted symbols + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ _ │ + │       │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │     │   │   │   │   │   │   │   │   │   │ : │ { │ } │  |  │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │      │   │   │   │   │   │   │   │   │   │   │ " │        │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ + * │        │   │   │   │   │   │   │   │ < │ > │ ? │          │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ + * │    │    │    │                        │    │    │    │    │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ + */ +// Row 1 +#define WK_TILD S(WK_GRV) // ~ +#define WK_EXLM S(WK_1) // ! +#define WK_AT S(WK_2) // @ +#define WK_HASH S(WK_3) // # +#define WK_DLR S(WK_4) // $ +#define WK_PERC S(WK_5) // % +#define WK_CIRC S(WK_6) // ^ +#define WK_AMPR S(WK_7) // & +#define WK_ASTR S(WK_8) // * +#define WK_LPRN S(WK_9) // ( +#define WK_RPRN S(WK_0) // ) +#define WK_UNDS S(WK_MINS) // _ +#define WK_PLUS S(WK_EQL) // + +// Row 2 +#define WK_COLN S(WK_SCLN) // : +#define WK_LCBR S(WK_LBRC) // { +#define WK_RCBR S(WK_RBRC) // } +#define WK_PIPE S(WK_BSLS) // | +// Row 3 +#define WK_DQUO S(WK_QUOT) // " +// Row 4 +#define WK_LABK S(WK_COMM) // < +#define WK_RABK S(WK_DOT) // > +#define WK_QUES S(WK_SLSH) // ? diff --git a/quantum/keymap_extras/sendstring_bepo.h b/quantum/keymap_extras/sendstring_bepo.h index 2dfe7e4a41a..8119cd9f540 100644 --- a/quantum/keymap_extras/sendstring_bepo.h +++ b/quantum/keymap_extras/sendstring_bepo.h @@ -74,13 +74,13 @@ const uint8_t ascii_to_keycode_lut[128] PROGMEM = { XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // ! " # $ % & ' - KC_SPC, BP_DCRC, BP_DQOT, BP_DLR, BP_DLR, BP_PERC, BP_P, BP_APOS, + KC_SPC, BP_DCIR, BP_DQUO, BP_DLR, BP_DLR, BP_PERC, BP_P, BP_QUOT, // ( ) * + , - . / BP_LPRN, BP_RPRN, BP_ASTR, BP_PLUS, BP_COMM, BP_MINS, BP_DOT, BP_SLSH, // 0 1 2 3 4 5 6 7 - BP_ASTR, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, BP_AT, BP_PLUS, + BP_ASTR, BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN, BP_AT, BP_PLUS, // 8 9 : ; < = > ? - BP_MINS, BP_SLSH, BP_DOT, BP_COMM, BP_LGIL, BP_EQL, BP_RGIL, BP_APOS, + BP_MINS, BP_SLSH, BP_DOT, BP_COMM, BP_LDAQ, BP_EQL, BP_RDAQ, BP_QUOT, // @ A B C D E F G BP_AT, BP_A, BP_B, BP_C, BP_D, BP_E, BP_F, BP_G, // H I J K L M N O diff --git a/quantum/keymap_extras/sendstring_fr_ch.h b/quantum/keymap_extras/sendstring_fr_ch.h new file mode 100644 index 00000000000..2acce5663b6 --- /dev/null +++ b/quantum/keymap_extras/sendstring_fr_ch.h @@ -0,0 +1,100 @@ +/* Copyright 2020 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Sendstring lookup tables for Swiss French layouts + +#pragma once + +#include "keymap_fr_ch.h" +#include "quantum.h" + +// clang-format off + +const uint8_t ascii_to_shift_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + + KCLUT_ENTRY(0, 1, 1, 0, 0, 1, 1, 0), + KCLUT_ENTRY(1, 1, 1, 1, 0, 0, 0, 1), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 1, 1, 0, 1, 1, 1), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 1), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0) +}; + +const uint8_t ascii_to_altgr_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + + KCLUT_ENTRY(0, 0, 0, 1, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0) +}; + +const uint8_t ascii_to_keycode_lut[128] PROGMEM = { + // NUL SOH STX ETX EOT ENQ ACK BEL + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // BS TAB LF VT FF CR SO SI + KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // DLE DC1 DC2 DC3 DC4 NAK SYN ETB + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // CAN EM SUB ESC FS GS RS US + XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + // ! " # $ % & ' + KC_SPC, CH_DIAE, CH_2, CH_3, CH_DLR, CH_5, CH_6, CH_QUOT, + // ( ) * + , - . / + CH_8, CH_9, CH_3, CH_0, CH_COMM, CH_MINS, CH_DOT, CH_7, + // 0 1 2 3 4 5 6 7 + CH_0, CH_1, CH_2, CH_3, CH_4, CH_5, CH_6, CH_7, + // 8 9 : ; < = > ? + CH_8, CH_9, CH_DOT, CH_COMM, CH_LABK, CH_0, CH_LABK, CH_QUOT, + // @ A B C D E F G + CH_2, CH_A, CH_B, CH_C, CH_D, CH_E, CH_F, CH_G, + // H I J K L M N O + CH_H, CH_I, CH_J, CH_K, CH_L, CH_M, CH_N, CH_O, + // P Q R S T U V W + CH_P, CH_Q, CH_R, CH_S, CH_T, CH_U, CH_V, CH_W, + // X Y Z [ \ ] ^ _ + CH_X, CH_Y, CH_Z, CH_EGRV, CH_LABK, CH_DIAE, CH_CIRC, CH_MINS, + // ` a b c d e f g + CH_CIRC, CH_A, CH_B, CH_C, CH_D, CH_E, CH_F, CH_G, + // h i j k l m n o + CH_H, CH_I, CH_J, CH_K, CH_L, CH_M, CH_N, CH_O, + // p q r s t u v w + CH_P, CH_Q, CH_R, CH_S, CH_T, CH_U, CH_V, CH_W, + // x y z { | } ~ DEL + CH_X, CH_Y, CH_Z, CH_AGRV, CH_7, CH_DLR, CH_CIRC, KC_DEL +}; diff --git a/quantum/keymap_extras/sendstring_french.h b/quantum/keymap_extras/sendstring_french.h index a02f114b4ea..17ea3ed4545 100644 --- a/quantum/keymap_extras/sendstring_french.h +++ b/quantum/keymap_extras/sendstring_french.h @@ -74,7 +74,7 @@ const uint8_t ascii_to_keycode_lut[128] PROGMEM = { XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, // ! " # $ % & ' - KC_SPC, FR_EXLM, FR_QUOT, FR_DQUO, FR_DLR, FR_UGRV, FR_AMP, FR_QUOT, + KC_SPC, FR_EXLM, FR_QUOT, FR_DQUO, FR_DLR, FR_UGRV, FR_AMPR, FR_QUOT, // ( ) * + , - . / FR_LPRN, FR_RPRN, FR_ASTR, FR_EQL, FR_COMM, FR_MINS, FR_SCLN, FR_COLN, // 0 1 2 3 4 5 6 7 diff --git a/quantum/keymap_extras/sendstring_french_osx.h b/quantum/keymap_extras/sendstring_french_osx.h new file mode 100644 index 00000000000..6cadbac1532 --- /dev/null +++ b/quantum/keymap_extras/sendstring_french_osx.h @@ -0,0 +1,100 @@ +/* Copyright 2020 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Sendstring lookup tables for macOS French (AZERTY) layouts + +#pragma once + +#include "keymap_french_osx.h" +#include "quantum.h" + +// clang-format off + +const uint8_t ascii_to_shift_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + + KCLUT_ENTRY(0, 0, 0, 1, 0, 1, 0, 0), + KCLUT_ENTRY(0, 0, 1, 1, 0, 0, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 0, 0, 0, 0, 1, 1), + KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 0, 1), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 1, 0, 0, 0) +}; + +const uint8_t ascii_to_altgr_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0) +}; + +const uint8_t ascii_to_keycode_lut[128] PROGMEM = { + // NUL SOH STX ETX EOT ENQ ACK BEL + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // BS TAB LF VT FF CR SO SI + KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // DLE DC1 DC2 DC3 DC4 NAK SYN ETB + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // CAN EM SUB ESC FS GS RS US + XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + // ! " # $ % & ' + KC_SPC, FR_EXLM, FR_DQUO, FR_AT, FR_DLR, FR_LUGR, FR_AMPR, FR_QUOT, + // ( ) * + , - . / + FR_LPRN, FR_RPRN, FR_DLR, FR_EQL, FR_COMM, FR_MINS, FR_SCLN, FR_COLN, + // 0 1 2 3 4 5 6 7 + FR_LAGR, FR_AMPR, FR_LEAC, FR_DQUO, FR_QUOT, FR_LPRN, FR_SECT, FR_LEGR, + // 8 9 : ; < = > ? + FR_EXLM, FR_LCCE, FR_COLN, FR_SCLN, FR_LABK, FR_EQL, FR_LABK, FR_COMM, + // @ A B C D E F G + FR_AT, FR_A, FR_B, FR_C, FR_D, FR_E, FR_F, FR_G, + // H I J K L M N O + FR_H, FR_I, FR_J, FR_K, FR_L, FR_M, FR_N, FR_O, + // P Q R S T U V W + FR_P, FR_Q, FR_R, FR_S, FR_T, FR_U, FR_V, FR_W, + // X Y Z [ \ ] ^ _ + FR_X, FR_Y, FR_Z, FR_LPRN, FR_COLN, FR_RPRN, FR_CIRC, FR_MINS, + // ` a b c d e f g + FR_GRV, FR_A, FR_B, FR_C, FR_D, FR_E, FR_F, FR_G, + // h i j k l m n o + FR_H, FR_I, FR_J, FR_K, FR_L, FR_M, FR_N, FR_O, + // p q r s t u v w + FR_P, FR_Q, FR_R, FR_S, FR_T, FR_U, FR_V, FR_W, + // x y z { | } ~ DEL + FR_X, FR_Y, FR_Z, FR_LPRN, FR_L, FR_RPRN, FR_N, KC_DEL +}; diff --git a/quantum/keymap_extras/sendstring_german_ch.h b/quantum/keymap_extras/sendstring_german_ch.h new file mode 100644 index 00000000000..1e1327c511d --- /dev/null +++ b/quantum/keymap_extras/sendstring_german_ch.h @@ -0,0 +1,100 @@ +/* Copyright 2020 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Sendstring lookup tables for Swiss German layouts + +#pragma once + +#include "keymap_german_ch.h" +#include "quantum.h" + +// clang-format off + +const uint8_t ascii_to_shift_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + + KCLUT_ENTRY(0, 1, 1, 0, 0, 1, 1, 0), + KCLUT_ENTRY(1, 1, 1, 1, 0, 0, 0, 1), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 1, 1, 0, 1, 1, 1), + KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0) +}; + +const uint8_t ascii_to_altgr_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0) +}; + +const uint8_t ascii_to_keycode_lut[128] PROGMEM = { + // NUL SOH STX ETX EOT ENQ ACK BEL + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // BS TAB LF VT FF CR SO SI + KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // DLE DC1 DC2 DC3 DC4 NAK SYN ETB + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // CAN EM SUB ESC FS GS RS US + XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + // ! " # $ % & ' + KC_SPC, CH_DIAE, CH_2, CH_3, CH_DLR, CH_5, CH_6, CH_QUOT, + // ( ) * + , - . / + CH_8, CH_9, CH_3, CH_1, CH_COMM, CH_MINS, CH_DOT, CH_7, + // 0 1 2 3 4 5 6 7 + CH_0, CH_1, CH_2, CH_3, CH_4, CH_5, CH_6, CH_7, + // 8 9 : ; < = > ? + CH_8, CH_9, CH_DOT, CH_COMM, CH_LABK, CH_0, CH_LABK, CH_QUOT, + // @ A B C D E F G + CH_2, CH_A, CH_B, CH_C, CH_D, CH_E, CH_F, CH_G, + // H I J K L M N O + CH_H, CH_I, CH_J, CH_K, CH_L, CH_M, CH_N, CH_O, + // P Q R S T U V W + CH_P, CH_Q, CH_R, CH_S, CH_T, CH_U, CH_V, CH_W, + // X Y Z [ \ ] ^ _ + CH_X, CH_Y, CH_Z, CH_UDIA, CH_LABK, CH_DIAE, CH_CIRC, CH_MINS, + // ` a b c d e f g + CH_CIRC, CH_A, CH_B, CH_C, CH_D, CH_E, CH_F, CH_G, + // h i j k l m n o + CH_H, CH_I, CH_J, CH_K, CH_L, CH_M, CH_N, CH_O, + // p q r s t u v w + CH_P, CH_Q, CH_R, CH_S, CH_T, CH_U, CH_V, CH_W, + // x y z { | } ~ DEL + CH_X, CH_Y, CH_Z, CH_ADIA, CH_7, CH_DLR, CH_CIRC, KC_DEL +}; diff --git a/quantum/keymap_extras/sendstring_german_osx.h b/quantum/keymap_extras/sendstring_german_osx.h new file mode 100644 index 00000000000..03f54da2afa --- /dev/null +++ b/quantum/keymap_extras/sendstring_german_osx.h @@ -0,0 +1,100 @@ +/* Copyright 2020 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Sendstring lookup tables for macOS German layouts + +#pragma once + +#include "keymap_german_osx.h" +#include "quantum.h" + +// clang-format off + +const uint8_t ascii_to_shift_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + + KCLUT_ENTRY(0, 1, 1, 0, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 1, 1, 0, 1, 1, 1), + KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 0, 1, 0, 0, 1), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0) +}; + +const uint8_t ascii_to_altgr_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0) +}; + +const uint8_t ascii_to_keycode_lut[128] PROGMEM = { + // NUL SOH STX ETX EOT ENQ ACK BEL + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // BS TAB LF VT FF CR SO SI + KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // DLE DC1 DC2 DC3 DC4 NAK SYN ETB + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // CAN EM SUB ESC FS GS RS US + XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + // ! " # $ % & ' + KC_SPC, DE_1, DE_2, DE_HASH, DE_4, DE_5, DE_6, DE_HASH, + // ( ) * + , - . / + DE_8, DE_9, DE_PLUS, DE_PLUS, DE_COMM, DE_MINS, DE_DOT, DE_7, + // 0 1 2 3 4 5 6 7 + DE_0, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, + // 8 9 : ; < = > ? + DE_8, DE_9, DE_DOT, DE_COMM, DE_LABK, DE_0, DE_LABK, DE_SS, + // @ A B C D E F G + DE_L, DE_A, DE_B, DE_C, DE_D, DE_E, DE_F, DE_G, + // H I J K L M N O + DE_H, DE_I, DE_J, DE_K, DE_L, DE_M, DE_N, DE_O, + // P Q R S T U V W + DE_P, DE_Q, DE_R, DE_S, DE_T, DE_U, DE_V, DE_W, + // X Y Z [ \ ] ^ _ + DE_X, DE_Y, DE_Z, DE_5, DE_7, DE_6, DE_CIRC, DE_MINS, + // ` a b c d e f g + DE_ACUT, DE_A, DE_B, DE_C, DE_D, DE_E, DE_F, DE_G, + // h i j k l m n o + DE_H, DE_I, DE_J, DE_K, DE_L, DE_M, DE_N, DE_O, + // p q r s t u v w + DE_P, DE_Q, DE_R, DE_S, DE_T, DE_U, DE_V, DE_W, + // x y z { | } ~ DEL + DE_X, DE_Y, DE_Z, DE_8, DE_7, DE_9, DE_N, KC_DEL +}; diff --git a/quantum/keymap_extras/sendstring_italian_osx_ansi.h b/quantum/keymap_extras/sendstring_italian_osx_ansi.h new file mode 100644 index 00000000000..c61874015f5 --- /dev/null +++ b/quantum/keymap_extras/sendstring_italian_osx_ansi.h @@ -0,0 +1,100 @@ +/* Copyright 2020 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Sendstring lookup tables for macOS Italian ANSI layouts + +#pragma once + +#include "keymap_italian_osx_ansi.h" +#include "quantum.h" + +// clang-format off + +const uint8_t ascii_to_shift_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + + KCLUT_ENTRY(0, 1, 1, 0, 1, 1, 1, 0), + KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 1, 1, 0, 1, 1, 1), + KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 1, 1), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 0, 0) +}; + +const uint8_t ascii_to_altgr_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + + KCLUT_ENTRY(0, 0, 0, 1, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 0, 1, 0, 0), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 0, 1, 1, 0) +}; + +const uint8_t ascii_to_keycode_lut[128] PROGMEM = { + // NUL SOH STX ETX EOT ENQ ACK BEL + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // BS TAB LF VT FF CR SO SI + KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // DLE DC1 DC2 DC3 DC4 NAK SYN ETB + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // CAN EM SUB ESC FS GS RS US + XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + // ! " # $ % & ' + KC_SPC, IT_1, IT_2, IT_AGRV, IT_4, IT_5, IT_6, IT_QUOT, + // ( ) * + , - . / + IT_8, IT_9, IT_PLUS, IT_PLUS, IT_COMM, IT_MINS, IT_DOT, IT_7, + // 0 1 2 3 4 5 6 7 + IT_0, IT_1, IT_2, IT_3, IT_4, IT_5, IT_6, IT_7, + // 8 9 : ; < = > ? + IT_8, IT_9, IT_DOT, IT_COMM, IT_LABK, IT_0, IT_LABK, IT_QUOT, + // @ A B C D E F G + IT_OGRV, IT_A, IT_B, IT_C, IT_D, IT_E, IT_F, IT_G, + // H I J K L M N O + IT_H, IT_I, IT_J, IT_K, IT_L, IT_M, IT_N, IT_O, + // P Q R S T U V W + IT_P, IT_Q, IT_R, IT_S, IT_T, IT_U, IT_V, IT_W, + // X Y Z [ \ ] ^ _ + IT_X, IT_Y, IT_Z, IT_EGRV, IT_BSLS, IT_PLUS, IT_IGRV, IT_MINS, + // ` a b c d e f g + IT_BSLS, IT_A, IT_B, IT_C, IT_D, IT_E, IT_F, IT_G, + // h i j k l m n o + IT_H, IT_I, IT_J, IT_K, IT_L, IT_M, IT_N, IT_O, + // p q r s t u v w + IT_P, IT_Q, IT_R, IT_S, IT_T, IT_U, IT_V, IT_W, + // x y z { | } ~ DEL + IT_X, IT_Y, IT_Z, IT_EGRV, IT_BSLS, IT_PLUS, IT_5, KC_DEL +}; diff --git a/quantum/keymap_extras/sendstring_italian_osx_iso.h b/quantum/keymap_extras/sendstring_italian_osx_iso.h new file mode 100644 index 00000000000..eb5853b0069 --- /dev/null +++ b/quantum/keymap_extras/sendstring_italian_osx_iso.h @@ -0,0 +1,100 @@ +/* Copyright 2020 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Sendstring lookup tables for macOS Italian ISO layouts + +#pragma once + +#include "keymap_italian_osx_iso.h" +#include "quantum.h" + +// clang-format off + +const uint8_t ascii_to_shift_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + + KCLUT_ENTRY(0, 1, 1, 0, 1, 1, 1, 0), + KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 1, 1, 0, 1, 1, 1), + KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 1, 1), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 0, 0) +}; + +const uint8_t ascii_to_altgr_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + + KCLUT_ENTRY(0, 0, 0, 1, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 0, 1, 0, 0), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 0, 1, 1, 0) +}; + +const uint8_t ascii_to_keycode_lut[128] PROGMEM = { + // NUL SOH STX ETX EOT ENQ ACK BEL + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // BS TAB LF VT FF CR SO SI + KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // DLE DC1 DC2 DC3 DC4 NAK SYN ETB + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // CAN EM SUB ESC FS GS RS US + XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + // ! " # $ % & ' + KC_SPC, IT_1, IT_2, IT_AGRV, IT_4, IT_5, IT_6, IT_QUOT, + // ( ) * + , - . / + IT_8, IT_9, IT_PLUS, IT_PLUS, IT_COMM, IT_MINS, IT_DOT, IT_7, + // 0 1 2 3 4 5 6 7 + IT_0, IT_1, IT_2, IT_3, IT_4, IT_5, IT_6, IT_7, + // 8 9 : ; < = > ? + IT_8, IT_9, IT_DOT, IT_COMM, IT_LABK, IT_0, IT_LABK, IT_QUOT, + // @ A B C D E F G + IT_OGRV, IT_A, IT_B, IT_C, IT_D, IT_E, IT_F, IT_G, + // H I J K L M N O + IT_H, IT_I, IT_J, IT_K, IT_L, IT_M, IT_N, IT_O, + // P Q R S T U V W + IT_P, IT_Q, IT_R, IT_S, IT_T, IT_U, IT_V, IT_W, + // X Y Z [ \ ] ^ _ + IT_X, IT_Y, IT_Z, IT_EGRV, IT_BSLS, IT_PLUS, IT_IGRV, IT_MINS, + // ` a b c d e f g + IT_BSLS, IT_A, IT_B, IT_C, IT_D, IT_E, IT_F, IT_G, + // h i j k l m n o + IT_H, IT_I, IT_J, IT_K, IT_L, IT_M, IT_N, IT_O, + // p q r s t u v w + IT_P, IT_Q, IT_R, IT_S, IT_T, IT_U, IT_V, IT_W, + // x y z { | } ~ DEL + IT_X, IT_Y, IT_Z, IT_EGRV, IT_BSLS, IT_PLUS, IT_5, KC_DEL +}; diff --git a/quantum/keymap_extras/sendstring_spanish.h b/quantum/keymap_extras/sendstring_spanish.h index 405cf9b0a37..b984a6f463e 100644 --- a/quantum/keymap_extras/sendstring_spanish.h +++ b/quantum/keymap_extras/sendstring_spanish.h @@ -96,5 +96,5 @@ const uint8_t ascii_to_keycode_lut[128] PROGMEM = { // p q r s t u v w ES_P, ES_Q, ES_R, ES_S, ES_T, ES_U, ES_V, ES_W, // x y z { | } ~ DEL - ES_X, ES_Y, ES_Z, ES_ACUT, ES_1, ES_CCED, ES_NTIL, KC_DEL + ES_X, ES_Y, ES_Z, ES_ACUT, ES_1, ES_CCED, ES_4, KC_DEL }; diff --git a/quantum/keymap_extras/sendstring_spanish_dvorak.h b/quantum/keymap_extras/sendstring_spanish_dvorak.h new file mode 100644 index 00000000000..87d582491c1 --- /dev/null +++ b/quantum/keymap_extras/sendstring_spanish_dvorak.h @@ -0,0 +1,100 @@ +/* Copyright 2020 José Andrés García + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Sendstring lookup tables for Spanish Dvorak layout + +#pragma once + +#include "keymap_spanish_dvorak.h" +#include "quantum.h" + +// clang-format off + +const uint8_t ascii_to_shift_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + + KCLUT_ENTRY(0, 1, 1, 0, 1, 1, 1, 0), + KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 1, 1, 0, 1, 1, 1), + KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1), + KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 1, 1), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0) +}; + +const uint8_t ascii_to_altgr_lut[16] PROGMEM = { + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + + KCLUT_ENTRY(0, 0, 0, 1, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0), + KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0) +}; + +const uint8_t ascii_to_keycode_lut[128] PROGMEM = { + // NUL SOH STX ETX EOT ENQ ACK BEL + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // BS TAB LF VT FF CR SO SI + KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // DLE DC1 DC2 DC3 DC4 NAK SYN ETB + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // CAN EM SUB ESC FS GS RS US + XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + // ! " # $ % & ' + KC_SPC, DV_1, DV_2, DV_3, DV_4, DV_5, DV_6, DV_QUOT, + // ( ) * + , - . / + DV_8, DV_9, DV_PLUS, DV_PLUS, DV_COMM, DV_MINS, DV_DOT, DV_7, + // 0 1 2 3 4 5 6 7 + DV_0, DV_1, DV_2, DV_3, DV_4, DV_5, DV_6, DV_7, + // 8 9 : ; < = > ? + DV_8, DV_9, DV_DOT, DV_COMM, DV_LABK, DV_0, DV_LABK, DV_QUOT, + // @ A B C D E F G + DV_2, DV_A, DV_B, DV_C, DV_D, DV_E, DV_F, DV_G, + // H I J K L M N O + DV_H, DV_I, DV_J, DV_K, DV_L, DV_M, DV_N, DV_O, + // P Q R S T U V W + DV_P, DV_Q, DV_R, DV_S, DV_T, DV_U, DV_V, DV_W, + // X Y Z [ \ ] ^ _ + DV_X, DV_Y, DV_Z, DV_GRV, DV_MORD, DV_PLUS, DV_GRV, DV_MINS, + // ` a b c d e f g + DV_GRV, DV_A, DV_B, DV_C, DV_D, DV_E, DV_F, DV_G, + // h i j k l m n o + DV_H, DV_I, DV_J, DV_K, DV_L, DV_M, DV_N, DV_O, + // p q r s t u v w + DV_P, DV_Q, DV_R, DV_S, DV_T, DV_U, DV_V, DV_W, + // x y z { | } ~ DEL + DV_X, DV_Y, DV_Z, DV_ACUT, DV_1, DV_CCED, DV_4, KC_DEL +}; diff --git a/quantum/keymap_extras/sendstring_workman_zxcvm.h b/quantum/keymap_extras/sendstring_workman_zxcvm.h new file mode 100644 index 00000000000..e7605d7cce1 --- /dev/null +++ b/quantum/keymap_extras/sendstring_workman_zxcvm.h @@ -0,0 +1,59 @@ +/* Copyright 2018 Jacob Jerrell + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Sendstring lookup tables for Workman ZXCVM layouts + +#pragma once + +#include "keymap_workman_zxcvm.h" + +// clang-format off + +const uint8_t ascii_to_keycode_lut[128] PROGMEM = { + // NUL SOH STX ETX EOT ENQ ACK BEL + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // BS TAB LF VT FF CR SO SI + KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // DLE DC1 DC2 DC3 DC4 NAK SYN ETB + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + // CAN EM SUB ESC FS GS RS US + XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + // ! " # $ % & ' + KC_SPC, WK_1, WK_QUOT, WK_3, WK_4, WK_5, WK_7, WK_QUOT, + // ( ) * + , - . / + WK_9, WK_0, WK_8, WK_EQL, WK_COMM, WK_MINS, WK_DOT, WK_SLSH, + // 0 1 2 3 4 5 6 7 + WK_0, WK_1, WK_2, WK_3, WK_4, WK_5, WK_6, WK_7, + // 8 9 : ; < = > ? + WK_8, WK_9, WK_SCLN, WK_SCLN, WK_COMM, WK_EQL, WK_DOT, WK_SLSH, + // @ A B C D E F G + WK_2, WK_A, WK_B, WK_C, WK_D, WK_E, WK_F, WK_G, + // H I J K L M N O + WK_H, WK_I, WK_J, WK_K, WK_L, WK_M, WK_N, WK_O, + // P Q R S T U V W + WK_P, WK_Q, WK_R, WK_S, WK_T, WK_U, WK_V, WK_W, + // X Y Z [ \ ] ^ _ + WK_X, WK_Y, WK_Z, WK_LBRC, WK_BSLS, WK_RBRC, WK_6, WK_MINS, + // ` a b c d e f g + WK_GRV, WK_A, WK_B, WK_C, WK_D, WK_E, WK_F, WK_G, + // h i j k l m n o + WK_H, WK_I, WK_J, WK_K, WK_L, WK_M, WK_N, WK_O, + // p q r s t u v w + WK_P, WK_Q, WK_R, WK_S, WK_T, WK_U, WK_V, WK_W, + // x y z { | } ~ DEL + WK_X, WK_Y, WK_Z, WK_LBRC, WK_BSLS, WK_RBRC, WK_GRV, KC_DEL +}; diff --git a/quantum/quantum.c b/quantum/quantum.c index 76a48cc77cf..2053a1a5f47 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -149,18 +149,21 @@ void reset_keyboard(void) { } /* Convert record into usable keycode via the contained event. */ -uint16_t get_record_keycode(keyrecord_t *record) { return get_event_keycode(record->event); } +uint16_t get_record_keycode(keyrecord_t *record, bool update_layer_cache) { return get_event_keycode(record->event, update_layer_cache); } /* Convert event into usable keycode. Checks the layer cache to ensure that it * retains the correct keycode after a layer change, if the key is still pressed. + * "update_layer_cache" is to ensure that it only updates the layer cache when + * appropriate, otherwise, it will update it and cause layer tap (and other keys) + * from triggering properly. */ -uint16_t get_event_keycode(keyevent_t event) { +uint16_t get_event_keycode(keyevent_t event, bool update_layer_cache) { #if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE) /* TODO: Use store_or_get_action() or a similar function. */ if (!disable_action_cache) { uint8_t layer; - if (event.pressed) { + if (event.pressed && update_layer_cache) { layer = layer_switch_get_layer(event.key); update_source_layers_cache(event.key, layer); } else { @@ -174,7 +177,7 @@ uint16_t get_event_keycode(keyevent_t event) { /* Get keycode, and then call keyboard function */ void post_process_record_quantum(keyrecord_t *record) { - uint16_t keycode = get_record_keycode(record); + uint16_t keycode = get_record_keycode(record, false); post_process_record_kb(keycode, record); } @@ -182,7 +185,7 @@ void post_process_record_quantum(keyrecord_t *record) { then processes internal quantum keycodes, and then processes ACTIONs. */ bool process_record_quantum(keyrecord_t *record) { - uint16_t keycode = get_record_keycode(record); + uint16_t keycode = get_record_keycode(record, true); // This is how you use actions here // if (keycode == KC_LEAD) { diff --git a/quantum/quantum.h b/quantum/quantum.h index 4b94ebcc052..45f44f49a1a 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -252,8 +252,8 @@ void matrix_init_kb(void); void matrix_scan_kb(void); void matrix_init_user(void); void matrix_scan_user(void); -uint16_t get_record_keycode(keyrecord_t *record); -uint16_t get_event_keycode(keyevent_t event); +uint16_t get_record_keycode(keyrecord_t *record, bool update_layer_cache); +uint16_t get_event_keycode(keyevent_t event, bool update_layer_cache); bool process_action_kb(keyrecord_t *record); bool process_record_kb(uint16_t keycode, keyrecord_t *record); bool process_record_user(uint16_t keycode, keyrecord_t *record); diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index f6aac223417..0958c4f4eb0 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -521,13 +521,15 @@ enum quantum_keycodes { #define LSFT(kc) (QK_LSFT | (kc)) #define LALT(kc) (QK_LALT | (kc)) #define LGUI(kc) (QK_LGUI | (kc)) +#define LOPT(kc) LALT(kc) #define LCMD(kc) LGUI(kc) #define LWIN(kc) LGUI(kc) #define RCTL(kc) (QK_RCTL | (kc)) #define RSFT(kc) (QK_RSFT | (kc)) #define RALT(kc) (QK_RALT | (kc)) -#define ALGR(kc) RALT(kc) #define RGUI(kc) (QK_RGUI | (kc)) +#define ALGR(kc) RALT(kc) +#define ROPT(kc) RALT(kc) #define RCMD(kc) RGUI(kc) #define RWIN(kc) RGUI(kc) @@ -736,8 +738,11 @@ enum quantum_keycodes { #define LALT_T(kc) MT(MOD_LALT, kc) #define RALT_T(kc) MT(MOD_RALT, kc) -#define ALT_T(kc) LALT_T(kc) +#define LOPT_T(kc) LALT_T(kc) +#define ROPT_T(kc) RALT_T(kc) #define ALGR_T(kc) RALT_T(kc) +#define ALT_T(kc) LALT_T(kc) +#define OPT_T(kc) LOPT_T(kc) #define LGUI_T(kc) MT(MOD_LGUI, kc) #define RGUI_T(kc) MT(MOD_RGUI, kc) diff --git a/quantum/send_string_keycodes.h b/quantum/send_string_keycodes.h index 86dc8bf00c2..1e8a8e9ff5b 100644 --- a/quantum/send_string_keycodes.h +++ b/quantum/send_string_keycodes.h @@ -96,11 +96,13 @@ /* Modifiers */ #define X_LCTL X_LCTRL #define X_LSFT X_LSHIFT +#define X_LOPT X_LALT #define X_LCMD X_LGUI #define X_LWIN X_LGUI #define X_RCTL X_RCTRL #define X_RSFT X_RSHIFT #define X_ALGR X_RALT +#define X_ROPT X_RALT #define X_RCMD X_RGUI #define X_RWIN X_RGUI diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index a8d01a9e8cb..f5c12577126 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk @@ -105,13 +105,6 @@ endef teensy: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware $(call EXEC_TEENSY) -BATCHISP ?= batchisp - -flip: $(BUILD_DIR)/$(TARGET).hex check-size - $(BATCHISP) -hardware usb -device $(MCU) -operation erase f - $(BATCHISP) -hardware usb -device $(MCU) -operation loadbuffer $(BUILD_DIR)/$(TARGET).hex program - $(BATCHISP) -hardware usb -device $(MCU) -operation start reset 0 - DFU_PROGRAMMER ?= dfu-programmer GREP ?= grep @@ -146,13 +139,6 @@ dfu-start: $(DFU_PROGRAMMER) $(MCU) reset $(DFU_PROGRAMMER) $(MCU) start -flip-ee: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep - $(COPY) $(BUILD_DIR)/$(TARGET).eep $(BUILD_DIR)/$(TARGET)eep.hex - $(BATCHISP) -hardware usb -device $(MCU) -operation memory EEPROM erase - $(BATCHISP) -hardware usb -device $(MCU) -operation memory EEPROM loadbuffer $(BUILD_DIR)/$(TARGET)eep.hex program - $(BATCHISP) -hardware usb -device $(MCU) -operation start reset 0 - $(REMOVE) $(BUILD_DIR)/$(TARGET)eep.hex - dfu-ee: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep if $(DFU_PROGRAMMER) --version 2>&1 | $(GREP) -q 0.7 ; then\ $(DFU_PROGRAMMER) $(MCU) flash --eeprom $(BUILD_DIR)/$(TARGET).eep;\ diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 74db245c12d..e5e9e270525 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -324,7 +324,7 @@ void process_action(keyrecord_t *record, action_t action) { # if !defined(IGNORE_MOD_TAP_INTERRUPT) || defined(IGNORE_MOD_TAP_INTERRUPT_PER_KEY) if ( # ifdef IGNORE_MOD_TAP_INTERRUPT_PER_KEY - !get_ignore_mod_tap_interrupt(get_event_keycode(record->event)) && + !get_ignore_mod_tap_interrupt(get_event_keycode(record->event, false)) && # endif record->tap.interrupted) { dprint("mods_tap: tap: cancel: add_mods\n"); @@ -870,7 +870,7 @@ void tap_code(uint8_t code) { /** \brief Adds the given physically pressed modifiers and sends a keyboard report immediately. * - * \param mods A bitfield of modifiers to unregister. + * \param mods A bitfield of modifiers to register. */ void register_mods(uint8_t mods) { if (mods) { diff --git a/tmk_core/common/action_tapping.c b/tmk_core/common/action_tapping.c index acce3ee5157..34f08d89048 100644 --- a/tmk_core/common/action_tapping.c +++ b/tmk_core/common/action_tapping.c @@ -22,7 +22,7 @@ __attribute__((weak)) uint16_t get_tapping_term(uint16_t keycode) { return TAPPING_TERM; } # ifdef TAPPING_TERM_PER_KEY -# define WITHIN_TAPPING_TERM(e) (TIMER_DIFF_16(e.time, tapping_key.event.time) < get_tapping_term(get_event_keycode(tapping_key.event))) +# define WITHIN_TAPPING_TERM(e) (TIMER_DIFF_16(e.time, tapping_key.event.time) < get_tapping_term(get_event_keycode(tapping_key.event, false))) # else # define WITHIN_TAPPING_TERM(e) (TIMER_DIFF_16(e.time, tapping_key.event.time) < TAPPING_TERM) # endif @@ -122,10 +122,10 @@ bool process_tapping(keyrecord_t *keyp) { # if defined(TAPPING_TERM_PER_KEY) || (TAPPING_TERM >= 500) || defined(PERMISSIVE_HOLD) || defined(PERMISSIVE_HOLD_PER_KEY) else if ( # ifdef TAPPING_TERM_PER_KEY - (get_tapping_term(get_event_keycode(tapping_key.event)) >= 500) && + (get_tapping_term(get_event_keycode(tapping_key.event, false)) >= 500) && # endif # ifdef PERMISSIVE_HOLD_PER_KEY - !get_permissive_hold(get_event_keycode(tapping_key.event), keyp) && + !get_permissive_hold(get_event_keycode(tapping_key.event, false), keyp) && # endif IS_RELEASED(event) && waiting_buffer_typed(event)) { debug("Tapping: End. No tap. Interfered by typing key\n"); @@ -246,7 +246,7 @@ bool process_tapping(keyrecord_t *keyp) { # if !defined(TAPPING_FORCE_HOLD) || defined(TAPPING_FORCE_HOLD_PER_KEY) if ( # ifdef TAPPING_FORCE_HOLD_PER_KEY - !get_tapping_force_hold(get_event_keycode(tapping_key.event), keyp) && + !get_tapping_force_hold(get_event_keycode(tapping_key.event, false), keyp) && # endif !tapping_key.tap.interrupted && tapping_key.tap.count > 0) { // sequential tap. diff --git a/tmk_core/common/action_tapping.h b/tmk_core/common/action_tapping.h index 509d5eabd84..5eaef1c5f09 100644 --- a/tmk_core/common/action_tapping.h +++ b/tmk_core/common/action_tapping.h @@ -32,7 +32,7 @@ along with this program. If not, see . #define WAITING_BUFFER_SIZE 8 #ifndef NO_ACTION_TAPPING -uint16_t get_event_keycode(keyevent_t event); +uint16_t get_event_keycode(keyevent_t event, bool update_layer_cache); uint16_t get_tapping_term(uint16_t keycode); void action_tapping_process(keyrecord_t record); #endif diff --git a/tmk_core/common/keycode.h b/tmk_core/common/keycode.h index e1059fadf0c..5c8ba8fe60e 100644 --- a/tmk_core/common/keycode.h +++ b/tmk_core/common/keycode.h @@ -152,11 +152,13 @@ along with this program. If not, see . /* Modifiers */ #define KC_LCTL KC_LCTRL #define KC_LSFT KC_LSHIFT +#define KC_LOPT KC_LALT #define KC_LCMD KC_LGUI #define KC_LWIN KC_LGUI #define KC_RCTL KC_RCTRL #define KC_RSFT KC_RSHIFT #define KC_ALGR KC_RALT +#define KC_ROPT KC_RALT #define KC_RCMD KC_RGUI #define KC_RWIN KC_RGUI diff --git a/tmk_core/protocol/arm_atsam/usb/conf_usb.h b/tmk_core/protocol/arm_atsam/usb/conf_usb.h index f236427ca1d..184a2e81dc3 100644 --- a/tmk_core/protocol/arm_atsam/usb/conf_usb.h +++ b/tmk_core/protocol/arm_atsam/usb/conf_usb.h @@ -116,34 +116,32 @@ * @{ */ //! Interface callback definition -#ifdef KBD -# define UDI_HID_KBD_ENABLE_EXT() main_kbd_enable() -# define UDI_HID_KBD_DISABLE_EXT() main_kbd_disable() -//#define UDI_HID_KBD_CHANGE_LED(value) ui_kbd_led(value) -#endif +#define UDI_HID_KBD_ENABLE_EXT() main_kbd_enable() +#define UDI_HID_KBD_DISABLE_EXT() main_kbd_disable() +//#define UDI_HID_KBD_CHANGE_LED(value) ui_kbd_led(value) -#ifdef NKRO +#ifdef NKRO_ENABLE # define UDI_HID_NKRO_ENABLE_EXT() main_nkro_enable() # define UDI_HID_NKRO_DISABLE_EXT() main_nkro_disable() -//#define UDI_HID_NKRO_CHANGE_LED(value) ui_kbd_led(value) +//#define UDI_HID_NKRO_CHANGE_LED(value) ui_kbd_led(value) #endif -#ifdef EXK +#ifdef EXTRAKEY_ENABLE # define UDI_HID_EXK_ENABLE_EXT() main_exk_enable() # define UDI_HID_EXK_DISABLE_EXT() main_exk_disable() #endif -#ifdef CON +#ifdef CONSOLE_ENABLE # define UDI_HID_CON_ENABLE_EXT() main_con_enable() # define UDI_HID_CON_DISABLE_EXT() main_con_disable() #endif -#ifdef MOU +#ifdef MOUSE_ENABLE # define UDI_HID_MOU_ENABLE_EXT() main_mou_enable() # define UDI_HID_MOU_DISABLE_EXT() main_mou_disable() #endif -#ifdef RAW +#ifdef RAW_ENABLE # define UDI_HID_RAW_ENABLE_EXT() main_raw_enable() # define UDI_HID_RAW_DISABLE_EXT() main_raw_disable() # define UDI_HID_RAW_RECEIVE(buffer, len) main_raw_receive(buffer, len) diff --git a/tmk_core/protocol/arm_atsam/usb/main_usb.c b/tmk_core/protocol/arm_atsam/usb/main_usb.c index 3809e1fd020..5fcb9a9c612 100644 --- a/tmk_core/protocol/arm_atsam/usb/main_usb.c +++ b/tmk_core/protocol/arm_atsam/usb/main_usb.c @@ -18,7 +18,8 @@ along with this program. If not, see . #include "samd51j18a.h" #include "conf_usb.h" #include "udd.h" -#ifdef RAW + +#ifdef RAW_ENABLE # include "raw_hid.h" #endif @@ -34,7 +35,6 @@ void main_remotewakeup_enable(void) { ui_wakeup_enable(); } void main_remotewakeup_disable(void) { ui_wakeup_disable(); } -#ifdef KBD volatile bool main_b_kbd_enable = false; bool main_kbd_enable(void) { main_b_kbd_enable = true; @@ -42,9 +42,8 @@ bool main_kbd_enable(void) { } void main_kbd_disable(void) { main_b_kbd_enable = false; } -#endif -#ifdef NKRO +#ifdef NKRO_ENABLE volatile bool main_b_nkro_enable = false; bool main_nkro_enable(void) { main_b_nkro_enable = true; @@ -54,7 +53,7 @@ bool main_nkro_enable(void) { void main_nkro_disable(void) { main_b_nkro_enable = false; } #endif -#ifdef EXK +#ifdef EXTRAKEY_ENABLE volatile bool main_b_exk_enable = false; bool main_exk_enable(void) { main_b_exk_enable = true; @@ -64,7 +63,7 @@ bool main_exk_enable(void) { void main_exk_disable(void) { main_b_exk_enable = false; } #endif -#ifdef CON +#ifdef CONSOLE_ENABLE volatile bool main_b_con_enable = false; bool main_con_enable(void) { main_b_con_enable = true; @@ -74,7 +73,7 @@ bool main_con_enable(void) { void main_con_disable(void) { main_b_con_enable = false; } #endif -#ifdef MOU +#ifdef MOUSE_ENABLE volatile bool main_b_mou_enable = false; bool main_mou_enable(void) { main_b_mou_enable = true; @@ -84,7 +83,7 @@ bool main_mou_enable(void) { void main_mou_disable(void) { main_b_mou_enable = false; } #endif -#ifdef RAW +#ifdef RAW_ENABLE volatile bool main_b_raw_enable = false; bool main_raw_enable(void) { main_b_raw_enable = true; diff --git a/tmk_core/protocol/arm_atsam/usb/udi_cdc.c b/tmk_core/protocol/arm_atsam/usb/udi_cdc.c index 8271f3b97fa..27db4017c44 100644 --- a/tmk_core/protocol/arm_atsam/usb/udi_cdc.c +++ b/tmk_core/protocol/arm_atsam/usb/udi_cdc.c @@ -57,7 +57,7 @@ #include "stdarg.h" #include "tmk_core/protocol/arm_atsam/clks.h" -#ifdef CDC +#ifdef VIRTSER_ENABLE # ifdef UDI_CDC_LOW_RATE # ifdef USB_DEVICE_HS_SUPPORT diff --git a/tmk_core/protocol/arm_atsam/usb/udi_cdc.h b/tmk_core/protocol/arm_atsam/usb/udi_cdc.h index 9135bab546e..406023980c7 100644 --- a/tmk_core/protocol/arm_atsam/usb/udi_cdc.h +++ b/tmk_core/protocol/arm_atsam/usb/udi_cdc.h @@ -47,7 +47,7 @@ #ifndef _UDI_CDC_H_ #define _UDI_CDC_H_ -#ifdef CDC +#ifdef VIRTSER_ENABLE # include "conf_usb.h" # include "usb_protocol.h" @@ -346,7 +346,7 @@ typedef struct { char buf[CDC_INBUF_SIZE]; } inbuf_t; -#else // CDC +#else // VIRTSER_ENABLE // keep these to accommodate calls if remaining # define CDC_PRINTBUF_SIZE 1 @@ -362,7 +362,7 @@ typedef struct { extern inbuf_t inbuf; -#endif // CDC +#endif // VIRTSER_ENABLE uint32_t CDC_print(char* printbuf); int CDC_printf(const char* _Format, ...); diff --git a/tmk_core/protocol/arm_atsam/usb/udi_device_conf.h b/tmk_core/protocol/arm_atsam/usb/udi_device_conf.h index 80556205f2a..505db47b06c 100644 --- a/tmk_core/protocol/arm_atsam/usb/udi_device_conf.h +++ b/tmk_core/protocol/arm_atsam/usb/udi_device_conf.h @@ -23,77 +23,36 @@ along with this program. If not, see . #include "compiler.h" #include "usb_protocol_hid.h" -#define DEVICE_CLASS 0 -#define DEVICE_SUBCLASS 0 -#define DEVICE_PROTOCOL 0 - -#define KBD - -//#define MOUSE_ENABLE //rules.mk -#ifdef MOUSE_ENABLE -# define MOU -#endif - -//#define EXTRAKEY_ENABLE //rules.mk -#ifdef EXTRAKEY_ENABLE -# define EXK -#endif - -//#define RAW_ENABLE //rules.mk -#ifdef RAW_ENABLE -# define RAW -#endif - -//#define CONSOLE_ENABLE //rules.mk -#ifdef CONSOLE_ENABLE -# define CON -#endif - -//#define NKRO_ENABLE //rules.mk -#ifdef NKRO_ENABLE -# define NKRO -#endif - -//#define MIDI_ENABLE //deferred implementation -//#ifdef MIDI_ENABLE -//#define MIDI -//#endif - -//#define VIRTSER_ENABLE //rules.mk #ifdef VIRTSER_ENABLE -# define CDC // because CDC uses IAD (interface association descriptor // per USB Interface Association Descriptor Device Class Code and Use Model 7/23/2003 Rev 1.0) -# undef DEVICE_CLASS # define DEVICE_CLASS 0xEF -# undef DEVICE_SUBCLASS # define DEVICE_SUBCLASS 0x02 -# undef DEVICE_PROTOCOL # define DEVICE_PROTOCOL 0x01 +#else +# define DEVICE_CLASS 0x00 +# define DEVICE_SUBCLASS 0x00 +# define DEVICE_PROTOCOL 0x00 #endif /* number of interfaces */ #define NEXT_INTERFACE_0 0 -#ifdef KBD -# define KEYBOARD_INTERFACE NEXT_INTERFACE_0 -# define NEXT_INTERFACE_1 (KEYBOARD_INTERFACE + 1) -# define UDI_HID_KBD_IFACE_NUMBER KEYBOARD_INTERFACE -#else -# define NEXT_INTERFACE_1 NEXT_INTERFACE_0 -#endif +#define KEYBOARD_INTERFACE NEXT_INTERFACE_0 +#define NEXT_INTERFACE_1 (KEYBOARD_INTERFACE + 1) +#define UDI_HID_KBD_IFACE_NUMBER KEYBOARD_INTERFACE // It is important that the Raw HID interface is at a constant // interface number, to support Linux/OSX platforms and chrome.hid // If Raw HID is enabled, let it be always 1. -#ifdef RAW +#ifdef RAW_ENABLE # define RAW_INTERFACE NEXT_INTERFACE_1 # define NEXT_INTERFACE_2 (RAW_INTERFACE + 1) #else # define NEXT_INTERFACE_2 NEXT_INTERFACE_1 #endif -#ifdef MOU +#ifdef MOUSE_ENABLE # define MOUSE_INTERFACE NEXT_INTERFACE_2 # define UDI_HID_MOU_IFACE_NUMBER MOUSE_INTERFACE # define NEXT_INTERFACE_3 (MOUSE_INTERFACE + 1) @@ -101,7 +60,7 @@ along with this program. If not, see . # define NEXT_INTERFACE_3 NEXT_INTERFACE_2 #endif -#ifdef EXK +#ifdef EXTRAKEY_ENABLE # define EXTRAKEY_INTERFACE NEXT_INTERFACE_3 # define NEXT_INTERFACE_4 (EXTRAKEY_INTERFACE + 1) # define UDI_HID_EXK_IFACE_NUMBER EXTRAKEY_INTERFACE @@ -109,7 +68,7 @@ along with this program. If not, see . # define NEXT_INTERFACE_4 NEXT_INTERFACE_3 #endif -#ifdef CON +#ifdef CONSOLE_ENABLE # define CON_INTERFACE NEXT_INTERFACE_4 # define NEXT_INTERFACE_5 (CON_INTERFACE + 1) # define UDI_HID_CON_IFACE_NUMBER CON_INTERFACE @@ -117,7 +76,7 @@ along with this program. If not, see . # define NEXT_INTERFACE_5 NEXT_INTERFACE_4 #endif -#ifdef NKRO +#ifdef NKRO_ENABLE # define NKRO_INTERFACE NEXT_INTERFACE_5 # define NEXT_INTERFACE_6 (NKRO_INTERFACE + 1) # define UDI_HID_NKRO_IFACE_NUMBER NKRO_INTERFACE @@ -125,7 +84,7 @@ along with this program. If not, see . # define NEXT_INTERFACE_6 NEXT_INTERFACE_5 #endif -#ifdef MIDI +#ifdef MIDI_ENABLE # define AC_INTERFACE NEXT_INTERFACE_6 # define AS_INTERFACE (AC_INTERFACE + 1) # define NEXT_INTERFACE_7 (AS_INTERFACE + 1) @@ -133,7 +92,7 @@ along with this program. If not, see . # define NEXT_INTERFACE_7 NEXT_INTERFACE_6 #endif -#ifdef CDC +#ifdef VIRTSER_ENABLE # define CCI_INTERFACE NEXT_INTERFACE_7 # define CDI_INTERFACE (CCI_INTERFACE + 1) # define NEXT_INTERFACE_8 (CDI_INTERFACE + 1) @@ -155,20 +114,16 @@ along with this program. If not, see . #define NEXT_IN_EPNUM_0 1 #define NEXT_OUT_EPNUM_0 1 -#ifdef KBD -# define KEYBOARD_IN_EPNUM NEXT_IN_EPNUM_0 -# define UDI_HID_KBD_EP_IN KEYBOARD_IN_EPNUM -# define NEXT_IN_EPNUM_1 (KEYBOARD_IN_EPNUM + 1) -# define UDI_HID_KBD_EP_SIZE KEYBOARD_EPSIZE -# define KBD_POLLING_INTERVAL 10 -# ifndef UDI_HID_KBD_STRING_ID -# define UDI_HID_KBD_STRING_ID 0 -# endif -#else -# define NEXT_IN_EPNUM_1 NEXT_IN_EPNUM_0 +#define KEYBOARD_IN_EPNUM NEXT_IN_EPNUM_0 +#define UDI_HID_KBD_EP_IN KEYBOARD_IN_EPNUM +#define NEXT_IN_EPNUM_1 (KEYBOARD_IN_EPNUM + 1) +#define UDI_HID_KBD_EP_SIZE KEYBOARD_EPSIZE +#define KBD_POLLING_INTERVAL 10 +#ifndef UDI_HID_KBD_STRING_ID +# define UDI_HID_KBD_STRING_ID 0 #endif -#ifdef MOU +#ifdef MOUSE_ENABLE # define MOUSE_IN_EPNUM NEXT_IN_EPNUM_1 # define NEXT_IN_EPNUM_2 (MOUSE_IN_EPNUM + 1) # define UDI_HID_MOU_EP_IN MOUSE_IN_EPNUM @@ -181,7 +136,7 @@ along with this program. If not, see . # define NEXT_IN_EPNUM_2 NEXT_IN_EPNUM_1 #endif -#ifdef EXK +#ifdef EXTRAKEY_ENABLE # define EXTRAKEY_IN_EPNUM NEXT_IN_EPNUM_2 # define UDI_HID_EXK_EP_IN EXTRAKEY_IN_EPNUM # define NEXT_IN_EPNUM_3 (EXTRAKEY_IN_EPNUM + 1) @@ -194,7 +149,7 @@ along with this program. If not, see . # define NEXT_IN_EPNUM_3 NEXT_IN_EPNUM_2 #endif -#ifdef RAW +#ifdef RAW_ENABLE # define RAW_IN_EPNUM NEXT_IN_EPNUM_3 # define UDI_HID_RAW_EP_IN RAW_IN_EPNUM # define NEXT_IN_EPNUM_4 (RAW_IN_EPNUM + 1) @@ -210,7 +165,7 @@ along with this program. If not, see . # define NEXT_OUT_EPNUM_1 NEXT_OUT_EPNUM_0 #endif -#ifdef CON +#ifdef CONSOLE_ENABLE # define CON_IN_EPNUM NEXT_IN_EPNUM_4 # define UDI_HID_CON_EP_IN CON_IN_EPNUM # define NEXT_IN_EPNUM_5 (CON_IN_EPNUM + 1) @@ -226,7 +181,7 @@ along with this program. If not, see . # define NEXT_OUT_EPNUM_2 NEXT_OUT_EPNUM_1 #endif -#ifdef NKRO +#ifdef NKRO_ENABLE # define NKRO_IN_EPNUM NEXT_IN_EPNUM_5 # define UDI_HID_NKRO_EP_IN NKRO_IN_EPNUM # define NEXT_IN_EPNUM_6 (NKRO_IN_EPNUM + 1) @@ -239,7 +194,7 @@ along with this program. If not, see . # define NEXT_IN_EPNUM_6 NEXT_IN_EPNUM_5 #endif -#ifdef MIDI +#ifdef MIDI_ENABLE # define MIDI_STREAM_IN_EPNUM NEXT_IN_EPNUM_6 # define NEXT_IN_EPNUM_7 (MIDI_STREAM_IN_EPNUM + 1) # define MIDI_STREAM_OUT_EPNUM NEXT_OUT_EPNUM_2 @@ -250,7 +205,7 @@ along with this program. If not, see . # define NEXT_OUT_EPNUM_3 NEXT_OUT_EPNUM_2 #endif -#ifdef CDC +#ifdef VIRTSER_ENABLE # define CDC_NOTIFICATION_EPNUM NEXT_IN_EPNUM_7 # define CDC_ACM_ENDPOINT CDC_NOTIFICATION_EPNUM # define CDC_TX_ENDPOINT (CDC_NOTIFICATION_EPNUM + 1) @@ -285,8 +240,6 @@ along with this program. If not, see . // ********************************************************************** // KBD Descriptor structure and content // ********************************************************************** -#ifdef KBD - COMPILER_PACK_SET(1) typedef struct { @@ -299,8 +252,40 @@ typedef struct { uint8_t array[59]; } udi_hid_kbd_report_desc_t; -# define UDI_HID_KBD_DESC \ - { .iface.bLength = sizeof(usb_iface_desc_t), .iface.bDescriptorType = USB_DT_INTERFACE, .iface.bInterfaceNumber = UDI_HID_KBD_IFACE_NUMBER, .iface.bAlternateSetting = 0, .iface.bNumEndpoints = 1, .iface.bInterfaceClass = HID_CLASS, .iface.bInterfaceSubClass = HID_SUB_CLASS_BOOT, .iface.bInterfaceProtocol = HID_PROTOCOL_KEYBOARD, .iface.iInterface = UDI_HID_KBD_STRING_ID, .hid.bLength = sizeof(usb_hid_descriptor_t), .hid.bDescriptorType = USB_DT_HID, .hid.bcdHID = LE16(USB_HID_BDC_V1_11), .hid.bCountryCode = USB_HID_NO_COUNTRY_CODE, .hid.bNumDescriptors = USB_HID_NUM_DESC, .hid.bRDescriptorType = USB_DT_HID_REPORT, .hid.wDescriptorLength = LE16(sizeof(udi_hid_kbd_report_desc_t)), .ep.bLength = sizeof(usb_ep_desc_t), .ep.bDescriptorType = USB_DT_ENDPOINT, .ep.bEndpointAddress = UDI_HID_KBD_EP_IN | USB_EP_DIR_IN, .ep.bmAttributes = USB_EP_TYPE_INTERRUPT, .ep.wMaxPacketSize = LE16(UDI_HID_KBD_EP_SIZE), .ep.bInterval = KBD_POLLING_INTERVAL, } +// clang-format off + +# define UDI_HID_KBD_DESC { \ + .iface = { \ + .bLength = sizeof(usb_iface_desc_t), \ + .bDescriptorType = USB_DT_INTERFACE, \ + .bInterfaceNumber = UDI_HID_KBD_IFACE_NUMBER, \ + .bAlternateSetting = 0, \ + .bNumEndpoints = 1, \ + .bInterfaceClass = HID_CLASS, \ + .bInterfaceSubClass = HID_SUB_CLASS_BOOT, \ + .bInterfaceProtocol = HID_PROTOCOL_KEYBOARD, \ + .iInterface = UDI_HID_KBD_STRING_ID, \ + }, \ + .hid = { \ + .bLength = sizeof(usb_hid_descriptor_t), \ + .bDescriptorType = USB_DT_HID, \ + .bcdHID = LE16(USB_HID_BDC_V1_11), \ + .bCountryCode = USB_HID_NO_COUNTRY_CODE, \ + .bNumDescriptors = USB_HID_NUM_DESC, \ + .bRDescriptorType = USB_DT_HID_REPORT, \ + .wDescriptorLength = LE16(sizeof(udi_hid_kbd_report_desc_t)), \ + }, \ + .ep = { \ + .bLength = sizeof(usb_ep_desc_t), \ + .bDescriptorType = USB_DT_ENDPOINT, \ + .bEndpointAddress = UDI_HID_KBD_EP_IN | USB_EP_DIR_IN, \ + .bmAttributes = USB_EP_TYPE_INTERRUPT, \ + .wMaxPacketSize = LE16(UDI_HID_KBD_EP_SIZE), \ + .bInterval = KBD_POLLING_INTERVAL \ + } \ +} + +// clang-format on // set report buffer (from host) extern uint8_t udi_hid_kbd_report_set; @@ -311,12 +296,10 @@ extern uint8_t udi_hid_kbd_report[UDI_HID_KBD_REPORT_SIZE]; COMPILER_PACK_RESET() -#endif // KBD - // ********************************************************************** // EXK Descriptor structure and content // ********************************************************************** -#ifdef EXK +#ifdef EXTRAKEY_ENABLE COMPILER_PACK_SET(1) @@ -330,8 +313,40 @@ typedef struct { uint8_t array[50]; } udi_hid_exk_report_desc_t; -# define UDI_HID_EXK_DESC \ - { .iface.bLength = sizeof(usb_iface_desc_t), .iface.bDescriptorType = USB_DT_INTERFACE, .iface.bInterfaceNumber = UDI_HID_EXK_IFACE_NUMBER, .iface.bAlternateSetting = 0, .iface.bNumEndpoints = 1, .iface.bInterfaceClass = HID_CLASS, .iface.bInterfaceSubClass = HID_SUB_CLASS_BOOT, .iface.bInterfaceProtocol = HID_PROTOCOL_GENERIC, .iface.iInterface = UDI_HID_EXK_STRING_ID, .hid.bLength = sizeof(usb_hid_descriptor_t), .hid.bDescriptorType = USB_DT_HID, .hid.bcdHID = LE16(USB_HID_BDC_V1_11), .hid.bCountryCode = USB_HID_NO_COUNTRY_CODE, .hid.bNumDescriptors = USB_HID_NUM_DESC, .hid.bRDescriptorType = USB_DT_HID_REPORT, .hid.wDescriptorLength = LE16(sizeof(udi_hid_exk_report_desc_t)), .ep.bLength = sizeof(usb_ep_desc_t), .ep.bDescriptorType = USB_DT_ENDPOINT, .ep.bEndpointAddress = UDI_HID_EXK_EP_IN | USB_EP_DIR_IN, .ep.bmAttributes = USB_EP_TYPE_INTERRUPT, .ep.wMaxPacketSize = LE16(UDI_HID_EXK_EP_SIZE), .ep.bInterval = EXTRAKEY_POLLING_INTERVAL, } +// clang-format off + +# define UDI_HID_EXK_DESC { \ + .iface = { \ + .bLength = sizeof(usb_iface_desc_t), \ + .bDescriptorType = USB_DT_INTERFACE, \ + .bInterfaceNumber = UDI_HID_EXK_IFACE_NUMBER, \ + .bAlternateSetting = 0, \ + .bNumEndpoints = 1, \ + .bInterfaceClass = HID_CLASS, \ + .bInterfaceSubClass = HID_SUB_CLASS_BOOT, \ + .bInterfaceProtocol = HID_PROTOCOL_GENERIC, \ + .iInterface = UDI_HID_EXK_STRING_ID \ + }, \ + .hid = { \ + .bLength = sizeof(usb_hid_descriptor_t), \ + .bDescriptorType = USB_DT_HID, \ + .bcdHID = LE16(USB_HID_BDC_V1_11), \ + .bCountryCode = USB_HID_NO_COUNTRY_CODE, \ + .bNumDescriptors = USB_HID_NUM_DESC, \ + .bRDescriptorType = USB_DT_HID_REPORT, \ + .wDescriptorLength = LE16(sizeof(udi_hid_exk_report_desc_t)) \ + }, \ + .ep = { \ + .bLength = sizeof(usb_ep_desc_t), \ + .bDescriptorType = USB_DT_ENDPOINT, \ + .bEndpointAddress = UDI_HID_EXK_EP_IN | USB_EP_DIR_IN, \ + .bmAttributes = USB_EP_TYPE_INTERRUPT, \ + .wMaxPacketSize = LE16(UDI_HID_EXK_EP_SIZE), \ + .bInterval = EXTRAKEY_POLLING_INTERVAL \ + } \ +} + +// clang-format on // set report buffer (from host) extern uint8_t udi_hid_exk_report_set; @@ -351,12 +366,12 @@ extern udi_hid_exk_report_t udi_hid_exk_report; COMPILER_PACK_RESET() -#endif // EXK +#endif // EXTRAKEY_ENABLE // ********************************************************************** // NKRO Descriptor structure and content // ********************************************************************** -#ifdef NKRO +#ifdef NKRO_ENABLE COMPILER_PACK_SET(1) @@ -370,8 +385,40 @@ typedef struct { uint8_t array[57]; } udi_hid_nkro_report_desc_t; -# define UDI_HID_NKRO_DESC \ - { .iface.bLength = sizeof(usb_iface_desc_t), .iface.bDescriptorType = USB_DT_INTERFACE, .iface.bInterfaceNumber = UDI_HID_NKRO_IFACE_NUMBER, .iface.bAlternateSetting = 0, .iface.bNumEndpoints = 1, .iface.bInterfaceClass = HID_CLASS, .iface.bInterfaceSubClass = HID_SUB_CLASS_NOBOOT, .iface.bInterfaceProtocol = HID_PROTOCOL_KEYBOARD, .iface.iInterface = UDI_HID_NKRO_STRING_ID, .hid.bLength = sizeof(usb_hid_descriptor_t), .hid.bDescriptorType = USB_DT_HID, .hid.bcdHID = LE16(USB_HID_BDC_V1_11), .hid.bCountryCode = USB_HID_NO_COUNTRY_CODE, .hid.bNumDescriptors = USB_HID_NUM_DESC, .hid.bRDescriptorType = USB_DT_HID_REPORT, .hid.wDescriptorLength = LE16(sizeof(udi_hid_nkro_report_desc_t)), .ep.bLength = sizeof(usb_ep_desc_t), .ep.bDescriptorType = USB_DT_ENDPOINT, .ep.bEndpointAddress = UDI_HID_NKRO_EP_IN | USB_EP_DIR_IN, .ep.bmAttributes = USB_EP_TYPE_INTERRUPT, .ep.wMaxPacketSize = LE16(UDI_HID_NKRO_EP_SIZE), .ep.bInterval = NKRO_POLLING_INTERVAL, } +// clang-format off + +# define UDI_HID_NKRO_DESC { \ + .iface = { \ + .bLength = sizeof(usb_iface_desc_t), \ + .bDescriptorType = USB_DT_INTERFACE, \ + .bInterfaceNumber = UDI_HID_NKRO_IFACE_NUMBER, \ + .bAlternateSetting = 0, \ + .bNumEndpoints = 1, \ + .bInterfaceClass = HID_CLASS, \ + .bInterfaceSubClass = HID_SUB_CLASS_NOBOOT, \ + .bInterfaceProtocol = HID_PROTOCOL_KEYBOARD, \ + .iInterface = UDI_HID_NKRO_STRING_ID \ + }, \ + .hid = { \ + .bLength = sizeof(usb_hid_descriptor_t), \ + .bDescriptorType = USB_DT_HID, \ + .bcdHID = LE16(USB_HID_BDC_V1_11), \ + .bCountryCode = USB_HID_NO_COUNTRY_CODE, \ + .bNumDescriptors = USB_HID_NUM_DESC, \ + .bRDescriptorType = USB_DT_HID_REPORT, \ + .wDescriptorLength = LE16(sizeof(udi_hid_nkro_report_desc_t)) \ + }, \ + .ep = { \ + .bLength = sizeof(usb_ep_desc_t), \ + .bDescriptorType = USB_DT_ENDPOINT, \ + .bEndpointAddress = UDI_HID_NKRO_EP_IN | USB_EP_DIR_IN, \ + .bmAttributes = USB_EP_TYPE_INTERRUPT, \ + .wMaxPacketSize = LE16(UDI_HID_NKRO_EP_SIZE), \ + .bInterval = NKRO_POLLING_INTERVAL \ + } \ +} + +// clang-format on // set report buffer extern uint8_t udi_hid_nkro_report_set; @@ -382,12 +429,12 @@ extern uint8_t udi_hid_nkro_report[UDI_HID_NKRO_REPORT_SIZE]; COMPILER_PACK_RESET() -#endif // NKRO +#endif // NKRO_ENABLE // ********************************************************************** // MOU Descriptor structure and content // ********************************************************************** -#ifdef MOU +#ifdef MOUSE_ENABLE COMPILER_PACK_SET(1) @@ -401,10 +448,40 @@ typedef struct { uint8_t array[77]; // MOU PDS } udi_hid_mou_report_desc_t; -# define UDI_HID_MOU_DESC \ - { .iface.bLength = sizeof(usb_iface_desc_t), .iface.bDescriptorType = USB_DT_INTERFACE, .iface.bInterfaceNumber = MOUSE_INTERFACE, .iface.bAlternateSetting = 0, .iface.bNumEndpoints = 1, .iface.bInterfaceClass = HID_CLASS, .iface.bInterfaceSubClass = HID_SUB_CLASS_BOOT, .iface.bInterfaceProtocol = HID_PROTOCOL_MOUSE, .iface.iInterface = UDI_HID_MOU_STRING_ID, .hid.bLength = sizeof(usb_hid_descriptor_t), .hid.bDescriptorType = USB_DT_HID, .hid.bcdHID = LE16(USB_HID_BDC_V1_11), .hid.bCountryCode = USB_HID_NO_COUNTRY_CODE, .hid.bNumDescriptors = USB_HID_NUM_DESC, .hid.bRDescriptorType = USB_DT_HID_REPORT, .hid.wDescriptorLength = LE16(sizeof(udi_hid_mou_report_desc_t)), .ep.bLength = sizeof(usb_ep_desc_t), .ep.bDescriptorType = USB_DT_ENDPOINT, .ep.bEndpointAddress = UDI_HID_MOU_EP_IN | USB_EP_DIR_IN, .ep.bmAttributes = USB_EP_TYPE_INTERRUPT, .ep.wMaxPacketSize = LE16(UDI_HID_MOU_EP_SIZE), .ep.bInterval = MOU_POLLING_INTERVAL, } - -// no set report buffer +// clang-format off + +# define UDI_HID_MOU_DESC { \ + .iface = { \ + .bLength = sizeof(usb_iface_desc_t), \ + .bDescriptorType = USB_DT_INTERFACE, \ + .bInterfaceNumber = MOUSE_INTERFACE, \ + .bAlternateSetting = 0, \ + .bNumEndpoints = 1, \ + .bInterfaceClass = HID_CLASS, \ + .bInterfaceSubClass = HID_SUB_CLASS_BOOT, \ + .bInterfaceProtocol = HID_PROTOCOL_MOUSE, \ + .iInterface = UDI_HID_MOU_STRING_ID \ + }, \ + .hid = { \ + .bLength = sizeof(usb_hid_descriptor_t), \ + .bDescriptorType = USB_DT_HID, \ + .bcdHID = LE16(USB_HID_BDC_V1_11), \ + .bCountryCode = USB_HID_NO_COUNTRY_CODE, \ + .bNumDescriptors = USB_HID_NUM_DESC, \ + .bRDescriptorType = USB_DT_HID_REPORT, \ + .wDescriptorLength = LE16(sizeof(udi_hid_mou_report_desc_t)) \ + }, \ + .ep = { \ + .bLength = sizeof(usb_ep_desc_t), \ + .bDescriptorType = USB_DT_ENDPOINT, \ + .bEndpointAddress = UDI_HID_MOU_EP_IN | USB_EP_DIR_IN, \ + .bmAttributes = USB_EP_TYPE_INTERRUPT, \ + .wMaxPacketSize = LE16(UDI_HID_MOU_EP_SIZE), \ + .bInterval = MOU_POLLING_INTERVAL \ + } \ +} + +// clang-format on // report buffer # define UDI_HID_MOU_REPORT_SIZE 5 // MOU PDS @@ -412,12 +489,12 @@ extern uint8_t udi_hid_mou_report[UDI_HID_MOU_REPORT_SIZE]; COMPILER_PACK_RESET() -#endif // MOU +#endif // MOUSE_ENABLE // ********************************************************************** // RAW Descriptor structure and content // ********************************************************************** -#ifdef RAW +#ifdef RAW_ENABLE COMPILER_PACK_SET(1) @@ -432,11 +509,48 @@ typedef struct { uint8_t array[26]; } udi_hid_raw_report_desc_t; -# define UDI_HID_RAW_DESC \ - { \ - .iface.bLength = sizeof(usb_iface_desc_t), .iface.bDescriptorType = USB_DT_INTERFACE, .iface.bInterfaceNumber = RAW_INTERFACE, .iface.bAlternateSetting = 0, .iface.bNumEndpoints = 2, .iface.bInterfaceClass = HID_CLASS, .iface.bInterfaceSubClass = HID_SUB_CLASS_NOBOOT, .iface.bInterfaceProtocol = HID_SUB_CLASS_NOBOOT, .iface.iInterface = UDI_HID_RAW_STRING_ID, .hid.bLength = sizeof(usb_hid_descriptor_t), .hid.bDescriptorType = USB_DT_HID, .hid.bcdHID = LE16(USB_HID_BDC_V1_11), .hid.bCountryCode = USB_HID_NO_COUNTRY_CODE, .hid.bNumDescriptors = USB_HID_NUM_DESC, .hid.bRDescriptorType = USB_DT_HID_REPORT, .hid.wDescriptorLength = LE16(sizeof(udi_hid_raw_report_desc_t)), .ep_out.bLength = sizeof(usb_ep_desc_t), .ep_out.bDescriptorType = USB_DT_ENDPOINT, .ep_out.bEndpointAddress = UDI_HID_RAW_EP_OUT | USB_EP_DIR_OUT, .ep_out.bmAttributes = USB_EP_TYPE_INTERRUPT, .ep_out.wMaxPacketSize = LE16(RAW_EPSIZE), .ep_out.bInterval = RAW_POLLING_INTERVAL, \ - .ep_in.bLength = sizeof(usb_ep_desc_t), .ep_in.bDescriptorType = USB_DT_ENDPOINT, .ep_in.bEndpointAddress = UDI_HID_RAW_EP_IN | USB_EP_DIR_IN, .ep_in.bmAttributes = USB_EP_TYPE_INTERRUPT, .ep_in.wMaxPacketSize = LE16(RAW_EPSIZE), .ep_in.bInterval = RAW_POLLING_INTERVAL, \ - } +// clang-format off + +# define UDI_HID_RAW_DESC { \ + .iface = { \ + .bLength = sizeof(usb_iface_desc_t), \ + .bDescriptorType = USB_DT_INTERFACE, \ + .bInterfaceNumber = RAW_INTERFACE, \ + .bAlternateSetting = 0, \ + .bNumEndpoints = 2, \ + .bInterfaceClass = HID_CLASS, \ + .bInterfaceSubClass = HID_SUB_CLASS_NOBOOT, \ + .bInterfaceProtocol = HID_SUB_CLASS_NOBOOT, \ + .iInterface = UDI_HID_RAW_STRING_ID \ + }, \ + .hid = { \ + .bLength = sizeof(usb_hid_descriptor_t), \ + .bDescriptorType = USB_DT_HID, \ + .bcdHID = LE16(USB_HID_BDC_V1_11), \ + .bCountryCode = USB_HID_NO_COUNTRY_CODE, \ + .bNumDescriptors = USB_HID_NUM_DESC, \ + .bRDescriptorType = USB_DT_HID_REPORT, \ + .wDescriptorLength = LE16(sizeof(udi_hid_raw_report_desc_t)) \ + }, \ + .ep_out = { \ + .bLength = sizeof(usb_ep_desc_t), \ + .bDescriptorType = USB_DT_ENDPOINT, \ + .bEndpointAddress = UDI_HID_RAW_EP_OUT | USB_EP_DIR_OUT, \ + .bmAttributes = USB_EP_TYPE_INTERRUPT, \ + .wMaxPacketSize = LE16(RAW_EPSIZE), \ + .bInterval = RAW_POLLING_INTERVAL \ + }, \ + .ep_in = { \ + .bLength = sizeof(usb_ep_desc_t), \ + .bDescriptorType = USB_DT_ENDPOINT, \ + .bEndpointAddress = UDI_HID_RAW_EP_IN | USB_EP_DIR_IN, \ + .bmAttributes = USB_EP_TYPE_INTERRUPT, \ + .wMaxPacketSize = LE16(RAW_EPSIZE), \ + .bInterval = RAW_POLLING_INTERVAL \ + } \ +} + +// clang-format on # define UDI_HID_RAW_REPORT_SIZE RAW_EPSIZE @@ -447,12 +561,12 @@ extern uint8_t udi_hid_raw_report[UDI_HID_RAW_REPORT_SIZE]; COMPILER_PACK_RESET() -#endif // RAW +#endif // RAW_ENABLE // ********************************************************************** // CON Descriptor structure and content // ********************************************************************** -#ifdef CON +#ifdef CONSOLE_ENABLE COMPILER_PACK_SET(1) @@ -467,11 +581,48 @@ typedef struct { uint8_t array[34]; } udi_hid_con_report_desc_t; -# define UDI_HID_CON_DESC \ - { \ - .iface.bLength = sizeof(usb_iface_desc_t), .iface.bDescriptorType = USB_DT_INTERFACE, .iface.bInterfaceNumber = UDI_HID_CON_IFACE_NUMBER, .iface.bAlternateSetting = 0, .iface.bNumEndpoints = 2, .iface.bInterfaceClass = HID_CLASS, .iface.bInterfaceSubClass = HID_SUB_CLASS_NOBOOT, .iface.bInterfaceProtocol = HID_SUB_CLASS_NOBOOT, .iface.iInterface = UDI_HID_CON_STRING_ID, .hid.bLength = sizeof(usb_hid_descriptor_t), .hid.bDescriptorType = USB_DT_HID, .hid.bcdHID = LE16(USB_HID_BDC_V1_11), .hid.bCountryCode = USB_HID_NO_COUNTRY_CODE, .hid.bNumDescriptors = USB_HID_NUM_DESC, .hid.bRDescriptorType = USB_DT_HID_REPORT, .hid.wDescriptorLength = LE16(sizeof(udi_hid_con_report_desc_t)), .ep_out.bLength = sizeof(usb_ep_desc_t), .ep_out.bDescriptorType = USB_DT_ENDPOINT, .ep_out.bEndpointAddress = UDI_HID_CON_EP_OUT | USB_EP_DIR_OUT, .ep_out.bmAttributes = USB_EP_TYPE_INTERRUPT, .ep_out.wMaxPacketSize = LE16(CONSOLE_EPSIZE), .ep_out.bInterval = CON_POLLING_INTERVAL, \ - .ep_in.bLength = sizeof(usb_ep_desc_t), .ep_in.bDescriptorType = USB_DT_ENDPOINT, .ep_in.bEndpointAddress = UDI_HID_CON_EP_IN | USB_EP_DIR_IN, .ep_in.bmAttributes = USB_EP_TYPE_INTERRUPT, .ep_in.wMaxPacketSize = LE16(CONSOLE_EPSIZE), .ep_in.bInterval = CON_POLLING_INTERVAL, \ - } +// clang-format off + +# define UDI_HID_CON_DESC { \ + .iface = { \ + .bLength = sizeof(usb_iface_desc_t), \ + .bDescriptorType = USB_DT_INTERFACE, \ + .bInterfaceNumber = UDI_HID_CON_IFACE_NUMBER, \ + .bAlternateSetting = 0, \ + .bNumEndpoints = 2, \ + .bInterfaceClass = HID_CLASS, \ + .bInterfaceSubClass = HID_SUB_CLASS_NOBOOT, \ + .bInterfaceProtocol = HID_SUB_CLASS_NOBOOT, \ + .iInterface = UDI_HID_CON_STRING_ID \ + }, \ + .hid = { \ + .bLength = sizeof(usb_hid_descriptor_t), \ + .bDescriptorType = USB_DT_HID, \ + .bcdHID = LE16(USB_HID_BDC_V1_11), \ + .bCountryCode = USB_HID_NO_COUNTRY_CODE, \ + .bNumDescriptors = USB_HID_NUM_DESC, \ + .bRDescriptorType = USB_DT_HID_REPORT, \ + .wDescriptorLength = LE16(sizeof(udi_hid_con_report_desc_t)) \ + }, \ + .ep_out = { \ + .bLength = sizeof(usb_ep_desc_t), \ + .bDescriptorType = USB_DT_ENDPOINT, \ + .bEndpointAddress = UDI_HID_CON_EP_OUT | USB_EP_DIR_OUT, \ + .bmAttributes = USB_EP_TYPE_INTERRUPT, \ + .wMaxPacketSize = LE16(CONSOLE_EPSIZE), \ + .bInterval = CON_POLLING_INTERVAL \ + }, \ + .ep_in = { \ + .bLength = sizeof(usb_ep_desc_t), \ + .bDescriptorType = USB_DT_ENDPOINT, \ + .bEndpointAddress = UDI_HID_CON_EP_IN | USB_EP_DIR_IN, \ + .bmAttributes = USB_EP_TYPE_INTERRUPT, \ + .wMaxPacketSize = LE16(CONSOLE_EPSIZE), \ + .bInterval = CON_POLLING_INTERVAL \ + } \ +} + +// clang-format on # define UDI_HID_CON_REPORT_SIZE CONSOLE_EPSIZE @@ -482,12 +633,12 @@ extern uint8_t udi_hid_con_report[UDI_HID_CON_REPORT_SIZE]; COMPILER_PACK_RESET() -#endif // CON +#endif // CONSOLE_ENABLE // ********************************************************************** // CDC Descriptor structure and content // ********************************************************************** -#ifdef CDC +#ifdef VIRTSER_ENABLE COMPILER_PACK_SET(1) @@ -534,16 +685,98 @@ typedef struct { usb_ep_desc_t ep_rx; } udi_cdc_desc_t; -# define CDC_DESCRIPTOR \ - { \ - .iaface.bLength = sizeof(usb_association_desc_t), .iaface.bDescriptorType = USB_DT_IAD, .iaface.bFirstInterface = CDC_STATUS_INTERFACE, .iaface.bInterfaceCount = 2, .iaface.bFunctionClass = CDC_CLASS_DEVICE, .iaface.bFunctionSubClass = CDC_SUBCLASS_ACM, .iaface.bFunctionProtocol = CDC_PROTOCOL_V25TER, .iaface.iFunction = 0, .iface_c.bLength = sizeof(usb_iface_desc_t), .iface_c.bDescriptorType = USB_DT_INTERFACE, .iface_c.bInterfaceNumber = CDC_STATUS_INTERFACE, .iface_c.bAlternateSetting = 0, .iface_c.bNumEndpoints = 1, .iface_c.bInterfaceClass = 0x02, .iface_c.bInterfaceSubClass = 0x02, .iface_c.bInterfaceProtocol = CDC_PROTOCOL_V25TER, .iface_c.iInterface = 0, .fd.bFunctionLength = sizeof(usb_cdc_hdr_desc_t), .fd.bDescriptorType = CDC_CS_INTERFACE, .fd.bDescriptorSubtype = CDC_SCS_HEADER, .fd.bcdCDC = 0x0110, .mfd.bFunctionLength = sizeof(usb_cdc_call_mgmt_desc_t), .mfd.bDescriptorType = CDC_CS_INTERFACE, .mfd.bDescriptorSubtype = CDC_SCS_CALL_MGMT, \ - .mfd.bmCapabilities = CDC_CALL_MGMT_SUPPORTED, .mfd.bDataInterface = CDC_DATA_INTERFACE, .acmd.bFunctionLength = sizeof(usb_cdc_acm_desc_t), .acmd.bDescriptorType = CDC_CS_INTERFACE, .acmd.bDescriptorSubtype = CDC_SCS_ACM, .acmd.bmCapabilities = CDC_ACM_SUPPORT_LINE_REQUESTS, .ufd.bFunctionLength = sizeof(usb_cdc_union_desc_t), .ufd.bDescriptorType = CDC_CS_INTERFACE, .ufd.bDescriptorSubtype = CDC_SCS_UNION, .ufd.bMasterInterface = CDC_STATUS_INTERFACE, .ufd.bSlaveInterface0 = CDC_DATA_INTERFACE, .ep_c.bLength = sizeof(usb_ep_desc_t), .ep_c.bDescriptorType = USB_DT_ENDPOINT, .ep_c.bEndpointAddress = CDC_ACM_ENDPOINT | USB_EP_DIR_IN, .ep_c.bmAttributes = USB_EP_TYPE_INTERRUPT, .ep_c.wMaxPacketSize = LE16(CDC_ACM_SIZE), .ep_c.bInterval = CDC_EP_INTERVAL_STATUS, .iface_d.bLength = sizeof(usb_iface_desc_t), .iface_d.bDescriptorType = USB_DT_INTERFACE, .iface_d.bInterfaceNumber = CDC_DATA_INTERFACE, .iface_d.bAlternateSetting = 0, .iface_d.bNumEndpoints = 2, \ - .iface_d.bInterfaceClass = CDC_CLASS_DATA, .iface_d.bInterfaceSubClass = 0, .iface_d.bInterfaceProtocol = 0, .iface_d.iInterface = 0, .ep_rx.bLength = sizeof(usb_ep_desc_t), .ep_rx.bDescriptorType = USB_DT_ENDPOINT, .ep_rx.bEndpointAddress = CDC_RX_ENDPOINT | USB_EP_DIR_OUT, .ep_rx.bmAttributes = USB_EP_TYPE_BULK, .ep_rx.wMaxPacketSize = LE16(CDC_RX_SIZE), .ep_rx.bInterval = CDC_EP_INTERVAL_DATA, .ep_tx.bLength = sizeof(usb_ep_desc_t), .ep_tx.bDescriptorType = USB_DT_ENDPOINT, .ep_tx.bEndpointAddress = CDC_TX_ENDPOINT | USB_EP_DIR_IN, .ep_tx.bmAttributes = USB_EP_TYPE_BULK, .ep_tx.wMaxPacketSize = LE16(CDC_TX_SIZE), .ep_tx.bInterval = CDC_EP_INTERVAL_DATA, \ - } +// clang-format off + +# define CDC_DESCRIPTOR { \ + .iaface = { \ + .bLength = sizeof(usb_association_desc_t), \ + .bDescriptorType = USB_DT_IAD, \ + .bFirstInterface = CDC_STATUS_INTERFACE, \ + .bInterfaceCount = 2, \ + .bFunctionClass = CDC_CLASS_DEVICE, \ + .bFunctionSubClass = CDC_SUBCLASS_ACM, \ + .bFunctionProtocol = CDC_PROTOCOL_V25TER, \ + .iFunction = 0 \ + }, \ + .iface_c = { \ + .bLength = sizeof(usb_iface_desc_t), \ + .bDescriptorType = USB_DT_INTERFACE, \ + .bInterfaceNumber = CDC_STATUS_INTERFACE, \ + .bAlternateSetting = 0, \ + .bNumEndpoints = 1, \ + .bInterfaceClass = 0x02, \ + .bInterfaceSubClass = 0x02, \ + .bInterfaceProtocol = CDC_PROTOCOL_V25TER, \ + .iInterface = 0 \ + }, \ + .fd = { \ + .bFunctionLength = sizeof(usb_cdc_hdr_desc_t), \ + .bDescriptorType = CDC_CS_INTERFACE, \ + .bDescriptorSubtype = CDC_SCS_HEADER, \ + .bcdCDC = 0x0110 \ + }, \ + .mfd = { \ + .bFunctionLength = sizeof(usb_cdc_call_mgmt_desc_t), \ + .bDescriptorType = CDC_CS_INTERFACE, \ + .bDescriptorSubtype = CDC_SCS_CALL_MGMT, \ + .bmCapabilities = CDC_CALL_MGMT_SUPPORTED, \ + .bDataInterface = CDC_DATA_INTERFACE \ + }, \ + .acmd = { \ + .bFunctionLength = sizeof(usb_cdc_acm_desc_t), \ + .bDescriptorType = CDC_CS_INTERFACE, \ + .bDescriptorSubtype = CDC_SCS_ACM, \ + .bmCapabilities = CDC_ACM_SUPPORT_LINE_REQUESTS \ + }, \ + .ufd = { \ + .bFunctionLength = sizeof(usb_cdc_union_desc_t), \ + .bDescriptorType = CDC_CS_INTERFACE, \ + .bDescriptorSubtype = CDC_SCS_UNION, \ + .bMasterInterface = CDC_STATUS_INTERFACE, \ + .bSlaveInterface0 = CDC_DATA_INTERFACE \ + }, \ + .ep_c = { \ + .bLength = sizeof(usb_ep_desc_t), \ + .bDescriptorType = USB_DT_ENDPOINT, \ + .bEndpointAddress = CDC_ACM_ENDPOINT | USB_EP_DIR_IN, \ + .bmAttributes = USB_EP_TYPE_INTERRUPT, \ + .wMaxPacketSize = LE16(CDC_ACM_SIZE), \ + .bInterval = CDC_EP_INTERVAL_STATUS \ + }, \ + .iface_d = { \ + .bLength = sizeof(usb_iface_desc_t), \ + .bDescriptorType = USB_DT_INTERFACE, \ + .bInterfaceNumber = CDC_DATA_INTERFACE, \ + .bAlternateSetting = 0, \ + .bNumEndpoints = 2, \ + .bInterfaceClass = CDC_CLASS_DATA, \ + .bInterfaceSubClass = 0, \ + .bInterfaceProtocol = 0, \ + .iInterface = 0 \ + }, \ + .ep_rx = { \ + .bLength = sizeof(usb_ep_desc_t), \ + .bDescriptorType = USB_DT_ENDPOINT, \ + .bEndpointAddress = CDC_RX_ENDPOINT | USB_EP_DIR_OUT, \ + .bmAttributes = USB_EP_TYPE_BULK, \ + .wMaxPacketSize = LE16(CDC_RX_SIZE), \ + .bInterval = CDC_EP_INTERVAL_DATA \ + }, \ + .ep_tx = { \ + .bLength = sizeof(usb_ep_desc_t), \ + .bDescriptorType = USB_DT_ENDPOINT, \ + .bEndpointAddress = CDC_TX_ENDPOINT | USB_EP_DIR_IN, \ + .bmAttributes = USB_EP_TYPE_BULK, \ + .wMaxPacketSize = LE16(CDC_TX_SIZE), \ + .bInterval = CDC_EP_INTERVAL_DATA \ + } \ +} + +// clang-format on COMPILER_PACK_RESET() -#endif // CDC +#endif // VIRTSER_ENABLE // ********************************************************************** // CONFIGURATION Descriptor structure and content @@ -552,28 +785,26 @@ COMPILER_PACK_SET(1) typedef struct { usb_conf_desc_t conf; -#ifdef KBD udi_hid_kbd_desc_t hid_kbd; -#endif -#ifdef MOU +#ifdef MOUSE_ENABLE udi_hid_mou_desc_t hid_mou; #endif -#ifdef EXK +#ifdef EXTRAKEY_ENABLE udi_hid_exk_desc_t hid_exk; #endif -#ifdef RAW +#ifdef RAW_ENABLE udi_hid_raw_desc_t hid_raw; #endif -#ifdef CON +#ifdef CONSOLE_ENABLE udi_hid_con_desc_t hid_con; #endif -#ifdef NKRO +#ifdef NKRO_ENABLE udi_hid_nkro_desc_t hid_nkro; #endif -#ifdef MIDI +#ifdef MIDI_ENABLE udi_hid_midi_desc_t hid_midi; #endif -#ifdef CDC +#ifdef VIRTSER_ENABLE udi_cdc_desc_t cdc_serial; #endif } udc_desc_t; diff --git a/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c b/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c index 8142f297d46..3e9fbfdbed2 100644 --- a/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c +++ b/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c @@ -59,8 +59,6 @@ //*************************************************************************** // KBD //*************************************************************************** -#ifdef KBD - bool udi_hid_kbd_enable(void); void udi_hid_kbd_disable(void); bool udi_hid_kbd_setup(void); @@ -196,12 +194,10 @@ static void udi_hid_kbd_setreport_valid(void) { // UDI_HID_KBD_CHANGE_LED(udi_hid_kbd_report_set); } -#endif // KBD - //******************************************************************************************** // NKRO Keyboard //******************************************************************************************** -#ifdef NKRO +#ifdef NKRO_ENABLE bool udi_hid_nkro_enable(void); void udi_hid_nkro_disable(void); @@ -336,12 +332,12 @@ static void udi_hid_nkro_setreport_valid(void) { // UDI_HID_NKRO_CHANGE_LED(udi_hid_nkro_report_set); } -#endif // NKRO +#endif // NKRO_ENABLE //******************************************************************************************** // EXK (extra-keys) SYS-CTRL Keyboard //******************************************************************************************** -#ifdef EXK +#ifdef EXTRAKEY_ENABLE bool udi_hid_exk_enable(void); void udi_hid_exk_disable(void); @@ -467,12 +463,12 @@ static void udi_hid_exk_report_sent(udd_ep_status_t status, iram_size_t nb_sent, static void udi_hid_exk_setreport_valid(void) {} -#endif // EXK +#endif // EXTRAKEY_ENABLE //******************************************************************************************** // MOU Mouse //******************************************************************************************** -#ifdef MOU +#ifdef MOUSE_ENABLE bool udi_hid_mou_enable(void); void udi_hid_mou_disable(void); @@ -601,12 +597,12 @@ static void udi_hid_mou_report_sent(udd_ep_status_t status, iram_size_t nb_sent, } } -#endif // MOU +#endif // MOUSE_ENABLE //******************************************************************************************** // RAW //******************************************************************************************** -#ifdef RAW +#ifdef RAW_ENABLE bool udi_hid_raw_enable(void); void udi_hid_raw_disable(void); @@ -746,12 +742,12 @@ static void udi_hid_raw_report_rcvd(udd_ep_status_t status, iram_size_t nb_rcvd, } } -#endif //RAW +#endif // RAW_ENABLE //******************************************************************************************** // CON //******************************************************************************************** -#ifdef CON +#ifdef CONSOLE_ENABLE bool udi_hid_con_enable(void); void udi_hid_con_disable(void); @@ -866,4 +862,4 @@ static void udi_hid_con_report_sent(udd_ep_status_t status, iram_size_t nb_sent, static void udi_hid_con_setreport_valid(void) {} -#endif // CON +#endif // CONSOLE_ENABLE diff --git a/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.h b/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.h index 6dc1fed3efc..a2d2281628a 100644 --- a/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.h +++ b/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.h @@ -57,62 +57,60 @@ extern "C" { //****************************************************************************** // Keyboard interface definitions //****************************************************************************** -#ifdef KBD extern UDC_DESC_STORAGE udi_api_t udi_api_hid_kbd; extern bool udi_hid_kbd_b_report_valid; extern volatile bool udi_hid_kbd_b_report_trans_ongoing; extern uint8_t udi_hid_kbd_report_set; bool udi_hid_kbd_send_report(void); -#endif // KBD //******************************************************************************************** // NKRO Keyboard //******************************************************************************************** -#ifdef NKRO +#ifdef NKRO_ENABLE extern UDC_DESC_STORAGE udi_api_t udi_api_hid_nkro; extern bool udi_hid_nkro_b_report_valid; extern volatile bool udi_hid_nkro_b_report_trans_ongoing; bool udi_hid_nkro_send_report(void); -#endif // NKRO +#endif // NKRO_ENABLE //******************************************************************************************** // SYS-CTRL interface //******************************************************************************************** -#ifdef EXK +#ifdef EXTRAKEY_ENABLE extern UDC_DESC_STORAGE udi_api_t udi_api_hid_exk; extern bool udi_hid_exk_b_report_valid; extern uint8_t udi_hid_exk_report_set; bool udi_hid_exk_send_report(void); -#endif // EXK +#endif // EXTRAKEY_ENABLE //******************************************************************************************** // CON Console //******************************************************************************************** -#ifdef CON +#ifdef CONSOLE_ENABLE extern UDC_DESC_STORAGE udi_api_t udi_api_hid_con; extern bool udi_hid_con_b_report_valid; extern uint8_t udi_hid_con_report_set[UDI_HID_CON_REPORT_SIZE]; extern volatile bool udi_hid_con_b_report_trans_ongoing; bool udi_hid_con_send_report(void); -#endif // CON +#endif // CONSOLE_ENABLE //******************************************************************************************** // MOU Mouse //******************************************************************************************** -#ifdef MOU +#ifdef MOUSE_ENABLE extern UDC_DESC_STORAGE udi_api_t udi_api_hid_mou; extern bool udi_hid_mou_b_report_valid; bool udi_hid_mou_send_report(void); -#endif // MOU +#endif // MOUSE_ENABLE //******************************************************************************************** // RAW Raw //******************************************************************************************** -#ifdef RAW +#ifdef RAW_ENABLE extern UDC_DESC_STORAGE udi_api_t udi_api_hid_raw; bool udi_hid_raw_send_report(void); bool udi_hid_raw_receive_report(void); -#endif // RAW +#endif // RAW_ENABLE //@} diff --git a/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd_desc.c b/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd_desc.c index 4e7deaaa381..a3fb46a3d49 100644 --- a/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd_desc.c +++ b/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd_desc.c @@ -120,49 +120,45 @@ UDC_DESC_STORAGE udc_desc_t udc_desc = { .conf.iConfiguration = 0, .conf.bmAttributes = /* USB_CONFIG_ATTR_MUST_SET | */ USB_DEVICE_ATTR, .conf.bMaxPower = USB_CONFIG_MAX_POWER(USB_DEVICE_POWER), -#ifdef KBD .hid_kbd = UDI_HID_KBD_DESC, -#endif -#ifdef RAW +#ifdef RAW_ENABLE .hid_raw = UDI_HID_RAW_DESC, #endif -#ifdef MOU +#ifdef MOUSE_ENABLE .hid_mou = UDI_HID_MOU_DESC, #endif -#ifdef EXK +#ifdef EXTRAKEY_ENABLE .hid_exk = UDI_HID_EXK_DESC, #endif -#ifdef CON +#ifdef CONSOLE_ENABLE .hid_con = UDI_HID_CON_DESC, #endif -#ifdef NKRO +#ifdef NKRO_ENABLE .hid_nkro = UDI_HID_NKRO_DESC, #endif -#ifdef CDC +#ifdef VIRTSER_ENABLE .cdc_serial = CDC_DESCRIPTOR, #endif }; UDC_DESC_STORAGE udi_api_t *udi_apis[USB_DEVICE_NB_INTERFACE] = { -#ifdef KBD &udi_api_hid_kbd, -#endif -#ifdef RAW +#ifdef RAW_ENABLE &udi_api_hid_raw, #endif -#ifdef MOU +#ifdef MOUSE_ENABLE &udi_api_hid_mou, #endif -#ifdef EXK +#ifdef EXTRAKEY_ENABLE &udi_api_hid_exk, #endif -#ifdef CON +#ifdef CONSOLE_ENABLE &udi_api_hid_con, #endif -#ifdef NKRO +#ifdef NKRO_ENABLE &udi_api_hid_nkro, #endif -#ifdef CDC +#ifdef VIRTSER_ENABLE &udi_api_cdc_comm, &udi_api_cdc_data, #endif }; diff --git a/tmk_core/protocol/arm_atsam/usb/usb_main.h b/tmk_core/protocol/arm_atsam/usb/usb_main.h index 3191b2fc136..d8461c6c9f6 100644 --- a/tmk_core/protocol/arm_atsam/usb/usb_main.h +++ b/tmk_core/protocol/arm_atsam/usb/usb_main.h @@ -63,41 +63,39 @@ void main_remotewakeup_enable(void); // Called by UDC when USB Host request to disable remote wakeup void main_remotewakeup_disable(void); -#ifdef KBD extern volatile bool main_b_kbd_enable; bool main_kbd_enable(void); void main_kbd_disable(void); -#endif // KBD -#ifdef NKRO +#ifdef NKRO_ENABLE extern volatile bool main_b_nkro_enable; bool main_nkro_enable(void); void main_nkro_disable(void); -#endif // NKRO +#endif // NKRO_ENABLE -#ifdef EXK +#ifdef EXTRAKEY_ENABLE extern volatile bool main_b_exk_enable; bool main_exk_enable(void); void main_exk_disable(void); -#endif // EXK +#endif // EXTRAKEY_ENABLE -#ifdef CON +#ifdef CONSOLE_ENABLE extern volatile bool main_b_con_enable; bool main_con_enable(void); void main_con_disable(void); -#endif // CON +#endif // CONSOLE_ENABLE -#ifdef MOU +#ifdef MOUSE_ENABLE extern volatile bool main_b_mou_enable; bool main_mou_enable(void); void main_mou_disable(void); -#endif // MOU +#endif // MOUSE_ENABLE -#ifdef RAW +#ifdef RAW_ENABLE extern volatile bool main_b_raw_enable; bool main_raw_enable(void); void main_raw_disable(void); void main_raw_receive(uint8_t *buffer, uint8_t len); -#endif // RAW +#endif // RAW_ENABLE #endif // _MAIN_H_ diff --git a/tmk_core/protocol/arm_atsam/usb/usb_protocol_cdc.h b/tmk_core/protocol/arm_atsam/usb/usb_protocol_cdc.h index aa639a6e5d2..f35503a3be5 100644 --- a/tmk_core/protocol/arm_atsam/usb/usb_protocol_cdc.h +++ b/tmk_core/protocol/arm_atsam/usb/usb_protocol_cdc.h @@ -48,7 +48,7 @@ #include "compiler.h" -#ifdef CDC +#ifdef VIRTSER_ENABLE # define CDC_CLASS_DEVICE 0x02 //!< USB Communication Device Class # define CDC_CLASS_COMM 0x02 //!< CDC Communication Class Interface diff --git a/tmk_core/protocol/chibios/init_hooks.h b/tmk_core/protocol/chibios/init_hooks.h new file mode 100644 index 00000000000..fffced913a6 --- /dev/null +++ b/tmk_core/protocol/chibios/init_hooks.h @@ -0,0 +1,5 @@ +#pragma once + +// Override the initialisation functions inside the ChibiOS board.c files +#define __early_init __chibios_override___early_init +#define boardInit __chibios_override_boardInit diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c index 6479fd09df2..61665eb6f4b 100644 --- a/tmk_core/protocol/chibios/main.c +++ b/tmk_core/protocol/chibios/main.c @@ -33,6 +33,11 @@ #include "debug.h" #include "printf.h" +#ifndef EARLY_INIT_PERFORM_BOOTLOADER_JUMP +// Change this to be TRUE once we've migrated keyboards to the new init system +# define EARLY_INIT_PERFORM_BOOTLOADER_JUMP FALSE +#endif + #ifdef SLEEP_LED_ENABLE # include "sleep_led.h" #endif @@ -101,6 +106,39 @@ void midi_ep_task(void); // } // } +/* Early initialisation + */ +__attribute__((weak)) void early_hardware_init_pre(void) { +#if EARLY_INIT_PERFORM_BOOTLOADER_JUMP + void enter_bootloader_mode_if_requested(void); + enter_bootloader_mode_if_requested(); +#endif // EARLY_INIT_PERFORM_BOOTLOADER_JUMP +} + +__attribute__((weak)) void early_hardware_init_post(void) {} + +__attribute__((weak)) void board_init(void) {} + +// This overrides what's normally in ChibiOS board definitions +void __early_init(void) { + early_hardware_init_pre(); + + // This is the renamed equivalent of __early_init in the board.c file + void __chibios_override___early_init(void); + __chibios_override___early_init(); + + early_hardware_init_post(); +} + +// This overrides what's normally in ChibiOS board definitions +void boardInit(void) { + // This is the renamed equivalent of boardInit in the board.c file + void __chibios_override_boardInit(void); + __chibios_override_boardInit(); + + board_init(); +} + /* Main thread */ int main(void) { diff --git a/tmk_core/protocol/lufa/adafruit_ble.cpp b/tmk_core/protocol/lufa/adafruit_ble.cpp index f04ab757ea0..b07407f3877 100644 --- a/tmk_core/protocol/lufa/adafruit_ble.cpp +++ b/tmk_core/protocol/lufa/adafruit_ble.cpp @@ -152,7 +152,7 @@ static bool sdep_send_pkt(const struct sdep_msg *msg, uint16_t timeout) { bool ready = false; do { - ready = spi_write(msg->type, 100) != SdepSlaveNotReady; + ready = spi_write(msg->type) != SdepSlaveNotReady; if (ready) { break; } @@ -165,7 +165,7 @@ static bool sdep_send_pkt(const struct sdep_msg *msg, uint16_t timeout) { if (ready) { // Slave is ready; send the rest of the packet - spi_transmit(&msg->cmd_low, sizeof(*msg) - (1 + sizeof(msg->payload)) + msg->len, 100); + spi_transmit(&msg->cmd_low, sizeof(*msg) - (1 + sizeof(msg->payload)) + msg->len); success = true; } @@ -205,7 +205,7 @@ static bool sdep_recv_pkt(struct sdep_msg *msg, uint16_t timeout) { do { // Read the command type, waiting for the data to be ready - msg->type = spi_read(100); + msg->type = spi_read(); if (msg->type == SdepSlaveNotReady || msg->type == SdepSlaveOverflow) { // Release it and let it initialize spi_stop(); @@ -215,11 +215,11 @@ static bool sdep_recv_pkt(struct sdep_msg *msg, uint16_t timeout) { } // Read the rest of the header - spi_receive(&msg->cmd_low, sizeof(*msg) - (1 + sizeof(msg->payload)), 100); + spi_receive(&msg->cmd_low, sizeof(*msg) - (1 + sizeof(msg->payload))); // and get the payload if there is any if (msg->len <= SdepMaxPayload) { - spi_receive(msg->payload, msg->len, 100); + spi_receive(msg->payload, msg->len); } success = true; break; diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index c1474a5c24b..f45fd37929b 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk @@ -223,6 +223,12 @@ $(foreach LOBJ, $(NO_LTO_OBJ), $(eval $(call NO_LTO,$(LOBJ)))) MOVE_DEP = mv -f $(patsubst %.o,%.td,$@) $(patsubst %.o,%.d,$@) +# For a ChibiOS build, ensure that the board files have the hook overrides injected +define BOARDSRC_INJECT_HOOKS +$(KEYBOARD_OUTPUT)/$(patsubst %.c,%.o,$(patsubst ./%,%,$1)): INIT_HOOK_CFLAGS += -include $(TOP_DIR)/tmk_core/protocol/chibios/init_hooks.h +endef +$(foreach LOBJ, $(BOARDSRC), $(eval $(call BOARDSRC_INJECT_HOOKS,$(LOBJ)))) + # Add QMK specific flags DFU_SUFFIX ?= dfu-suffix DFU_SUFFIX_ARGS ?= @@ -306,27 +312,27 @@ ifdef $1_CONFIG $1_CONFIG_FLAGS += $$(patsubst %,-include %,$$($1_CONFIG)) endif $1_CFLAGS = $$(ALL_CFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS) $$(NOLTO_CFLAGS) -$1_CXXFLAGS= $$(ALL_CXXFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS) $$(NOLTO_CFLAGS) -$1_ASFLAGS= $$(ALL_ASFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS) +$1_CXXFLAGS = $$(ALL_CXXFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS) $$(NOLTO_CFLAGS) +$1_ASFLAGS = $$(ALL_ASFLAGS) $$($1_DEFS) $$($1_INCFLAGS) $$($1_CONFIG_FLAGS) # Compile: create object files from C source files. $1/%.o : %.c $1/%.d $1/cflags.txt $1/compiler.txt | $(BEGIN) @mkdir -p $$(@D) @$$(SILENT) || printf "$$(MSG_COMPILING) $$<" | $$(AWK_CMD) - $$(eval CMD := $$(CC) -c $$($1_CFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP)) + $$(eval CMD := $$(CC) -c $$($1_CFLAGS) $$(INIT_HOOK_CFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP)) @$$(BUILD_CMD) # Compile: create object files from C++ source files. $1/%.o : %.cpp $1/%.d $1/cxxflags.txt $1/compiler.txt | $(BEGIN) @mkdir -p $$(@D) @$$(SILENT) || printf "$$(MSG_COMPILING_CXX) $$<" | $$(AWK_CMD) - $$(eval CMD=$$(CC) -c $$($1_CXXFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP)) + $$(eval CMD=$$(CC) -c $$($1_CXXFLAGS) $$(INIT_HOOK_CFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP)) @$$(BUILD_CMD) $1/%.o : %.cc $1/%.d $1/cxxflags.txt $1/compiler.txt | $(BEGIN) @mkdir -p $$(@D) @$$(SILENT) || printf "$$(MSG_COMPILING_CXX) $$<" | $$(AWK_CMD) - $$(eval CMD=$$(CC) -c $$($1_CXXFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP)) + $$(eval CMD=$$(CC) -c $$($1_CXXFLAGS) $$(INIT_HOOK_CFLAGS) $$(GENDEPFLAGS) $$< -o $$@ && $$(MOVE_DEP)) @$$(BUILD_CMD) # Assemble: create object files from assembler source files. @@ -433,7 +439,7 @@ $(eval $(foreach OUTPUT,$(OUTPUTS),$(shell mkdir -p $(OUTPUT) 2>/dev/null))) .PHONY : all finish sizebefore sizeafter qmkversion \ gccversion build elf hex eep lss sym coff extcoff \ clean clean_list debug gdb-config show_path \ -program teensy dfu flip dfu-ee flip-ee dfu-start \ +program teensy dfu dfu-ee dfu-start \ flash dfu-split-left dfu-split-right \ avrdude-split-left avrdude-split-right \ avrdude-loop usbasp diff --git a/users/333fred/333fred_config.h b/users/333fred/config.h similarity index 69% rename from users/333fred/333fred_config.h rename to users/333fred/config.h index c099072fc7f..5974b789265 100644 --- a/users/333fred/333fred_config.h +++ b/users/333fred/config.h @@ -2,3 +2,4 @@ #define PERMISSIVE_HOLD #define NO_ACTION_MACRO +#undef ONESHOT_TAP_TOGGLE diff --git a/users/333fred/rules.mk b/users/333fred/rules.mk index 0e2cc2588cc..191422e365f 100644 --- a/users/333fred/rules.mk +++ b/users/333fred/rules.mk @@ -3,3 +3,7 @@ SRC += 333fred.c ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) SRC += rgb.c endif + +TAP_DANCE_ENABLE=yes +NKRO_ENABLE = yes +PERMISSIVE_HOLD = yes diff --git a/users/bcat/bcat.c b/users/bcat/bcat.c index bea64dbaa9b..2b250c10f10 100644 --- a/users/bcat/bcat.c +++ b/users/bcat/bcat.c @@ -1,6 +1,6 @@ #include "quantum.h" #if defined(RGBLIGHT_ENABLE) - /* Adjust RGB static hue ranges for shorter gradients than default. */ - const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 127, 63, 31, 15}; +/* Adjust RGB static hue ranges for shorter gradients than default. */ +const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 127, 63, 31, 15}; #endif diff --git a/users/bcat/config.h b/users/bcat/config.h index da74cb0a0b1..b0d556186a2 100644 --- a/users/bcat/config.h +++ b/users/bcat/config.h @@ -26,65 +26,45 @@ #define TAPPING_FORCE_HOLD #if defined(RGB_MATRIX_ENABLE) - /* Turn off per-key RGB when the host goes to sleep. */ - #define RGB_DISABLE_WHEN_USB_SUSPENDED true - - /* Keep per-key RGB increments consistent across keyboards. */ - #undef RGB_MATRIX_HUE_STEP - #undef RGB_MATRIX_SAT_STEP - #undef RGB_MATRIX_VAL_STEP - #undef RGB_MATRIX_SPD_STEP - - #define RGB_MATRIX_HUE_STEP 8 - #define RGB_MATRIX_SAT_STEP 17 - #define RGB_MATRIX_VAL_STEP 17 - #define RGB_MATRIX_SPD_STEP 17 - - /* Turn on additional RGB animations. */ - #define RGB_MATRIX_FRAMEBUFFER_EFFECTS - #define RGB_MATRIX_KEYPRESSES +/* Turn off per-key RGB when the host goes to sleep. */ +# define RGB_DISABLE_WHEN_USB_SUSPENDED true + +/* Keep per-key RGB increments consistent across keyboards. */ +# undef RGB_MATRIX_HUE_STEP +# undef RGB_MATRIX_SAT_STEP +# undef RGB_MATRIX_VAL_STEP +# undef RGB_MATRIX_SPD_STEP + +# define RGB_MATRIX_HUE_STEP 8 +# define RGB_MATRIX_SAT_STEP 17 +# define RGB_MATRIX_VAL_STEP 17 +# define RGB_MATRIX_SPD_STEP 17 + +/* Turn on additional RGB animations. */ +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS +# define RGB_MATRIX_KEYPRESSES #endif #if defined(RGBLIGHT_ENABLE) - /* Turn off RGB underglow when the host goes to sleep. */ - #define RGBLIGHT_SLEEP +/* Turn off RGB underglow when the host goes to sleep. */ +# define RGBLIGHT_SLEEP - /* Keep RGB underglow level increments consistent across keyboards. */ - #undef RGBLIGHT_HUE_STEP - #undef RGBLIGHT_SAT_STEP - #undef RGBLIGHT_VAL_STEP +/* Keep RGB underglow level increments consistent across keyboards. */ +# undef RGBLIGHT_HUE_STEP +# undef RGBLIGHT_SAT_STEP +# undef RGBLIGHT_VAL_STEP - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 17 - #define RGBLIGHT_VAL_STEP 17 +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 17 +# define RGBLIGHT_VAL_STEP 17 #endif #if defined(BACKLIGHT_ENABLE) - /* Enable backlight breathing across the board. */ - #define BACKLIGHT_BREATHING - - /* Keep backlight level increments consistent across keyboards. */ - #undef BACKLIGHT_LEVELS - - #define BACKLIGHT_LEVELS 7 -#endif - -#if defined(MOUSEKEY_ENABLE) - /* Make mouse operation smoother. */ - #undef MOUSEKEY_DELAY - #undef MOUSEKEY_INTERVAL - - #define MOUSEKEY_DELAY 0 - #define MOUSEKEY_INTERVAL 16 +/* Enable backlight breathing across the board. */ +# define BACKLIGHT_BREATHING - /* Lower mouse speed to adjust for reduced MOUSEKEY_INTERVAL. */ - #undef MOUSEKEY_MAX_SPEED - #undef MOUSEKEY_TIME_TO_MAX - #undef MOUSEKEY_WHEEL_MAX_SPEED - #undef MOUSEKEY_WHEEL_TIME_TO_MAX +/* Keep backlight level increments consistent across keyboards. */ +# undef BACKLIGHT_LEVELS - #define MOUSEKEY_MAX_SPEED 7 - #define MOUSEKEY_TIME_TO_MAX 150 - #define MOUSEKEY_WHEEL_MAX_SPEED 3 - #define MOUSEKEY_WHEEL_TIME_TO_MAX 150 +# define BACKLIGHT_LEVELS 7 #endif diff --git a/users/bcat/readme.md b/users/bcat/readme.md new file mode 100644 index 00000000000..49fbea1acfb --- /dev/null +++ b/users/bcat/readme.md @@ -0,0 +1,13 @@ +# bcat's userspace + +This is some code and config shared by all of [my](https://github.com/bcat) +keyboards. I have a few different keymaps spread throughout the repo; however, +they are all derived from two "canonical" keymaps for my preferred layouts: + +* For typing, my canonical layout is my +[Crkbd](https://github.com/qmk/qmk_firmware/tree/master/keyboards/crkbd/keymaps/bcat) +(split ergo, columnar-staggered) layout. + +* For gaming, my canonical layout is my +[Tsangan](https://github.com/qmk/qmk_firmware/tree/master/layouts/community/60_tsangan_hhkb/bcat) +(row-staggered) layout. diff --git a/users/bcat/rules.mk b/users/bcat/rules.mk index 6d3444b2ce5..f3c6f9ab277 100644 --- a/users/bcat/rules.mk +++ b/users/bcat/rules.mk @@ -3,21 +3,33 @@ SRC += bcat.c # Enable Bootmagic Lite to consistently reset to bootloader and clear EEPROM. BOOTMAGIC_ENABLE = lite -# Enable mouse and media keys on all keyboards. +# Enable media keys on all keyboards. EXTRAKEY_ENABLE = yes -MOUSEKEY_ENABLE = yes -# Disable some unwanted features on all keyboards. -API_SYSEX_ENABLE = no +# Enable link-time optimization to reduce binary size. +LINK_TIME_OPTIMIZATION_ENABLE = yes + +# Disable unused build options on all keyboards. COMMAND_ENABLE = no CONSOLE_ENABLE = no +MOUSEKEY_ENABLE = no +NKRO_ENABLE = no +TERMINAL_ENABLE = no + +# Disable unused hardware options on all keyboards. FAUXCLICKY_ENABLE = no MIDI_ENABLE = no -NKRO_ENABLE = no SLEEP_LED_ENABLE = no + +# Disable unused other options. +API_SYSEX_ENABLE = no +AUTO_SHIFT_ENABLE = no +COMBO_ENABLE = no +KEYBOARD_LOCK_ENABLE = no +KEY_LOCK_ENABLE = no +LEADER_ENABLE = no +SWAP_HANDS_ENABLE = no +TAP_DANCE_ENABLE = no UCIS_ENABLE = no -UNICODE_ENABLE = no UNICODEMAP_ENABLE = no - -# Enable link-time optimization to reduce binary size. -LINK_TIME_OPTIMIZATION_ENABLE = yes +UNICODE_ENABLE = no diff --git a/users/pvinis/config.h b/users/pvinis/config.h index 8e2efb40a4b..14ec0dc8f13 100644 --- a/users/pvinis/config.h +++ b/users/pvinis/config.h @@ -1,10 +1,9 @@ #pragma once -#ifdef AUDIO_ENABLE -// #define STARTUP_SONG SONG(SONIC_RING) -// #define DAC_SAMPLE_MAX 65535U // maybe this works for volume? -#endif - // allow rolling when keys have hold functionality #define IGNORE_MOD_TAP_INTERRUPT // #define TAPPING_TERM 150 + +#if defined(MOUSE_KEYS) +# define MOUSEKEY_WHEEL_TIME_TO_MAX 1 +#endif diff --git a/users/pvinis/pvinis.c b/users/pvinis/pvinis.c index e97edcb98cc..31c3023e830 100644 --- a/users/pvinis/pvinis.c +++ b/users/pvinis/pvinis.c @@ -2,88 +2,97 @@ #include "version.h" #ifdef AUDIO_ENABLE -#include "audio.h" -#endif // AUDIO_ENABLE - - -#ifdef AUDIO_ENABLE -// float tone_katamari_rolling_star[][2] = SONG(KATAMARI_ROLLING_STAR); -#endif // AUDIO_ENABLE +# include "audio.h" +float song_sonic_ring[][2] = SONG(SONIC_RING); +float song_coin_sound[][2] = SONG(COIN_SOUND); +float song_test[][2] = SONG(QWERTY_SOUND); +#endif // SYMBOL + SYSCTL = KBCTL uint32_t layer_state_set_user(uint32_t state) { - uint32_t intermediate_state = update_tri_layer_state(state, LR_SYMBOL, LR_SYSCTL, LR_KBCTL); - intermediate_state = layer_state_set_user_local(intermediate_state); - return intermediate_state; + uint32_t intermediate_state = update_tri_layer_state(state, LR_SYMBOL, LR_SYSCTL, LR_KBCTL); + intermediate_state = layer_state_set_user_keymap(intermediate_state); + return intermediate_state; } - // functions for the individual keymaps to implement if they need something extra -__attribute__ ((weak)) -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} +__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } - -// handle my own keycodes +// Handle my own keycodes. bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - - case PV_VRSN: - if (record->event.pressed) { - SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - return false; - - case PV_MAKE: - if (!record->event.pressed) { - SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP + switch (keycode) { + case PV_VRSN: + if (record->event.pressed) { + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + + case PV_MAKE: + // make ergodox_ez:pvinis:teensy + if (!record->event.pressed) { + SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP #if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) - ":dfu" + ":dfu" #elif defined(BOOTLOADER_HALFKAY) - ":teensy" + ":teensy" #elif defined(BOOTLOADER_CATERINA) - ":avrdude" + ":avrdude" #endif - SS_TAP(X_ENTER) - ); - } - return false; + SS_TAP(X_ENTER)); + } + return false; - case PV_FLSH: - reset_keyboard(); - return false; + case PV_FLSH: + reset_keyboard(); + return false; - case PV_KTMR: - if (record->event.pressed) { + case PV_SSNC: + if (record->event.pressed) { #ifdef AUDIO_ENABLE - // PLAY_SONG(tone_katamari_rolling_star); + PLAY_SONG(song_sonic_ring); #endif - } - return false; - } - return process_record_keymap(keycode, record); -} + } + return false; + case PV_SCIN: + if (record->event.pressed) { +#ifdef AUDIO_ENABLE + PLAY_SONG(song_coin_sound); +#endif + } + return false; + + case PV_TEST: + if (record->event.pressed) { +#ifdef AUDIO_ENABLE + PLAY_SONG(song_test); +#endif + } + return false; + } + return process_record_keymap(keycode, record); +} #ifdef TAP_DANCE_ENABLE -qk_tap_dance_action_t tap_dance_actions[] = { -}; -#endif // TAP_DANCE_ENABLE +qk_tap_dance_action_t tap_dance_actions[] = {}; +#endif +void keyboard_post_init_rgb_light(void) { + rgblight_sethsv(HSV_GOLD); + rgblight_mode(RGBLIGHT_MODE_BREATHING); + // rgblight_mode(RGBLIGHT_MODE_KNIGHT+1); +} -// init stuff +// Init stuff. void keyboard_post_init_user(void) { - keyboard_post_init_user_local(); +#if defined(RGBLIGHT_ENABLE) + keyboard_post_init_rgb_light(); +#endif + keyboard_post_init_user_keymap(); } +// Default functions. +__attribute__((weak)) void keyboard_post_init_user_keymap(void) {} -// default functions -__attribute__ ((weak)) -void keyboard_post_init_user_local(void) {} - -__attribute__ ((weak)) -uint32_t layer_state_set_user_local(uint32_t state) { - return state; -} +__attribute__((weak)) uint32_t layer_state_set_user_keymap(uint32_t state) { return state; } diff --git a/users/pvinis/pvinis.h b/users/pvinis/pvinis.h index 0c75c6a6615..c50033a440f 100644 --- a/users/pvinis/pvinis.h +++ b/users/pvinis/pvinis.h @@ -2,84 +2,103 @@ #include "quantum.h" - -// my own keycodes +// My own keycodes. enum userspace_custom_keycodes { - PV_ = SAFE_RANGE, + PV_ = SAFE_RANGE, + + PV_VRSN, // Print firmware version. + PV_MAKE, // Print the make command of the keyboard. + PV_FLSH, // Reset keyboard. - PV_VRSN, // prints firmware version - PV_MAKE, // prints the make command of the keyboard - PV_FLSH, // resets keyboard - PV_KTMR, // play katamari music + PV_SSNC, // Play Sonic Ring. + PV_SCIN, // Play Coin Sound. - PV_SAFE_RANGE, // used for extra keycodes in the individual keymaps + PV_TEST, // For quick testing purposes. + + PV_SAFE_RANGE, // Used for extra keycodes in individual keymaps. }; enum tap_dance_indexes { - // tap dance - TD_FLSH, // flash keyboard (as if the physical flash key was pressed) + // tap dance + TD_FLSH, // flash keyboard (as if the physical flash key was pressed) }; -#define ALLM(kc) LCAG(kc) // easier name for left ctrl-alt-gui -#define PV_ESCC CTL_T(KC_ESC) // esc on tap, ctrl on hold -#define PV_LOCK LCTL(LSFT(KC_PWR)) // lock computer -#define TD_3FLS TD(TD_FLSH) // tap dance 3 times for flash - +#define ALLM(kc) LCAG(kc) // Easier name for left ctrl-alt-gui. +#define PV_ESCC CTL_T(KC_ESC) // esc on tap, ctrl on hold. +#define PV_LOCK LCTL(LSFT(KC_PWR)) // Lock computer. +#define TD_3FLS TD(TD_FLSH) // Tap dance 3 times for flash. -// layers +// Layers. enum { - LR_BASE = 0, // used for basic keys like the surrounding ctrl, cmd, etc + LR_BASE = 0, // used for basic keys like the surrounding ctrl, cmd, etc - LR_QWERTY, - LR_CARPALX, + LR_QWERTY, + LR_CARPALX, + LR_GAME1, // game layout (space on the left thumb, no modifiers, etc) + LR_GAME2, // game layout (space on the left thumb, no modifiers, etc, arrows) - LR_SYMBOL, // symbol input (!, @, #, etc) - LR_SYSCTL, // system control (music, volume, keyboard flash, etc) - LR_KBCTL, // keyboard control (version, make, flash, etc) -}; + LR_SYMBOL, // symbol input (!, @, #, etc) + LR_SYSCTL, // system control (music, volume, keyboard flash, etc) + LR_KBCTL, // keyboard control (version, make, flash, etc) +}; -// layer switchers -#define BASE TO(LR_BASE) -#define QWERTY TO(LR_QWERTY) +// Layer switchers. +#define BASE TO(LR_BASE) +#define QWERTY TO(LR_QWERTY) #define CARPALX TO(LR_CARPALX) - -#define SYMBOL MO(LR_SYMBOL) -#define SYSCTL MO(LR_SYSCTL) -#define KBCTL MO(LR_KBCTL) - - -// layout parts for easy reuse between keyboard keymaps - -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -// | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -#define ________________NUMBERS_L__________________ KC_1, KC_2, KC_3, KC_4, KC_5 -#define ________________NUMBERS_R__________________ KC_6, KC_7, KC_8, KC_9, KC_0 - -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -// | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -#define ______________________F_L__________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 -#define ______________________F_R__________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 - -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -// | Q | W | E | R | T | | Y | U | I | O | P | -// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, -// | A | S | D | F | G | | H | J | K | L | ; | -// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, -// | Z | X | C | V | B | | N | M | , | . | / | -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -#define _________________QWERTY_L1_________________ KC_Q , KC_W , KC_E , KC_R , KC_T -#define _________________QWERTY_L2_________________ KC_A , KC_S , KC_D , KC_F , KC_G -#define _________________QWERTY_L3_________________ KC_Z , KC_X , KC_C , KC_V , KC_B - -#define _________________QWERTY_R1_________________ KC_Y , KC_U , KC_I , KC_O , KC_P -#define _________________QWERTY_R2_________________ KC_H , KC_J , KC_K , KC_L , KC_SCLN -#define _________________QWERTY_R3_________________ KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH - -#define _____________MOD_QWERTY_L2_________________ CTL_T(KC_A), SFT_T(KC_S), GUI_T(KC_D), ALT_T(KC_F), KC_G -#define _____________MOD_QWERTY_R2_________________ KC_H , ALT_T(KC_J), GUI_T(KC_K), SFT_T(KC_L), CTL_T(KC_SCLN) +#define GAME1 TO(LR_GAME1) +#define GAME2 TO(LR_GAME2) + +#define SYMBOL MO(LR_SYMBOL) +#define SYSCTL MO(LR_SYSCTL) +#define KBCTL MO(LR_KBCTL) + +// Layout parts for easy reuse between keyboard keymaps. + +// Transparent. +// ┌─────┬─────┬─────┬─────┬─────┐ +// │ │ │ │ │ │ +// └─────┴─────┴─────┴─────┴─────┘ +#define ___________________________________________ _______, _______, _______, _______, _______ + +// Numbers. +// ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐ +// │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ +// └─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┘ +#define ________________NUMBERS_L__________________ KC_1, KC_2, KC_3, KC_4, KC_5 +#define ________________NUMBERS_R__________________ KC_6, KC_7, KC_8, KC_9, KC_0 + +// F keys. +// ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐ +// │ F1 │ F2 │ F3 │ F4 │ F5 │ │ F6 │ F7 │ F8 │ F9 │ F10 │ +// └─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┘ +#define ______________________F_L__________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 +#define ______________________F_R__________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 + +// QWERTY. +// ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐ +// │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ +// ├─────┼─────┼─────╆━━━━━╅─────┤ ├─────╆━━━━━╅─────┼─────┼─────┤ +// │ A │ S │ D ┃ F ┃ G │ │ H ┃ J ┃ K │ L │ ; │ +// ├─────┼─────┼─────╄━━━━━╃─────┤ ├─────╄━━━━━╃─────┼─────┼─────┤ +// │ Z │ X │ C │ V │ B │ │ N │ M │ , │ . │ / │ +// └─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┘ +#define _________________QWERTY_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T +#define _________________QWERTY_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G +#define _________________QWERTY_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B + +#define _________________QWERTY_R1_________________ KC_Y, KC_U, KC_I, KC_O, KC_P +#define _________________QWERTY_R2_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN +#define _________________QWERTY_R3_________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH + +// QWERTY with mods. +// ┌───────┬───────┬───────┲━━━━━━━┱───────┐ ┌───────┲━━━━━━━┱───────┬───────┬───────┐ +// │ ctl/A │ sft/S │ cmd/D ┃ opt/F ┃ G │ │ H ┃ opt/J ┃ cmd/K │ sft/L │ ctl/; │ +// └───────┴───────┴───────┺━━━━━━━┹───────┘ └───────┺━━━━━━━┹───────┴───────┴───────┘ +// #define _____________MOD_QWERTY_L2_________________ CTL_T(KC_A), SFT_T(KC_S), GUI_T(KC_D), ALT_T(KC_F), KC_G +#define _____________MOD_QWERTY_L2_________________ KC_A, KC_S, KC_D, ALT_T(KC_F), KC_G +#define _____________MOD_QWERTY_R2_________________ KC_H, ALT_T(KC_J), GUI_T(KC_K), SFT_T(KC_L), CTL_T(KC_SCLN) // ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, // | Q | G | M | L | W | | Y | F | I | O | P | @@ -88,13 +107,13 @@ enum { // ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, // | Z | X | C | V | J | | K | P | , | . | / | // ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -#define ________________CARPALX_L1_________________ KC_Q , KC_G , KC_M , KC_L , KC_W -#define ________________CARPALX_L2_________________ KC_D , KC_S , KC_T , KC_N , KC_R -#define ________________CARPALX_L3_________________ KC_Z , KC_X , KC_C , KC_V , KC_J +#define ________________CARPALX_L1_________________ KC_Q, KC_G, KC_M, KC_L, KC_W +#define ________________CARPALX_L2_________________ KC_D, KC_S, KC_T, KC_N, KC_R +#define ________________CARPALX_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_J -#define ________________CARPALX_R1_________________ KC_Y , KC_F , KC_U , KC_B , KC_SCLN -#define ________________CARPALX_R2_________________ KC_I , KC_A , KC_E , KC_O , KC_H -#define ________________CARPALX_R3_________________ KC_K , KC_P , KC_COMM, KC_DOT , KC_SLSH +#define ________________CARPALX_R1_________________ KC_Y, KC_F, KC_U, KC_B, KC_SCLN +#define ________________CARPALX_R2_________________ KC_I, KC_A, KC_E, KC_O, KC_H +#define ________________CARPALX_R3_________________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH // ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, // | ! | @ | { | } | _ | | \ | | ` | | | @@ -103,50 +122,51 @@ enum { // ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, // | % | ^ | [ | ] | + | | * | ~ | < | > | / | // ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -#define _________________SYMBOL_L1_________________ KC_EXLM, KC_AT , KC_LCBR, KC_RCBR, KC_UNDS -#define _________________SYMBOL_L2_________________ KC_HASH, KC_DLR , KC_LPRN, KC_RPRN, KC_MINS -#define _________________SYMBOL_L3_________________ KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_PLUS - -#define _________________SYMBOL_R1_________________ KC_BSLS, _______, KC_GRV , _______, _______ -#define _________________SYMBOL_R2_________________ KC_EQL , KC_AMPR, KC_QUOT, KC_DQUO, KC_PIPE -#define _________________SYMBOL_R3_________________ KC_ASTR, KC_TILD, KC_LABK, KC_RABK, KC_SLSH - -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -// | | | | | | |MUTE |HOME | ^ | END | | -// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, -// | | | | | | |VOLUP| < | v | > | | -// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, -// | | | | | | |VOLDN|MPREV|MPLAY|MNEXT| | -// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -#define _________________SYSCTL_L1_________________ -#define _________________SYSCTL_L2_________________ -#define _________________SYSCTL_L3_________________ +#define _________________SYMBOL_L1_________________ KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_UNDS +#define _________________SYMBOL_L2_________________ KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_MINS +#define _________________SYMBOL_L3_________________ KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_PLUS + +#define _________________SYMBOL_R1_________________ KC_BSLS, _______, KC_GRV, _______, _______ +#define _________________SYMBOL_R2_________________ KC_EQL, KC_AMPR, KC_QUOT, KC_DQUO, KC_PIPE +#define _________________SYMBOL_R3_________________ KC_ASTR, KC_TILD, KC_LABK, KC_RABK, KC_SLSH + +// System Control. +// vol ↓ ctl ↓ +// ┌─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┐ +// │ │ │ │ │ │ │MUTE │HOME │ ↑ │ END │LOCK │ +// ├─────┼─────┼─────╆━━━━━╅─────┤ ├─────╆━━━━━╅─────┼─────┼─────┤ +// │ │ │ ┃ ┃ │ │VOLUP┃ ← ┃ ↓ │ → │SLEEP│ ← arrows +// ├─────┼─────┼─────╄━━━━━╃─────┤ ├─────╄━━━━━╃─────┼─────┼─────┤ +// │ │ │ │ │ │ │VOLDN│MPREV│MPLAY│MNEXT│ PWR │ ← music +// └─────┴─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┴─────┘ +#define _________________SYSCTL_L1_________________ XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_BTN1, XXXXXXX +#define _________________SYSCTL_L2_________________ XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_RIGHT, KC_MS_WH_UP +#define _________________SYSCTL_L3_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_WH_DOWN // vol v ctl v -#define _________________SYSCTL_R1_________________ KC_MUTE , KC_HOME , KC_UP , KC_END , PV_LOCK -#define _________________SYSCTL_R2_________________ KC_VOLU , KC_LEFT , KC_DOWN , KC_RGHT /* < arrows */ , KC_SLEP -#define _________________SYSCTL_R3_________________ KC_VOLD , KC_MPRV , KC_MPLY , KC_MNXT /* < music */ , KC_PWR +#define _________________SYSCTL_R1_________________ KC_MUTE, KC_HOME, KC_UP, KC_END, PV_LOCK +#define _________________SYSCTL_R2_________________ KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT /* < arrows */, KC_SLEP +#define _________________SYSCTL_R3_________________ KC_VOLD, KC_MPRV, KC_MPLY, KC_MNXT /* < music */, KC_PWR // ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -// |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| +// |GAME |CRPLX|XXXXX|XXXXX|XXXXX| |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| // ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, // |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| |XXXXX|VERSN|MAKE |FLASH|XXXXX| // ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, // |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| // ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, -#define __________________KBCTL_L1_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX -#define __________________KBCTL_L2_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX -#define __________________KBCTL_L3_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX - -#define __________________KBCTL_R1_________________ XXXXXXX, XXXXXXX, XXXXXXX, PV_KTMR, XXXXXXX -#define __________________KBCTL_R2_________________ XXXXXXX, PV_VRSN, PV_MAKE, PV_FLSH, XXXXXXX -#define __________________KBCTL_R3_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +#define __________________KBCTL_L1_________________ PV_SSNC, PV_SCIN, PV_TEST, XXXXXXX, XXXXXXX +#define __________________KBCTL_L2_________________ RGB_TOG, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX +#define __________________KBCTL_L3_________________ RGB_MOD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX -// we need wrappers in order for these definitions, because they need to be expanded before being used as arguments to the LAYOUT_xxx macro -#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__) -#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) +#define __________________KBCTL_R1_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +#define __________________KBCTL_R2_________________ XXXXXXX, PV_VRSN, PV_MAKE, PV_FLSH, XXXXXXX +#define __________________KBCTL_R3_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +// We need wrappers in order for these definitions, because they need to be expanded before being used as arguments to the LAYOUT_xxx macro. +#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__) +#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) -// extra stuff that might be needed -void keyboard_post_init_user_local(void); -uint32_t layer_state_set_user_local(uint32_t state); +// Extra stuff that might be needed. +void keyboard_post_init_user_keymap(void); +uint32_t layer_state_set_user_keymap(uint32_t state); diff --git a/users/pvinis/rules.mk b/users/pvinis/rules.mk index da10cc74371..f6f09e54d9c 100644 --- a/users/pvinis/rules.mk +++ b/users/pvinis/rules.mk @@ -1,15 +1,19 @@ -# add userspace file -SRC += pvinis.c - -AUDIO_ENABLE = no # piezo speaker sounds -RGBLIGHT_ENABLE = no # rgb leds underlight -TAP_DANCE_ENABLE = yes -BACKLIGHT_ENABLE = no # leds under keycaps -#MOUSEKEY_ENABLE = no -#SLEEP_LED_ENABLE = no # no led blinking while sleeping -#NKRO_ENABLE = yes - -# make firmware smaller -LINK_TIME_OPTIMIZATION_ENABLE = yes -CONSOLE_ENABLE = no -COMMAND_ENABLE = no +SRC += pvinis.c # add userspace file + + +## Use the stuff below on the keyboard keymaps, not here. +## If they are used here, they will replace the keymap's rules, since this file is eval'd later. + +# TAP_DANCE_ENABLE = yes +# AUDIO_ENABLE = yes # piezo speaker sounds +# RGBLIGHT_ENABLE = yes # rgb leds underlight +# BACKLIGHT_ENABLE = no # leds under keycaps +# MOUSEKEY_ENABLE = yes +# LEEP_LED_ENABLE = no # no led blinking while sleeping +# KRO_ENABLE = yes + +## Some extra stuff to make firmware smaller. + +# LINK_TIME_OPTIMIZATION_ENABLE = yes +# CONSOLE_ENABLE = no +# COMMAND_ENABLE = no diff --git a/users/stanrc85/rules.mk b/users/stanrc85/rules.mk index 67e1b8854ab..d544b2d95a8 100644 --- a/users/stanrc85/rules.mk +++ b/users/stanrc85/rules.mk @@ -20,7 +20,7 @@ ifeq ($(strip $(KEYBOARD)), dz60) VIA_ENABLE = yes LTO_ENABLE = yes endif -ifeq ($(strip $(KEYBOARD)), projectkb/alice) +ifeq ($(strip $(KEYBOARD)), projectkb/alice/rev1) SRC += rgblight_layers.c VIA_ENABLE = yes LTO_ENABLE = no diff --git a/util/1-setup-path-win.bat b/util/1-setup-path-win.bat deleted file mode 100644 index 699aee21521..00000000000 --- a/util/1-setup-path-win.bat +++ /dev/null @@ -1,66 +0,0 @@ -@SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION -@ECHO OFF -SET CMDLINERUNSTR=%SystemRoot%\system32\cmd.exe - -DEL script1.log > NUL 2>&1 -DEL add-paths.log > NUL 2>&1 -DEL add-paths-detail.log > NUL 2>&1 -DEL UPDATE > NUL 2>&1 - -ELEVATE -wait add-paths.bat >> script1.log 2>&1 - -IF ERRORLEVEL 1 ( - ECHO You denied admin access. Rerun the script, and be sure to press the yes button this time. -) ELSE ( - TYPE add-paths.log 2> NUL -) -ECHO. - -:: Branch to UpdateEnv if we need to update -IF EXIST UPDATE ( - DEL UPDATE - GOTO UpdateEnv -) - -GOTO ExitBatch - -:: ----------------------------------------------------------------------------- - -:UpdateEnv -ECHO Making updated PATH go live . . . -REG delete HKCU\Environment /F /V TEMPVAR > NUL 2>&1 -setx TEMPVAR 1 > NUL -REG delete HKCU\Environment /F /V TEMPVAR > NUL 2>&1 -IF NOT !cmdcmdline! == !CMDLINERUNSTR! (CALL :KillExplorer) -GOTO ExitBatch - -:: ----------------------------------------------------------------------------- - -:ExitBatch -ENDLOCAL -PAUSE -EXIT /b - -:: ----------------------------------------------------------------------------- - -:KillExplorer -ECHO. -ECHO. -ECHO Your desktop will be restarted. -ECHO. -ECHO All file explorer windows except for the one you launched this script from WILL BE CLOSED. -ECHO. -ECHO Press enter when ready, or close this window if you would rather do a full restart of your computer at a later time. -ECHO. -PAUSE -ping -n 5 127.0.0.1 > NUL 2>&1 -ECHO Killing process Explorer.exe. . . -ECHO. -taskkill /f /im explorer.exe > NUL -ECHO. -ECHO Your desktop is now loading. . . -ECHO. -ping -n 5 127.0.0.1 > NUL 2>&1 -START explorer.exe -START explorer.exe %CD% -EXIT /b \ No newline at end of file diff --git a/util/2-setup-environment-win.bat b/util/2-setup-environment-win.bat deleted file mode 100644 index 22a2e17f70f..00000000000 --- a/util/2-setup-environment-win.bat +++ /dev/null @@ -1,72 +0,0 @@ -@SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION -@ECHO OFF - -CD %~dp0 - -SET STARTINGDIR=%CD% -echo %STARTINGDIR% - -:: Check for admin privilages -SETX /M test test > nul 2>&1 -IF NOT ["%ERRORLEVEL%"]==["0"] ( - ELEVATE -wait 2-setup-environment-win.bat & goto :EOF -) - -DEL %STARTINGDIR%\environment-setup.log - -:: Make sure path to MinGW exists - if so, CD to it -SET MINGWPATH="C:\MinGW\bin" -IF NOT EXIST !MINGWPATH! (ECHO Path not found: %MINGWPATH%. Did you install MinGW to the default location? && GOTO ExitBatch) -CD /D %MINGWPATH% - -ECHO. -ECHO ------------------------------------------ -ECHO Installing wget and unzip -ECHO ------------------------------------------ -ECHO. -mingw-get install msys-wget-bin msys-unzip-bin - -MKDIR temp -CD temp - -ECHO. -ECHO ------------------------------------------ -ECHO Installing dfu-programmer. -ECHO ------------------------------------------ -ECHO. -wget --no-check-certificate 'http://downloads.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip' >> %STARTINGDIR%\environment-setup.log -unzip -o dfu-programmer-win-0.7.2.zip >> %STARTINGDIR%\environment-setup.log -COPY dfu-programmer.exe .. >> %STARTINGDIR%\environment-setup.log - -ECHO ------------------------------------------ -ECHO Downloading driver -ECHO ------------------------------------------ -wget --no-check-certificate http://downloads.sourceforge.net/project/libusb-win32/libusb-win32-releases/1.2.6.0/libusb-win32-bin-1.2.6.0.zip >> %STARTINGDIR%\environment-setup.log -unzip -o libusb-win32-bin-1.2.6.0.zip >> %STARTINGDIR%\environment-setup.log -COPY libusb-win32-bin-1.2.6.0\bin\x86\libusb0_x86.dll ../libusb0.dll >> %STARTINGDIR%\environment-setup.log - -ECHO. -ECHO ------------------------------------------ -ECHO Installing driver. Accept prompt. -ECHO ------------------------------------------ -ECHO. -IF EXIST "%WinDir%\System32\PnPUtil.exe" (%WinDir%\System32\PnPUtil.exe -i -a dfu-prog-usb-1.2.2\atmel_usb_dfu.inf && GOTO PNPUTILFOUND) -IF EXIST "%WinDir%\Sysnative\PnPUtil.exe" (%WinDir%\Sysnative\PnPUtil.exe -i -a dfu-prog-usb-1.2.2\atmel_usb_dfu.inf && GOTO PNPUTILFOUND) - -ECHO FAILED. Could not find PnPUtil.exe in "%WinDir%\System32" or "%WinDir%\Sysnative". - -:PNPUTILFOUND - -:: Wait then delete directory -ping -n 5 127.0.0.1 > NUL 2>&1 -CD .. -RD /s /q temp - -ECHO ------------------------------------------ -ECHO Finished! - -:ExitBatch -CD /D %STARTINGDIR% -ENDLOCAL -PAUSE -EXIT /b \ No newline at end of file diff --git a/util/ELEVATE_LICENSE.md b/util/ELEVATE_LICENSE.md deleted file mode 100644 index 1cf4fda9174..00000000000 --- a/util/ELEVATE_LICENSE.md +++ /dev/null @@ -1,25 +0,0 @@ -Elevate was downloaded from [here](https://jpassing.com/2007/12/08/launch-elevated-processes-from-the-command-line/). - -### LICENSE - -The MIT License (MIT) - -Copyright (c) - -Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. \ No newline at end of file diff --git a/util/Win_Check.bat b/util/Win_Check.bat deleted file mode 100644 index 3fdb656f9c7..00000000000 --- a/util/Win_Check.bat +++ /dev/null @@ -1,208 +0,0 @@ -@setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION -@echo OFF -set BAT_VERSION=v1.0 -set REPORT_NAME=Win_Check_Output.txt - -:: ----------------------------------------------------------------------------- - -cls - -echo QMK Windows Check Output %BAT_VERSION% -echo QMK Windows Check Output %BAT_VERSION%.>%REPORT_NAME% - -:: ----------------------------------------------------------------------------- - -set MINGW_BASE_DIR=C:\MinGW - -set KEYMAP=atomic-pvc -set KEYMAP_CLEAN=atomic-pvc-clean - -:: ----------------------------------------------------------------------------- - -if /I "%1" EQU VERBOSE (goto :Verbose_Make) else (goto :Normal_Make) - -:Normal_Make -set MAKE_CMD_LEVEL_0=make -r -f Makefile COLOR=FALSE -set MAKE_CMD_LEVEL_1=make -r -f ../Makefile COLOR=FALSE -set MAKE_CMD_LEVEL_2=make -r -f ../../Makefile COLOR=FALSE -goto :Start_Report - -:Verbose_Make -echo Verbose Mode -set MAKE_CMD_LEVEL_0=make -r -d -f Makefile COLOR=FALSE VERBOSE=TRUE -set MAKE_CMD_LEVEL_1=make -r -d -f ../Makefile COLOR=FALSE VERBOSE=TRUE -set MAKE_CMD_LEVEL_2=make -r -d -f ../../Makefile COLOR=FALSE VERBOSE=TRUE -goto :Start_Report - -:Start_Report - - -:: ----------------------------------------------------------------------------- - -set HEADER=CURRENT DIRECTORY & call :ReportHeader - -echo %CD%>>%REPORT_NAME% 2>&1 - -echo.>>%REPORT_NAME% 2>&1 - -:: ----------------------------------------------------------------------------- - -set HEADER=CURRENT PATHS & call :ReportHeader - -for %%A in ("%path:;=";"%") do (echo %%~A>>%REPORT_NAME% 2>&1) - -echo.>>%REPORT_NAME% 2>&1 - -:: ----------------------------------------------------------------------------- - -rem set HEADER=CURRENT ENVIRONMENTAL SETTINGS & call :ReportHeader - -rem set>>%REPORT_NAME% 2>&1 -rem echo.>>%REPORT_NAME% 2>&1 - -:: ----------------------------------------------------------------------------- - -set HEADER=KEY EXECUTABLE LOCATIONS - GENERAL & call :ReportHeader - -set FILENAME=make.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU Make" & call :ReportVersion -set FILENAME=git.exe & set VERSION_CMD=--version & set VERSION_FIND="git" & call :ReportVersion -set FILENAME=cmp.exe & set VERSION_CMD=--version & set VERSION_FIND="cmp" & call :ReportVersion - -:: ----------------------------------------------------------------------------- - -set HEADER=EXECUTABLE LOCATIONS - AVR MCU COMPILERS & call :ReportHeader - -set FILENAME=avr-gcc.exe & set VERSION_CMD=--version & set VERSION_FIND="avr" & call :ReportVersion -set FILENAME=avr-objcopy.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objcopy" & call :ReportVersion -set FILENAME=avr-objdump.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objdump" & call :ReportVersion -set FILENAME=avr-size.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU size" & call :ReportVersion -set FILENAME=avr-ar.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU ar" & call :ReportVersion -set FILENAME=avr-nm.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU nm" & call :ReportVersion - -:: ----------------------------------------------------------------------------- - -set HEADER=EXECUTABLE LOCATIONS - ARM MCU COMPILERS & call :ReportHeader - -set FILENAME=arm-none-eabi-gcc.exe & set VERSION_CMD=--version & set VERSION_FIND="arm-none-eabi-gcc" & call :ReportVersion -set FILENAME=arm-none-eabi-objcopy.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objcopy" & call :ReportVersion -set FILENAME=arm-none-eabi-objdump.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objdump" & call :ReportVersion -set FILENAME=arm-none-eabi-size.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU size" & call :ReportVersion -set FILENAME=arm-none-eabi-ar.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU ar" & call :ReportVersion -set FILENAME=arm-none-eabi-nm.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU nm" & call :ReportVersion - -:: ----------------------------------------------------------------------------- - -set HEADER=EXECUTABLE LOCATIONS - NATIVE COMPILERS & call :ReportHeader - -set FILENAME=gcc.exe & set VERSION_CMD=--version & set VERSION_FIND="gcc" & call :ReportVersion -set FILENAME=objcopy.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objcopy" & call :ReportVersion -set FILENAME=objdump.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU objdump" & call :ReportVersion -set FILENAME=size.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU size" & call :ReportVersion -set FILENAME=ar.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU ar" & call :ReportVersion -set FILENAME=nm.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU nm" & call :ReportVersion - -:: ----------------------------------------------------------------------------- - -set HEADER=EXECUTABLE LOCATIONS - PROGRAMMERS & call :ReportHeader - -set FILENAME=dfu-programmer.exe & set VERSION_CMD=--version & set VERSION_FIND="dfu" & call :ReportVersion -set FILENAME=batchisp.exe & set VERSION_CMD=-version & set VERSION_FIND="batchisp" & call :ReportVersion -set FILENAME=dfu-util.exe & call :Report -set FILENAME=teensy_loader_cli.exe & call :Report -set FILENAME=hid_bootloader_cli.exe & call :Report -set FILENAME=avrdude.exe & call :Report - -:: ----------------------------------------------------------------------------- - -set HEADER=EXECUTABLE LOCATIONS - OPTIONAL & call :ReportHeader -set FILENAME=cppcheck.exe & call :Report -set FILENAME=doxygen.exe & call :Report -set FILENAME=gdb-config.exe & call :Report -set FILENAME=wget.exe & call :Report -set FILENAME=unzip.exe & call :Report - -:: ----------------------------------------------------------------------------- - -set HEADER=MINGW CHECK - OPTIONAL & call :ReportHeader -if exist %MINGW_BASE_DIR% (echo Expected MinGW Base Dir = %MINGW_BASE_DIR%>>%REPORT_NAME% 2>&1) else (echo Expected MinGW Base Dir = %MINGW_BASE_DIR% - Not Found>>%REPORT_NAME% 2>&1) -echo.>>%REPORT_NAME% 2>&1 -set FILENAME=mingw32-make.exe & set VERSION_CMD=--version & set VERSION_FIND="GNU Make" & call :ReportVersion -if exist %MINGW_BASE_DIR%\bin\make.exe (ECHO It is not recommended to have make.exe in mingw/bin.>>%REPORT_NAME% 2>&1 & echo.>>%REPORT_NAME% 2>&1) - -:: ----------------------------------------------------------------------------- - -set HEADER=MAKE CHECK & call :ReportHeader -if exist Makefile (set MAKE_CMD=%MAKE_CMD_LEVEL_0% & goto MakeFound) -if exist ..\Makefile (set MAKE_CMD=%MAKE_CMD_LEVEL_1% & goto MakeFound) -if exist ..\..\Makefile (set MAKE_CMD=%MAKE_CMD_LEVEL_2% & goto MakeFound) - -echo No Makfile Found.>>%REPORT_NAME% 2>&1 -echo.>>%REPORT_NAME% 2>&1 -echo ------------------------------------------------------------------------->>%REPORT_NAME% 2>&1 - -goto :ContinueAfterMake - -:MakeFound -call :RunMake - -:ContinueAfterMake -goto :ExitBatch - -:ExitBatch - echo Done! - echo. - rem type %REPORT_NAME% - echo. - echo See %REPORT_NAME% for the report. - endlocal -exit /b - -:: ----------------------------------------------------------------------------- - -:RunMake - - echo Makfile Found.>>%REPORT_NAME% 2>&1 - echo.>>%REPORT_NAME% 2>&1 - set HEADER=MAKE CLEAN & call :ReportHeader - echo Make Command = %MAKE_CMD% %KEYMAP_CLEAN%>>%REPORT_NAME% 2>&1 - echo.>>%REPORT_NAME% 2>&1 - %MAKE_CMD% %KEYMAP_CLEAN%>>%REPORT_NAME% 2>&1 - set HEADER=MAKE & call :ReportHeader - echo Make Command = %MAKE_CMD% %KEYMAP%>>%REPORT_NAME% 2>&1 - echo.>>%REPORT_NAME% 2>&1 - %MAKE_CMD% %KEYMAP%>>%REPORT_NAME% 2>&1 - echo ------------------------------------------------------------------------->>%REPORT_NAME% 2>&1 - echo.>>%REPORT_NAME% 2>&1 -exit /b - -:ReportHeader - echo ------------------------------------------------------------------------->>%REPORT_NAME% 2>&1 - echo.>>%REPORT_NAME% 2>&1 - echo %HEADER%>>%REPORT_NAME% 2>&1 - echo.>>%REPORT_NAME% 2>&1 -exit /b - -:Report - echo Filename = %FILENAME% >>%REPORT_NAME% 2>&1 - >%REPORT_NAME% 2>&1 - where %FILENAME% >>%REPORT_NAME% 2> NUL - if ERRORLEVEL 1 (echo Not Found >>%REPORT_NAME% 2>&1 & goto :EndReport) - - :EndReport - echo.>>%REPORT_NAME% 2>&1 - >%REPORT_NAME% 2>&1 - >%REPORT_NAME% 2>&1 - where %FILENAME% >>%REPORT_NAME% 2> NUL - if ERRORLEVEL 1 (echo Not Found >>%REPORT_NAME% 2>&1 & goto :EndReportVersion) - >%REPORT_NAME% 2>&1 - - (%FILENAME% %VERSION_CMD% | find %VERSION_FIND%) >>%REPORT_NAME% 2>&1 - - :EndReportVersion - echo.>>%REPORT_NAME% 2>&1 - add-paths.log - -CALL :AddPath %NEWPATH1% -CALL :AddPath %NEWPATH2% - -EXIT /b - -:AddPath -ECHO %PATH% | FINDSTR /C:"%~1" > nul -IF ERRORLEVEL 1 ( - REG add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /f /v PATH /t REG_SZ /d "%PATH%;%~1" >> add-paths-detail.log - IF ERRORLEVEL 0 ( - ECHO Adding %1 . . . Success! >> add-paths.log - SET "PATH=%PATH%;%~1" - COPY NUL UPDATE - ) ELSE ( - ECHO Adding %1 . . . FAILED. Run this script with administrator privileges. >> add-paths.log - ) -) ELSE ( - ECHO Skipping %1 - Already in PATH >> add-paths.log - ) -EXIT /b \ No newline at end of file diff --git a/util/elevate.exe b/util/elevate.exe deleted file mode 100644 index fc6180ec92d..00000000000 Binary files a/util/elevate.exe and /dev/null differ diff --git a/util/linux_install.sh b/util/linux_install.sh index 048b2f3189c..d30f7865582 100755 --- a/util/linux_install.sh +++ b/util/linux_install.sh @@ -32,6 +32,7 @@ if grep ID /etc/os-release | grep -qE "fedora"; then avr-libc \ binutils-avr32-linux-gnu \ clang \ + avrdude \ dfu-util \ dfu-programmer \ diffutils \ @@ -67,6 +68,7 @@ elif grep ID /etc/os-release | grep -qE 'debian|ubuntu'; then gcc-avr \ git \ libnewlib-arm-none-eabi \ + avrdude \ libusb-dev \ python3 \ python3-pip \ @@ -105,17 +107,18 @@ elif grep ID /etc/os-release | grep -q gentoo; then sudo touch /etc/portage/package.use/qmkfirmware # tee is used here since sudo doesn't apply to >> echo "sys-devel/gcc multilib" | sudo tee --append /etc/portage/package.use/qmkfirmware >/dev/null - sudo emerge -auN \ + sudo emerge -auN sys-devel/gcc + sudo emerge -au --noreplace \ app-arch/unzip \ app-arch/zip \ app-mobilephone/dfu-util \ + dev-embedded/dfu-programmer \ dev-embedded/avrdude \ - dev-lang/python:3.5 \ net-misc/wget \ sys-devel/clang \ - sys-devel/gcc \ sys-devel/crossdev - sudo crossdev -s4 --stable --g =4.9.4 --portage --verbose --target avr + sudo crossdev -s4 --stable --g \<9 --portage --verbose --target avr + sudo crossdev -s4 --stable --g \<9 --portage --verbose --target arm-none-eabi echo "Done!" else echo "Quitting..." @@ -126,13 +129,15 @@ elif grep ID /etc/os-release | grep -q sabayon; then app-arch/unzip \ app-arch/zip \ app-mobilephone/dfu-util \ + dev-embedded/dfu-programmer \ dev-embedded/avrdude \ dev-lang/python \ net-misc/wget \ sys-devel/clang \ sys-devel/gcc \ sys-devel/crossdev - sudo crossdev -s4 --stable --g =4.9.4 --portage --verbose --target avr + sudo crossdev -s4 --stable --g \<9 --portage --verbose --target avr + sudo crossdev -s4 --stable --g \<9 --portage --verbose --target arm-none-eabi echo "Done!" elif grep ID /etc/os-release | grep -qE "opensuse|tumbleweed"; then @@ -150,7 +155,8 @@ elif grep ID /etc/os-release | grep -qE "opensuse|tumbleweed"; then cross-avr-binutils \ cross-arm-none-newlib-devel \ cross-arm-binutils cross-arm-none-newlib-devel \ - dfu-tool \ + avrdude \ + dfu-util \ dfu-programmer \ gcc \ libusb-devel \ @@ -215,6 +221,7 @@ elif grep ID /etc/os-release | grep -q void; then avr-gcc \ avr-libc \ $CROSS_ARM \ + avrdude \ dfu-programmer \ dfu-util \ gcc \ diff --git a/util/msys2_install.sh b/util/msys2_install.sh index 001f55dc480..55df9c007b8 100755 --- a/util/msys2_install.sh +++ b/util/msys2_install.sh @@ -4,11 +4,10 @@ dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) download_dir=~/qmk_utils avrtools=avr8-gnu-toolchain armtools=gcc-arm-none-eabi -installflip=false util_dir=$(dirname "$0") echo "Installing dependencies needed for the installation (quazip)" -pacman --needed --noconfirm --disable-download-timeout -Sy base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang msys/git msys/p7zip mingw-w64-x86_64-python3-pip msys/unzip +pacman --needed --noconfirm --disable-download-timeout -Sy base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang git mingw-w64-x86_64-python3-pip unzip source "$dir/win_shared_install.sh" @@ -31,19 +30,8 @@ function install_arm { rm gcc-arm-none-eabi-8-2019-q3-update-win32.zip } -function extract_flip { - rm -f -r flip - 7z -oflip x FlipInstaller.exe -} - pushd "$download_dir" -if [ -f "FlipInstaller.exe" ]; then - echo - echo "Extracting flip" - extract_flip -fi - if [ ! -d "$avrtools" ]; then echo echo "The AVR toolchain is not installed." diff --git a/util/win_shared_install.sh b/util/win_shared_install.sh index 1265cb027f5..072ca47c817 100755 --- a/util/win_shared_install.sh +++ b/util/win_shared_install.sh @@ -22,10 +22,6 @@ function install_utils { wget 'https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.zip' unzip bootloadHID.2012-12-08.zip - echo "Installing Atmel Flip" - wget 'http://ww1.microchip.com/downloads/en/DeviceDoc/Flip%20Installer%20-%203.4.7.112.exe' - mv Flip\ Installer\ \-\ 3.4.7.112.exe FlipInstaller.exe - echo "Downloading the QMK driver installer" wget -qO- https://api.github.com/repos/qmk/qmk_driver_installer/releases | grep browser_download_url | head -n 1 | cut -d '"' -f 4 | wget -i - diff --git a/util/wsl_install.sh b/util/wsl_install.sh index 197d9f089ef..8ed177ca3e9 100755 --- a/util/wsl_install.sh +++ b/util/wsl_install.sh @@ -31,21 +31,6 @@ source "$dir/win_shared_install.sh" pip3 install -r ${util_dir}/../requirements.txt -pushd "$download_dir" -while true; do - echo - echo "Flip need to be installed if you want to use that for programming." - echo "Please install it to the default location!" - read -p "Do you want to install it now? (Y/N) " res - case $res in - [Yy]* ) cmd.exe /c FlipInstaller.exe; break;; - [Nn]* ) break;; - * ) echo "Invalid answer";; - esac -done -popd - - echo echo "Creating a softlink to the utils directory as ~/qmk_utils." echo "This is needed so that the the make system can find all utils it need."