Compare commits

...

64 Commits

Author SHA1 Message Date
Joel Challis
b1691ba696 Fix MATRIX_X_PINS_RIGHT ARM compilation (#6395) 2019-07-23 09:11:37 -04:00
Jarred Steenvoorden
7ec583e5ef [Keymap] Jarred's Plaid keymap (#6049)
* Add my plaid keymap

* Move planck / plaid keymaps to common layout folder
2019-07-23 00:07:57 -07:00
Will Sturgiss
c966da89da [Keymap] Added wsturgiss keymap for mechmini2 (#4917)
* basic layout v1.0

* changed KC_TRNS to _______

* most symbols are on double tap, except quote, that was cancer

* better formatting and set toggle for game layer

* added colors to layers to make knowing your current layer easy

* have an empty macro working

* enabled unicode

* moved stuff to my folder and removed edits from communal files

* cleanup

* removed the game layer.  Never used it

* made changes requested by drashna and vomindoraan

* got rid of some unnecessary code

* got very basic unicode on mac working

* added ctrl_esc

* more changes as requested by noroadsleft

* more leader additions, removed macros because leader stuff replaces that functionality

* removed an old macro I forgot to remove earlier

* final deletion at noroadsleft request

* changed a line to explicitly specify a purple color.
2019-07-22 23:59:12 -07:00
Drashna Jaelre
8060e52946 [Keyboard] Align Planck EZ config with ZSA/Ergodox config (#6371) 2019-07-22 23:28:25 -07:00
mechmerlin
2e8cdb126e update docs based on fireworm's comments 2019-07-22 20:55:23 -07:00
Drashna Jaelre
3261c408e4 Add support for TAP_CODE_DELAY to Hold-Tap keys (#5400)
* Add support for TAP_CODE_DELAY to Hold-Tap keys

* Better handling for tap code delay and caps version
2019-07-22 20:23:57 -07:00
Drashna Jaelre
d41961c9ed [Keymap] Drashna's Feature madness (#6128)
* Fix my Tap Dance issues after I broke them

* Cleanup and organization of userspace documentation

As well as some additional cleanup of functions due to review of documentation.

* Enable Tapdance on Glow and remove more animations

* Revert to Eager PR debouncing

* Add better check for startup animation

* Move where RGB Matrix defines are listed

* Limit RGB Matrix max val

* Update keyboard for Iris Rev 3 conflicts

* Enable encoder support on planck ez

* Remove is_master check from corne\'s OLED code

* Overhaul OLED screens for my Corne

* One last removal

* Show RGB valu On both sides

* Updates for OLED display info

* Fix compile issues for rgb config

* Disabled Space Cadet for all drashna keymaps

* Fix OLED Screen configs

* Minor OLED Tweaks

* Revert some Iris changes

* Fix song include

* Handle MAKE macro for the Corne boards better

* Add super hacky-hack for eeconfig initialization

* Add audio support for Fractal since Elite Cs support it

* Add defines for keycode steps

* Add White layout

* Update Corne RGB info

* Add fun effects to layer indication for RGB Matrix enabled boards

* Use proper define for product name detection

* Update formatting

* Use custom timeout mechanism for OLED timeout

* Fix up OLED screen HSV code for new HSV structure

* Better handle turning off RGB Matrix when sleeping

* Disable MultiSplash Animation

* Change Iris back to using serial

* Why was RGB disabled?!?!?!

* Limit val in rgb_matrix_layer_helper function

* Remove EECONFIG setting for RGB matrix
2019-07-22 20:22:33 -07:00
tucznak
840b9090a0 Adding personal keymaps (#6384)
* initial commit

* migrated the actual keymap to this keyboard

* added the actual Tanuki keymap

* Added QMK DFU bootloader support

* TuCZnak's keymaps - final

* Update keyboards/tanuki/keymaps/tucznak/config.h

Co-Authored-By: Drashna Jaelre <drashna@live.com>

* Update keyboards/ut472/keymaps/tucznak/config.h

Co-Authored-By: Drashna Jaelre <drashna@live.com>

* Apply suggestions from code review

Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
2019-07-22 16:32:47 -07:00
XScorpion2
40b0ddd425 Sol Rev 2 Keyboard (#6389)
* Basic Rev 2 implementation

* Updated LED defines and added Extra encoder support

* Fixed rgb pin assignment

* Physically accurate LED positions

* Single Color Band scrolling left to right effects

* Spirals, Pinwheels, and Documentation....Oh My!

* Spiral effect band thickness adjustments

* Fixing animation spin directions

* Full hand LED positions

* Basic Rev 2 implementation

Updated LED defines and added Extra encoder support

Fixed rgb pin assignment

Physically accurate LED positions

Full hand LED positions

Moving rev2 folder

* RGB Center Point LED position update

* Fixing led config commas

* Fixing led config commas

* fix enter key

* fix enter

* Small changes to default

* update default

* typo fix

* update default

* Fixing defines & led config, turned full hand & extra encoders into rules.mk feature

* Refactored rules.mk to have a post_rules.mk

* Forgot to offset the matrix to led map due to the edge led additions

* Updated LED flags and fixed my keymap

* Update keymap.c

include speed controls for RGB

* Fixing more rules.mk and adding keymap like encoders functionality

* Sol Rev 2 Implementation

* Minor fixes

* Keymap fixes

* Fix Colemak, add lock keys
2019-07-22 10:43:52 -07:00
Collin Diekvoss
17ff9cf554 New Keyboard: ZJ68 (#6378)
* added zj68 keyboard

* Suggested changes

* Suggested changes

* Suggested changes

* Requested changes

* Update keyboards/zj68/rules.mk

Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
2019-07-22 10:17:11 -07:00
MechMerlin
d3ebf903c9 [Keyboard] Add Unikorn 60 tsangan_hhkb layout (#6390)
* fix default keymap to not have Q in the 1 position.

* add tsangan hhkb layout

* add a tsangan default keymap

* clean up the default keymap

* add qmk configurator support for new layout
2019-07-22 02:20:20 -07:00
George Petri
f1c89280d5 [Keymap] Update keymap for keebio/quefrency 65% version (#6388)
* minor keymap changes

* minor keymap changes update readme

* update rules.mk

* add rgb

* add add arrows in hjkl

* removed backslashes

* fix missing comma

* spacing fix

* minor cleanup

* add r layer

* impl navigation layer

* moved backspace nearby

* updated readme
2019-07-22 02:14:43 -07:00
Sid Carter
4602361095 [Keymap] Switch Iris keymap from workman to colemak (#6385)
* via support and colemak layout

* figures tap and hold parts don't work vith via enabled - so those are commented out for now
2019-07-22 02:13:38 -07:00
Michael Pishchagin
28f53462d0 [Keyboard] Backport two fixes from TMK: usb-usb converter (#6383)
* usb_usb: Order of init prevents uneeded bus reset
7c228967a4 (diff-deed77fb597e3a0019ce59fc1d09e260)

* usb_usb: Fix startup block bug
c2ce617a36 (diff-deed77fb597e3a0019ce59fc1d09e260)
2019-07-22 02:07:28 -07:00
Luke Wesley-Holley
4532caf5f2 [Keyboard] KBP V60 Type R Added ISO default (#6372)
* [Layout] KBP V60 Type R ISO default

* Remove ifdef

* Apply suggestions from code review

@noroadsleft I've accepted your suggestions. Tried locally any everything works as expected.

Thanks again - this if my first keyboard and first time looking at/ using/ contributing to qmk so I appreciate the feedback 👍

Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
2019-07-22 02:06:06 -07:00
noroadsleft
e08e6c11e3 [Keyboard] Fix QMK Configurator bug with Wilba Tech Zeal60 LAYOUT_60_all (#6387)
info.json file had the wrong name for the JSON key; the macro that is normally named LAYOUT_all by convention is named LAYOUT_60_all on the Zeal60.

Bug flagged by drashna for flight505 on QMK Discord.
2019-07-22 02:03:19 -07:00
Wilba
bffbb4b42d Refactoring wilba.tech PCBs, updating Rama Works U80-A (#6272)
* Added WT65-B, WT75-B, minor fixes

* Update keyboards/wilba_tech/wt65_b/config.h

Co-Authored-By: Drashna Jaelre <drashna@live.com>

* Update keyboards/wilba_tech/wt65_b/readme.md

Co-Authored-By: fauxpark <fauxpark@gmail.com>

* Update keyboards/wilba_tech/wt75_b/config.h

Co-Authored-By: Drashna Jaelre <drashna@live.com>

* Change DEBOUNCING_DELAY to DEBOUNCE

* Change DEBOUNCING_DELAY to DEBOUNCE

* Move Zeal60/Zeal65 files to keyboards/wilba_tech

* Change DEBOUNCING_DELAY to DEBOUNCE

* Refactoring zeal60 code to wilba_tech

* Moved Rama Works PCBs to wilba_tech

* Rename Rama Works files

* Cleanup info.json

* Cleanup readme.md

* Cleanup USB device strings

* U80-A RGB matrix, IS31FL3731 driver changes

* Fixed #include from keyboards/zeal60
2019-07-21 07:46:22 -04:00
noroadsleft
d686c0ea43 [Keyboard] Snagpad Configurator bugfix and readme refactor (#6381)
* Update snagpad.h

White-space changes only. Making this file easier to read.

* Update info.json

Refactor:

- add labels
- debug linting (one key object per line)
- reorder keys for LAYOUT_numpad_5x4 (fixes QMK Configurator assigning keys to incorrect positions)

* Update readme.md

Refactor to conform to QMK template.

Updated link to The Board Podcast (old link was Error 404).
2019-07-20 13:49:28 -07:00
trinity1561
b3cdc7ef70 [Keyboard] Update space65.c to fix caps lock LED (#6375) 2019-07-20 13:37:42 -07:00
Sid Carter
cf2ffadbcd [Keymap] Add Colemak to existing fc660c keymap (#6374)
* consistent enums

* add colemak to another layer for fun

* update readme

* consistent enums

* add colemak to another layer for fun

* update readme
2019-07-20 13:36:14 -07:00
Joel Challis
0da743d80b [Keyboard] Refactor handwired/splittest to support multiple boards (#6373)
* Refactor splittest to support multiple dev boards

* Refactor splittest to support multiple dev boards - revert change to number of RGB led

* Refactor splittest to support multiple dev boards - update docs

* Refactor splittest to support multiple dev boards - correct docs

* Refactor splittest to support multiple dev boards - update teensy master logic
2019-07-20 13:35:30 -07:00
MechMerlin
7afae46ea6 [Keyboard] Grid 600 Type 05 "PRESS" Cover Module (#6368)
* add grid600 type 5 press cover module

* Update keyboards/grid600/press/keymaps/default/keymap.c

Co-Authored-By: fauxpark <fauxpark@gmail.com>

* remove unused custom keycode enum
2019-07-20 13:30:38 -07:00
jotix
c644299820 [Keyboard] leds in default keymap (#6357) 2019-07-20 13:25:20 -07:00
Konstantin Đorđević
a2e91ebec9 Update IS_COMMAND definitions to use MOD_MASK_SHIFT (#6348)
* Update IS_COMMAND definition in templates to use MOD_MASK_SHIFT

* Update IS_COMMAND in docs

* Update IS_COMMAND default definition in tmk_core

* Update table in Command docs based on suggestion

Co-Authored-By: fauxpark <fauxpark@gmail.com>
2019-07-20 13:21:40 -07:00
Danny
a40dbf94e8 Merge pull request #6264 from zvecr/split_master_check
Allow board to override split keyboard master check
2019-07-20 15:13:01 -04:00
Danny
1c0a7ad6c2 Fix Numbrero Handwired make example in readme (#6379)
Fix Numbrero Handwired make example in readme
2019-07-20 15:09:13 -04:00
noroadsleft
6b1db7da23 Fix Numbrero Handwired make example in readme 2019-07-20 11:06:18 -07:00
Drashna Jaelre
001a6c24ae [Docs] Clarify Zadig usage in FAQ Docs (#6360)
* Rewrite Zadig section to be more clear

* Wordsmithing

Co-Authored-By: MechMerlin <30334081+mechmerlin@users.noreply.github.com>
2019-07-19 13:23:16 -07:00
noroadsleft
b1fc3f35c6 Melody96 Configurator updates and minor refactoring (#6365)
* Add Configurator layout data for LAYOUT_hotswap

* Add LAYOUT_std60_split_num0

Requested by 李小安#9728 on QMK Discord.

Standard 60% ANSI layout for the alphanumeric region, with a split-0 Numpad.

Includes a sample keymap.

* Update Docs links on readme

* Change melody96.h to use #pragma once include guard

* Change config.h to use #pragma once include guard

* Add readme for default_std60_split_num0 keymap
2019-07-19 10:39:20 -07:00
Konstantin Đorđević
e040028f1b Change xprintf() calls in rgblight.c to dprintf() (#6363) 2019-07-19 08:47:04 -07:00
fauxpark
d417b0cc7d Tidy up ALF X1.1 (#6367)
* Tidy up ALF X1.1

* Correct x positions

* 4 spaces

* Remove a stray TRNS key
2019-07-18 22:05:25 -07:00
mechmerlin
b12b26946d simple readme fix 2019-07-18 21:16:30 -07:00
trinity1561
918fb7f8da Print Screen and Pause placement swap (#5981)
* Update x11.h

The original json file that was given by the designer was incorrect.  The Print Screen and Pause button is swapped.

* Update space65.c

Fixing the Caps Lock LED.

* Revert "Update space65.c"

This reverts commit 1f5de1abaefadd2e54259999a29bab501da5f67a.
2019-07-18 20:04:01 -07:00
jotix
455f15528c Jotix (#6355)
* add unicode_map

* add unicode_map

* numpad change
2019-07-18 19:27:09 -07:00
Joao Maia
00c6892b3f [Keyboard] Add 6macro keyboard (#6362)
* Initial commit for 6macro firmware

* Updated layout documentation

* Removed unused commented code
2019-07-18 12:31:40 -07:00
Fred Silberberg
171f7c561b Add more layouts for the ergodash (#6336) 2019-07-18 07:45:48 -07:00
fauxpark
5b4187ad1b Correct backlight on state docs (#6358)
* Correct backlight on state docs

* Reword to make it less confusing
2019-07-18 07:45:00 -07:00
Ethan Madden
d5b01bd34b Add prime_e keymap (#6350) 2019-07-18 06:55:31 -07:00
jshuf
1650ba00f1 Allow userspace the opportunity to handle keycodes 2019-07-17 12:38:08 -07:00
dsanchezseco
f9d47ebe2f cleanup and start sound (#6353) 2019-07-17 09:24:49 -07:00
fauxpark
3895b4b868 Extend maximum number of backlight levels to 31 (#6351) 2019-07-16 21:58:29 -07:00
Daniel Schindler
a8647f0d27 Add model01 keymap. Change kinesis keeymap. 2019-07-16 15:02:48 -07:00
Konstantin Đorđević
6c7d173ad7 Remove unnecessary IS_COMMAND definitions from a couple of boards 2019-07-16 14:18:26 -07:00
Konstantin Đorđević
65906f679d Use led_set_kb instead of led_set_user in melody96.c 2019-07-16 14:13:08 -07:00
fauxpark
6af77551c6 Remove more commented out MCUs 2019-07-16 13:47:43 -07:00
Salicylic-acid3
4747d974aa [Keyboard] Add keyboard Naked48 (#6330)
* Add Naked48

*  Comment reflected
2019-07-16 09:39:39 -07:00
Drashna Jaelre
e5d2cb8f98 Fix Preprocessor check for Leader Keys 2019-07-16 09:27:33 -07:00
Drashna Jaelre
f6c7e11426 Remove the need to specify NUM_OF_ENCODERS for the Encoder feature (#6328)
* Remove the need to set NUM_OF_ENCODERS

Instead, calculate the size of the array, and use that instead

* Add hack for split common support

* Remove NUM_OF_ENCODERS from keyboard config

Can be reverted, if needed
2019-07-16 01:40:54 -07:00
Sidney Bovet
97a3f806c4 [Keymap] Fix advanced keymap readme and macro function (#6342) 2019-07-16 01:37:35 -07:00
Drashna Jaelre
c44fc68297 Allow Combo feature to be enabled/disabled live (#6318)
* Add ability to enable/disable combos

* Update documentation for Combo feature

* Change keycodes for appeasement

* Simplify combo_toggle function

* Update names

* Update combo docs to use tables
2019-07-16 01:37:19 -07:00
Joel Challis
5fa0a274ea Align ARM i2c_readReg with AVR (#6314)
* Align arm i2c_readReg with avr

* Align arm i2c_readReg with avr - fix cannonkeys
2019-07-16 01:36:23 -07:00
Joel Challis
4e375aa1f5 Add ARM I2Cv1 support to i2c_master (#6262)
* Add ARM I2Cv1 support to i2c_master

* Add I2Cv1 docs
2019-07-16 01:30:53 -07:00
Drashna Jaelre
f859375284 Expand bootloader target to support most AVR boards (#6255)
* Update the :bootloader target to pass along correct hardware info

* Update make scripts to properly grab the settings (a big thanks to @yanfali)

* Remove LUFA debug warnings
2019-07-16 01:28:23 -07:00
Drashna Jaelre
f6651424a0 Make Caps Lock delay more reasonable (#6199)
* Make Caps Lock delay more reasonable

* Update documentation

* Update docs/config_options.md

Co-Authored-By: Konstantin Đorđević <vomindoraan@gmail.com>

* Update docs/config_options.md

Co-Authored-By: Konstantin Đorđević <vomindoraan@gmail.com>
2019-07-16 01:21:52 -07:00
Joel Challis
29e9caa82b Configure Vagrant to use qmk_base_container (#6194)
* Initial conversion of vagrant to use qmkfm/base_container

* Fix vagrant when using docker provider

* Workaround for VirtualBox VM restarts

* Generalise Vagrant docs slightly and add FAQ
2019-07-16 01:20:34 -07:00
fauxpark
a32f7e1a25 Store backlight breathing state in EEPROM (#6105)
* Store backlight breathing state in EEPROM

* Reduce backlight_config.level from 6 bits to 4 (max 15 "on" levels)

* Error out if BACKLIGHT_LEVELS is > 15

* Remove mention of default backlight pin in rules.mk template

* Remove pointless comment
2019-07-16 00:56:36 -07:00
XScorpion2
e2dfb787da Adding rgb matrix speed into eeprom storage. (#5965)
Zeroing out spd in eeconfig_init_quantum

Switched to block read & update

Update tmk_core/common/eeconfig.h

Co-Authored-By: Drashna Jaelre <drashna@live.com>

Fixing init compile error

Update eeconfig.c

Dead / Missing API cleanup

alignment
2019-07-16 00:40:43 -07:00
Roman Volosatovs
72df7b4c19 shell.nix: Downgrade gcc-arm-embedded (#5913)
Temporary fix for https://github.com/qmk/qmk_firmware/issues/5868
2019-07-16 00:35:15 -07:00
Drashna Jaelre
1209fb8643 Enable Mousekeys on Corne Keyboard by default (#5893)
* Enable Mousekeys on Corne Keyboard by default

For Tessachka and Configurator support

* ENable for default image too

* Remove most of rules.mk for default keymap

* make sure rgblight is enabled by default

from default keymap
2019-07-16 00:28:02 -07:00
fauxpark
ba42a5ae68 Remove commented out MCUs in rules.mk (#5884) 2019-07-16 00:26:38 -07:00
Drashna Jaelre
09f5767072 Add out of bound check for Leader Key sequence array (#5840)
* Add out of bound check for Leader Key sequence array

* A shot at advanced C stuff for Leader Key optimization

* Revert most changes

* Change default back

* Include string.h if compiling for ARM

* Use sizeof instead of a number
2019-07-15 23:56:34 -07:00
fauxpark
ed6a872911 Add sendstring LUTs for French keymap (#5830) 2019-07-15 23:28:39 -07:00
Drashna Jaelre
311d625c56 [Docs] Add dedicated page for Split Keyboard information (#5802)
* [Docs] Add dedicated page for Split Keyboard information

* Apply suggestions from code review

Co-Authored-By: drashna <drashna@live.com>

* Fix Typos

Co-Authored-By: drashna <drashna@live.com>

* Fix some formatting issues

* Add Additional RGB info

* Fix Bulletted formatting

* Apply suggestions from code review

Co-Authored-By: drashna <drashna@live.com>

* Fix line wrapping

* Additional fixes and expansion

* Reword warning/note

Co-Authored-By: drashna <drashna@live.com>

* add i2c/serial coexistance info

* i2c markdown

* Change i2c wiring text

Co-Authored-By: drashna <drashna@live.com>
2019-07-15 23:23:32 -07:00
zvecr
05990c9bda Small fix to allow board to override split keyboard master check 2019-07-05 18:45:57 +01:00
589 changed files with 10668 additions and 3318 deletions

31
Vagrantfile vendored
View File

@ -52,26 +52,37 @@ Vagrant.configure(2) do |config|
end
# Docker provider pulls from hub.docker.com respecting docker.image if
# config.vm.box is nil. Note that this bind-mounts from the current dir to
# config.vm.box is nil. In this case, we adhoc build util/vagrant/Dockerfile.
# Note that this bind-mounts from the current dir to
# /vagrant in the guest, so unless your UID is 1000 to match vagrant in the
# image, you'll need to: chmod -R a+rw .
config.vm.provider "docker" do |docker, override|
override.vm.box = nil
docker.image = "jesselang/debian-vagrant:stretch"
docker.build_dir = "util/vagrant"
docker.has_ssh = true
end
# This script ensures the required packages for AVR programming are installed
# It also ensures the system always gets the latest updates when powered on
# If this causes issues you can run a 'vagrant destroy' and then
# add a # before ,run: (or change "always" to "once") and run 'vagrant up' to get a working
# non-updated box and then attempt to troubleshoot or open a Github issue
config.vm.provision "shell", inline: "/vagrant/util/qmk_install.sh", run: "always"
# Unless we are running the docker container directly
# 1. run container detached on vm
# 2. attach on 'vagrant ssh'
["virtualbox", "vmware_workstation", "vmware_fusion"].each do |type|
config.vm.provider type do |virt, override|
override.vm.provision "docker" do |d|
d.run "qmkfm/base_container",
cmd: "tail -f /dev/null",
args: "--privileged -v /dev:/dev -v '/vagrant:/vagrant'"
end
override.vm.provision "shell", inline: <<-SHELL
echo 'docker restart qmkfm-base_container && exec docker exec -it qmkfm-base_container /bin/bash -l' >> ~vagrant/.bashrc
SHELL
end
end
config.vm.post_up_message = <<-EOT
Log into the VM using 'vagrant ssh'. QMK directory synchronized with host is
located at /vagrant
Log into the environment using 'vagrant ssh'. QMK directory synchronized with
host is located at /vagrant
To compile the .hex files use make command inside this directory, e.g.
cd /vagrant
make <keyboard>:default

View File

@ -77,6 +77,7 @@
* [RGB Lighting](feature_rgblight.md)
* [RGB Matrix](feature_rgb_matrix.md)
* [Space Cadet](feature_space_cadet.md)
* [Split Keyboard](feature_split_keyboard.md)
* [Stenography](feature_stenography.md)
* [Swap Hands](feature_swap_hands.md)
* [Tap Dance](feature_tap_dance.md)

View File

@ -89,7 +89,7 @@ This is a C header file that is one of the first things included, and will persi
* mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
* `#define LOCKING_RESYNC_ENABLE`
* tries to keep switch state consistent with keyboard LED state
* `#define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))`
* `#define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)`
* key combination that allows the use of magic commands (useful for debugging)
* `#define USB_MAX_POWER_CONSUMPTION`
* sets the maximum power (in mA) over USB for the device (default: 500)
@ -171,8 +171,8 @@ If you define these options you will enable the associated feature, which may in
* how long for the Combo keys to be detected. Defaults to `TAPPING_TERM` if not defined.
* `#define TAP_CODE_DELAY 100`
* Sets the delay between `register_code` and `unregister_code`, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds.
* `#define TAP_HOLD_CAPS_DELAY 200`
* Sets the delay for Tap Hold keys (`LT`, `MT`) when using `KC_CAPSLOCK` keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 200ms if not defined.
* `#define TAP_HOLD_CAPS_DELAY 80`
* Sets the delay for Tap Hold keys (`LT`, `MT`) when using `KC_CAPSLOCK` keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher.
## RGB Light Configuration

View File

@ -49,15 +49,13 @@ Pro Micro (Atmega32u4), make sure to include `CONFIG_USB_ACM=y`. Other devices m
## Unknown Device for DFU Bootloader
If you're using Windows to flash your keyboard, and you are running into issues, check the Device Manager. If you see an "Unknown Device" when the keyboard is in "bootloader mode", then you may have a driver issue.
Issues encountered when flashing keyboards on Windows are most often due to having the wrong drivers installed for the bootloader.
Re-running the installation script for MSYS2 may help (eg run `./util/qmk_install.sh` from MSYS2/WSL) or reinstalling the QMK Toolbox may fix the issue.
Re-running the installation script for MSYS2 may help (eg run `util/qmk_install.sh` from MSYS2/WSL) or reinstalling the QMK Toolbox may fix the issue. Alternatively, you can download and run the [`qmk_driver_installer`](https://github.com/qmk/qmk_driver_installer) package.
If that doesn't work, then you may need to grab the [Zadig Utility](https://zadig.akeo.ie/). Download this, find the device in question, and select the `WinUSB` option, and hit "Reinstall driver". Once you've done that, try flashing your board, again. If that doesn't work, try all of the options, until one works.
If that doesn't work, then you may need to grab the [Zadig Utility](https://zadig.akeo.ie/). Download this, and run it on the system. Then, you will need to reset your board into bootloader mode. After that, locate the device in question. If the device doesn't show up in the list (or nothing shows up in the list), you may need to enable the `List all devices` option in the `Options` menu.
?> There isn't a best option for which driver should be used here. Some options work better on some systems than others. libUSB and WinUSB seem to be the best options here.
If the bootloader doesn't show up in the list for devices, you may need to enable the "List all devices" option in the `Options` menu, and then find the bootloader in question.
From here, you will need to know what type of controller the board is using. You may see it listed in the Device Manager as `ATmega32U4` device (which is an AVR board), or an `STM32` device (Which is an ARM board). For AVR boards, use `libusb-win32` for the driver. For ARM boards, use the `WinUSB` driver. Once the correct driver type has been selected, click on the `Replace Driver` button, unplug your board, plug it back in, and reset it again.
## WINAVR is Obsolete

View File

@ -65,7 +65,7 @@ To change the behaviour of the backlighting, `#define` these in your `config.h`:
|---------------------|-------------|-------------------------------------------------------------------------------------------------------------|
|`BACKLIGHT_PIN` |`B7` |The pin that controls the LEDs. Unless you are designing your own keyboard, you shouldn't need to change this|
|`BACKLIGHT_PINS` |*Not defined*|experimental: see below for more information |
|`BACKLIGHT_LEVELS` |`3` |The number of brightness levels (maximum 15 excluding off) |
|`BACKLIGHT_LEVELS` |`3` |The number of brightness levels (maximum 31 excluding off) |
|`BACKLIGHT_CAPS_LOCK`|*Not defined*|Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) |
|`BACKLIGHT_BREATHING`|*Not defined*|Enable backlight breathing, if supported |
|`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds |
@ -73,8 +73,10 @@ To change the behaviour of the backlighting, `#define` these in your `config.h`:
## Backlight On State
Most backlight circuits are driven by an N-channel MOSFET or NPN transistor. This means that to turn the transistor *on* and light the LEDs, you must drive the backlight pin, connected to the gate or base, *low*.
Sometimes, however, a P-channel MOSFET, or a PNP transistor is used. In this case you must `#define BACKLIGHT_ON_STATE 1`, so that when the transistor is on, the pin is driven *high* instead.
Most backlight circuits are driven by an N-channel MOSFET or NPN transistor. This means that to turn the transistor *on* and light the LEDs, you must drive the backlight pin, connected to the gate or base, *high*.
Sometimes, however, a P-channel MOSFET, or a PNP transistor is used. In this case, when the transistor is on, the pin is driven *low* instead.
This functionality is configured at the keyboard level with the `BACKLIGHT_ON_STATE` define.
## Multiple backlight pins

View File

@ -59,19 +59,12 @@ void process_combo_event(uint8_t combo_index, bool pressed) {
switch(combo_index) {
case ZC_COPY:
if (pressed) {
register_code(KC_LCTL);
register_code(KC_C);
unregister_code(KC_C);
unregister_code(KC_LCTL);
tap_code16(LCTL(KC_C));
}
break;
case XV_PASTE:
if (pressed) {
register_code(KC_LCTL);
register_code(KC_V);
unregister_code(KC_V);
unregister_code(KC_LCTL);
tap_code16(LCTL(KC_V));
}
break;
}
@ -87,3 +80,24 @@ If you're using long combos, or even longer combos, you may run into issues with
In this case, you can add either `#define EXTRA_LONG_COMBOS` or `#define EXTRA_EXTRA_LONG_COMBOS` in your `config.h` file.
You may also be able to enable action keys by defining `COMBO_ALLOW_ACTION_KEYS`.
## Keycodes
You can enable, disable and toggle the Combo feature on the fly. This is useful if you need to disable them temporarily, such as for a game.
|Keycode |Description |
|----------|---------------------------------|
|`CMB_ON` |Turns on Combo feature |
|`CMB_OFF` |Turns off Combo feature |
|`CMB_TOG` |Toggles Combo feature on and off |
## User callbacks
In addition to the keycodes, there are a few functions that you can use to set the status, or check it:
|Function |Description |
|-----------|--------------------------------------------------------------------|
| `combo_enable()` | Enables the combo feature |
| `combo_disable()` | Disables the combo feature, and clears the combo buffer |
| `combo_toggle()` | Toggles the state of the combo feature |
| `is_combo_enabled()` | Returns the status of the combo feature state (true or false) |

View File

@ -16,36 +16,36 @@ To use Command, hold down the key combination defined by the `IS_COMMAND()` macr
If you would like to change the key assignments for Command, `#define` these in your `config.h` at either the keyboard or keymap level. All keycode assignments here must omit the `KC_` prefix.
|Define |Default |Description |
|------------------------------------|---------------------------------------------------------------------------|------------------------------------------------|
|`IS_COMMAND()` |<code>(get_mods() == (MOD_BIT(KC_LSHIFT) &#124; MOD_BIT(KC_RSHIFT)))</code>|The key combination to activate Command |
|`MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS` |`true` |Set default layer with the Function row |
|`MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS` |`true` |Set default layer with the number keys |
|`MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM`|`false` |Set default layer with `MAGIC_KEY_LAYER0..9` |
|`MAGIC_KEY_DEBUG` |`D` |Toggle debugging over serial |
|`MAGIC_KEY_DEBUG_MATRIX` |`X` |Toggle key matrix debugging |
|`MAGIC_KEY_DEBUG_KBD` |`K` |Toggle keyboard debugging |
|`MAGIC_KEY_DEBUG_MOUSE` |`M` |Toggle mouse debugging |
|`MAGIC_KEY_CONSOLE` |`C` |Enable the Command console |
|`MAGIC_KEY_VERSION` |`V` |Print the running QMK version to the console |
|`MAGIC_KEY_STATUS` |`S` |Print the current keyboard status to the console|
|`MAGIC_KEY_HELP` |`H` |Print Command help to the console |
|`MAGIC_KEY_HELP_ALT` |`SLASH` |Print Command help to the console (alternate) |
|`MAGIC_KEY_LAYER0` |`0` |Make layer 0 the default layer |
|`MAGIC_KEY_LAYER0_ALT` |`GRAVE` |Make layer 0 the default layer (alternate) |
|`MAGIC_KEY_LAYER1` |`1` |Make layer 1 the default layer |
|`MAGIC_KEY_LAYER2` |`2` |Make layer 2 the default layer |
|`MAGIC_KEY_LAYER3` |`3` |Make layer 3 the default layer |
|`MAGIC_KEY_LAYER4` |`4` |Make layer 4 the default layer |
|`MAGIC_KEY_LAYER5` |`5` |Make layer 5 the default layer |
|`MAGIC_KEY_LAYER6` |`6` |Make layer 6 the default layer |
|`MAGIC_KEY_LAYER7` |`7` |Make layer 7 the default layer |
|`MAGIC_KEY_LAYER8` |`8` |Make layer 8 the default layer |
|`MAGIC_KEY_LAYER9` |`9` |Make layer 9 the default layer |
|`MAGIC_KEY_BOOTLOADER` |`B` |Jump to bootloader |
|`MAGIC_KEY_BOOTLOADER_ALT` |`ESC` |Jump to bootloader (alternate) |
|`MAGIC_KEY_LOCK` |`CAPS` |Lock the keyboard so nothing can be typed |
|`MAGIC_KEY_EEPROM` |`E` |Print stored EEPROM config to the console |
|`MAGIC_KEY_EEPROM_CLEAR` |`BSPACE` |Clear the EEPROM |
|`MAGIC_KEY_NKRO` |`N` |Toggle N-Key Rollover (NKRO) |
|`MAGIC_KEY_SLEEP_LED` |`Z` |Toggle LED when computer is sleeping |
|Define |Default |Description |
|------------------------------------|--------------------------------|------------------------------------------------|
|`IS_COMMAND()` |`(get_mods() == MOD_MASK_SHIFT)`|The key combination to activate Command |
|`MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS` |`true` |Set default layer with the Function row |
|`MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS` |`true` |Set default layer with the number keys |
|`MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM`|`false` |Set default layer with `MAGIC_KEY_LAYER0..9` |
|`MAGIC_KEY_DEBUG` |`D` |Toggle debugging over serial |
|`MAGIC_KEY_DEBUG_MATRIX` |`X` |Toggle key matrix debugging |
|`MAGIC_KEY_DEBUG_KBD` |`K` |Toggle keyboard debugging |
|`MAGIC_KEY_DEBUG_MOUSE` |`M` |Toggle mouse debugging |
|`MAGIC_KEY_CONSOLE` |`C` |Enable the Command console |
|`MAGIC_KEY_VERSION` |`V` |Print the running QMK version to the console |
|`MAGIC_KEY_STATUS` |`S` |Print the current keyboard status to the console|
|`MAGIC_KEY_HELP` |`H` |Print Command help to the console |
|`MAGIC_KEY_HELP_ALT` |`SLASH` |Print Command help to the console (alternate) |
|`MAGIC_KEY_LAYER0` |`0` |Make layer 0 the default layer |
|`MAGIC_KEY_LAYER0_ALT` |`GRAVE` |Make layer 0 the default layer (alternate) |
|`MAGIC_KEY_LAYER1` |`1` |Make layer 1 the default layer |
|`MAGIC_KEY_LAYER2` |`2` |Make layer 2 the default layer |
|`MAGIC_KEY_LAYER3` |`3` |Make layer 3 the default layer |
|`MAGIC_KEY_LAYER4` |`4` |Make layer 4 the default layer |
|`MAGIC_KEY_LAYER5` |`5` |Make layer 5 the default layer |
|`MAGIC_KEY_LAYER6` |`6` |Make layer 6 the default layer |
|`MAGIC_KEY_LAYER7` |`7` |Make layer 7 the default layer |
|`MAGIC_KEY_LAYER8` |`8` |Make layer 8 the default layer |
|`MAGIC_KEY_LAYER9` |`9` |Make layer 9 the default layer |
|`MAGIC_KEY_BOOTLOADER` |`B` |Jump to bootloader |
|`MAGIC_KEY_BOOTLOADER_ALT` |`ESC` |Jump to bootloader (alternate) |
|`MAGIC_KEY_LOCK` |`CAPS` |Lock the keyboard so nothing can be typed |
|`MAGIC_KEY_EEPROM` |`E` |Print stored EEPROM config to the console |
|`MAGIC_KEY_EEPROM_CLEAR` |`BSPACE` |Clear the EEPROM |
|`MAGIC_KEY_NKRO` |`N` |Toggle N-Key Rollover (NKRO) |
|`MAGIC_KEY_SLEEP_LED` |`Z` |Toggle LED when computer is sleeping |

View File

@ -6,7 +6,6 @@ Basic encoders are supported by adding this to your `rules.mk`:
and this to your `config.h`:
#define NUMBER_OF_ENCODERS 1
#define ENCODERS_PAD_A { B12 }
#define ENCODERS_PAD_B { B13 }

View File

@ -0,0 +1,185 @@
# Split Keyboard
Many keyboards in the QMK Firmware repo are "split" keyboards. They use two controllers—one plugging into USB, and the second connected by a serial or an I<sup>2</sup>C connection over a TRRS or similar cable.
Split keyboards can have a lot of benefits, but there is some additional work needed to get them enabled.
QMK Firmware has a generic implementation that is usable by any board, as well as numerous board specific implementations.
For this, we will mostly be talking about the generic implementation used by the Let's Split and other keyboards.
!> ARM is not yet supported for Split Keyboards. Progress is being made, but we are not quite there, yet.
## Hardware Configuration
This assumes that you're using two Pro Micro-compatible controllers, and are using TRRS jacks to connect to two halves.
### Required Hardware
Apart from diodes and key switches for the keyboard matrix in each half, you will need 2x TRRS sockets and 1x TRRS cable.
Alternatively, you can use any sort of cable and socket that has at least 3 wires.
If you want to use I<sup>2</sup>C to communicate between halves, you will need a cable with at least 4 wires and 2x 4.7kΩ pull-up resistors.
#### Considerations
The most commonly used connection is a TRRS cable and jacks. These provide 4 wires, making them very useful for split keyboards, and are easy to find.
However, since one of the wires carries VCC, this means that the boards are not hot pluggable. You should always disconnect the board from USB before unplugging and plugging in TRRS cables, or you can short the controller, or worse.
Another option is to use phone cables (as in, old school RJ-11/RJ-14 cables). Make sure that you use one that actually supports 4 wires/lanes.
However, USB cables, SATA cables, and even just 4 wires have been known to be used for communication between the controllers.
!> Using USB cables for communication between the controllers works just fine, but the connector could be mistaken for a normal USB connection and potentially short out the keyboard, depending on how it's wired. For this reason, they are not recommended for connecting split keyboards.
### Serial Wiring
The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and D0 (aka PDO or pin 3) between the two Pro Micros.
?> Note that the pin used here is actually set by `SOFT_SERIAL_PIN` below.
![serial wiring](https://i.imgur.com/C3D1GAQ.png)
### I<sup>2</sup>C Wiring
The 4 wires of the TRRS cable need to connect GND, VCC, and SCL and SDA (aka PD0/pin 3 and PD1/pin 2, respectively) between the two Pro Micros.
The pull-up resistors may be placed on either half. It is also possible to use 4 resistors and have the pull-ups in both halves, but this is unnecessary in simple use cases.
![I2C wiring](https://i.imgur.com/Hbzhc6E.png)
## Firmware Configuration
To enable the split keyboard feature, add the following to your `rules.mk`:
```make
SPLIT_KEYBOARD = yes
```
If you're using a custom transport (communication method), then you will also need to add:
```make
SPLIT_TRANSPORT = custom
```
### Setting Handedness
By default, the firmware does not know which side is which; it needs some help to determine that. There are several ways to do this, listed in order of precedence.
#### Handedness by Pin
You can configure the firmware to read a pin on the controller to determine handedness. To do this, add the following to your `config.h` file:
```c
#define SPLIT_HAND_PIN B7
```
This will read the specified pin. If it's high, then the controller assumes it is the left hand, and if it's low, it's assumed to be the right side.
#### Handedness by EEPROM
This method sets the keyboard's handedness by setting a flag in the persistent storage (`EEPROM`). This is checked when the controller first starts up, and determines what half the keyboard is, and how to orient the keyboard layout.
To enable this method, add the following to your `config.h` file:
```c
#define EE_HANDS
```
However, you'll have to flash the EEPROM files for the correct hand to each controller. You can do this manually, or there are targets for avrdude and dfu to do this, while flashing the firmware:
* `:avrdude-split-left`
* `:avrdude-split-right`
* `:dfu-split-left`
* `:dfu-split-right`
This setting is not changed when re-initializing the EEPROM using the `EEP_RST` key, or using the `eeconfig_init()` function. However, if you reset the EEPROM outside of the firmware's built in options (such as flashing a file that overwrites the `EEPROM`, like how the [QMK Toolbox]()'s "Reset EEPROM" button works), you'll need to re-flash the controller with the `EEPROM` files.
You can find the `EEPROM` files in the QMK firmware repo, [here](https://github.com/qmk/qmk_firmware/tree/master/quantum/split_common).
#### Handedness by `#define`
You can set the handedness at compile time. This is done by adding the following to your `config.h` file:
```c
#define MASTER_RIGHT
```
or
```c
#define MASTER_LEFT
```
If neither are defined, the handedness defaults to `MASTER_LEFT`.
### Communication Options
Because not every split keyboard is identical, there are a number of additional options that can be configured in your `config.h` file.
```c
#define USE_I2C
```
This enables I<sup>2</sup>C support for split keyboards. This isn't strictly for communication, but can be used for OLED or other I<sup>2</sup>C-based devices.
```c
#define SOFT_SERIAL_PIN D0
```
This sets the pin to be used for serial communication. If you're not using serial, you shouldn't need to define this.
However, if you are using serial and I<sup>2</sup>C on the board, you will need to set this, and to something other than D0 and D1 (as these are used for I<sup>2</sup>C communication).
```c
#define SELECT_SOFT_SERIAL_SPEED {#}`
```
If you're having issues with serial communication, you can change this value, as it controls the communication speed for serial. The default is 1, and the possible values are:
* **`0`**: about 189kbps (Experimental only)
* **`1`**: about 137kbps (default)
* **`2`**: about 75kbps
* **`3`**: about 39kbps
* **`4`**: about 26kbps
* **`5`**: about 20kbps
### Hardware Configuration Options
There are some settings that you may need to configure, based on how the hardware is set up.
```c
#define MATRIX_ROW_PINS_RIGHT { <row pins> }
#define MATRIX_COL_PINS_RIGHT { <col pins> }
```
This allows you to specify a different set of pins for the matrix on the right side. This is useful if you have a board with differently-shaped halves that requires a different configuration (such as Keebio's Quefrency).
```c
#define RGBLIGHT_SPLIT
```
This option enables synchronization of the RGB Light modes between the controllers of the split keyboard. This is for keyboards that have RGB LEDs that are directly wired to the controller (that is, they are not using the "extra data" option on the TRRS cable).
```c
#define RGBLED_SPLIT { 6, 6 }
```
This sets how many LEDs are directly connected to each controller. The first number is the left side, and the second number is the right side.
?> This setting implies that `RGBLIGHT_SPLIT` is enabled, and will forcibly enable it, if it's not.
## Additional Resources
Nicinabox has a [very nice and detailed guide](https://github.com/nicinabox/lets-split-guide) for the Let's Split keyboard, that covers most everything you need to know, including troubleshooting information.
However, the RGB Light section is out of date, as it was written long before the RGB Split code was added to QMK Firmware. Instead, wire each strip up directly to the controller.
<!-- I may port this information later, but for now ... it's very nice, and covers everything -->

View File

@ -30,6 +30,7 @@ QMK has a staggering number of features for building your keyboard. It can take
* [RGB Light](feature_rgblight.md) - RGB lighting for your keyboard.
* [RGB Matrix](feature_rgb_matrix.md) - RGB Matrix lights for per key lighting.
* [Space Cadet](feature_space_cadet.md) - Use your left/right shift keys to type parenthesis and brackets.
* [Split Keyboard](feature_split_keyboard.md)
* [Stenography](feature_stenography.md) - Put your keyboard into Plover mode for stenography use.
* [Swap Hands](feature_swap_hands.md) - Mirror your keyboard for one handed usage.
* [Tap Dance](feature_tap_dance.md) - Make a single key do as many things as you want.

View File

@ -1,16 +1,20 @@
# Vagrant Quick Start
This project includes a Vagrantfile that will allow you to build a new firmware for your keyboard very easily without major changes to your primary operating system. This also ensures that when you clone the project and perform a build, you have the exact same environment as anyone else using the Vagrantfile to build. This makes it much easier for people to help you troubleshoot any issues you encounter.
This project includes a `Vagrantfile` that will allow you to build a new firmware for your keyboard very easily without major changes to your primary operating system. This also ensures that when you clone the project and perform a build, you have the exact same environment as anyone else using the Vagrantfile to build. This makes it much easier for people to help you troubleshoot any issues you encounter.
## Requirements
Using the `/Vagrantfile` in this repository requires you have [Vagrant](http://www.vagrantup.com/) as well as [VirtualBox](https://www.virtualbox.org/) (or [VMware Workstation](https://www.vmware.com/products/workstation) and [Vagrant VMware plugin](http://www.vagrantup.com/vmware) but the (paid) VMware plugin requires a licensed copy of VMware Workstation/Fusion).
Using the `Vagrantfile` in this repository requires you have [Vagrant](http://www.vagrantup.com/) as well as a supported provider installed:
*COMPATIBILITY NOTICE* Certain versions of Virtualbox 5 appear to have an incompatibility with the Virtualbox extensions installed in the boxes in this Vagrantfile. If you encounter any issues with the /vagrant mount not succeeding, please upgrade your version of Virtualbox to at least 5.0.12. **Alternately, you can try running the following command:** `vagrant plugin install vagrant-vbguest`
* [VirtualBox](https://www.virtualbox.org/) (Version at least 5.0.12)
* Sold as 'the most accessible platform to use Vagrant'
* [VMware Workstation](https://www.vmware.com/products/workstation) and [Vagrant VMware plugin](http://www.vagrantup.com/vmware)
* The (paid) VMware plugin requires a licensed copy of VMware Workstation/Fusion
* [Docker](https://www.docker.com/)
Other than having Vagrant and Virtualbox installed and possibly a restart of your computer afterwards, you can simple run a 'vagrant up' anywhere inside the folder where you checked out this project and it will start a Linux virtual machine that contains all the tools required to build this project. There is a post Vagrant startup hint that will get you off on the right foot, otherwise you can also reference the build documentation below.
Other than having Vagrant, a suitable provider installed and possibly a restart of your computer afterwards, you can simple run a 'vagrant up' anywhere inside the folder where you checked out this project and it will start an environment (either a virtual machine or container) that contains all the tools required to build this project. There is a post Vagrant startup hint that will get you off on the right foot, otherwise you can also reference the build documentation below.
# Flashing the Firmware
## Flashing the Firmware
The "easy" way to flash the firmware is using a tool from your host OS:
@ -19,3 +23,35 @@ The "easy" way to flash the firmware is using a tool from your host OS:
* [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.
## Vagrantfile Overview
The development environment is configured to run the QMK Docker image, `qmkfm/base_container`. This not only ensures predictability between systems, it also mirrors the CI environment.
## FAQ
### Why am I seeing issues under Virtualbox?
Certain versions of Virtualbox 5 appear to have an incompatibility with the Virtualbox extensions installed in the boxes in this Vagrantfile. If you encounter any issues with the /vagrant mount not succeeding, please upgrade your version of Virtualbox to at least 5.0.12. **Alternately, you can try running the following command:**
```console
vagrant plugin install vagrant-vbguest
```
### How do I remove an existing environment?
Finished with your environment? From anywhere inside the folder where you checked out this project, Execute:
```console
vagrant destory
```
### What if I want to use Docker directly?
Want to benefit from the Vagrant workflow without a virtual machine? The Vagrantfile is configured to bypass running a virtual machine, and run the container directly. Execute the following when bringing up the environment to force the use of Docker:
```console
vagrant up --provider=docker
```
### How do I access the virtual machine instead of the Docker container?
Execute the following to bypass the `vagrant` user booting directly to the official qmk builder image:
```console
vagrant ssh -c 'sudo -i'
```

View File

@ -73,7 +73,22 @@ STM32 MCUs allows a variety of pins to be configured as I2C pins depending on th
| `I2C1_SDA` | The pin number for the SDA pin (0-9) | `7` |
| `I2C1_BANK` (deprecated) | The bank of pins (`GPIOA`, `GPIOB`, `GPIOC`), superceded by `I2C1_SCL_BANK`, `I2C1_SDA_BANK` | `GPIOB` |
STM32 MCUs allow for different timing parameters when configuring I2C. These can be modified using the following parameters, using https://www.st.com/en/embedded-software/stsw-stm32126.html as a reference:
The ChibiOS I2C driver configuration depends on STM32 MCU:
STM32F1xx, STM32F2xx, STM32F4xx, STM32L0xx and STM32L1xx use I2Cv1;
STM32F0xx, STM32F3xx, STM32F7xx and STM32L4xx use I2Cv2;
#### I2Cv1
STM32 MCUs allow for different clock and duty parameters when configuring I2Cv1. These can be modified using the following parameters, using <https://www.playembedded.org/blog/stm32-i2c-chibios/#I2Cv1_configuration_structure> as a reference:
| Variable | Default |
|--------------------|------------------|
| `I2C1_OPMODE` | `OPMODE_I2C` |
| `I2C1_CLOCK_SPEED` | `100000` |
| `I2C1_DUTY_CYCLE` | `STD_DUTY_CYCLE` |
#### I2Cv2
STM32 MCUs allow for different timing parameters when configuring I2Cv2. These can be modified using the following parameters, using <https://www.st.com/en/embedded-software/stsw-stm32126.html> as a reference:
| Variable | Default |
|-----------------------|---------|
@ -83,13 +98,14 @@ STM32 MCUs allow for different timing parameters when configuring I2C. These can
| `I2C1_TIMINGR_SCLH` | `15U` |
| `I2C1_TIMINGR_SCLL` | `21U` |
STM32 MCUs allow for different "alternate function" modes when configuring GPIO pins. These are required to switch the pins used to I2C mode. See the respective datasheet for the appropriate values for your MCU.
STM32 MCUs allow for different "alternate function" modes when configuring GPIO pins. These are required to switch the pins used to I2Cv2 mode. See the respective datasheet for the appropriate values for your MCU.
| Variable | Default |
|---------------------|---------|
| `I2C1_SCL_PAL_MODE` | `4` |
| `I2C1_SDA_PAL_MODE` | `4` |
#### Other
You can also overload the `void i2c_init(void)` function, which has a weak attribute. If you do this the configuration variables above will not be used. Please consult the datasheet of your MCU for the available GPIO configurations. The following is an example initialization function:
```C

View File

@ -33,11 +33,17 @@
static uint8_t i2c_address;
static const I2CConfig i2cconfig = {
#ifdef USE_I2CV1
I2C1_OPMODE,
I2C1_CLOCK_SPEED,
I2C1_DUTY_CYCLE,
#else
STM32_TIMINGR_PRESC(I2C1_TIMINGR_PRESC) |
STM32_TIMINGR_SCLDEL(I2C1_TIMINGR_SCLDEL) | STM32_TIMINGR_SDADEL(I2C1_TIMINGR_SDADEL) |
STM32_TIMINGR_SCLH(I2C1_TIMINGR_SCLH) | STM32_TIMINGR_SCLL(I2C1_TIMINGR_SCLL),
0,
0
#endif
};
static i2c_status_t chibios_to_qmk(const msg_t* status) {
@ -61,8 +67,13 @@ void i2c_init(void)
chThdSleepMilliseconds(10);
#ifdef USE_I2CV1
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_STM32_ALTERNATE_OPENDRAIN);
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_STM32_ALTERNATE_OPENDRAIN);
#else
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN);
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN);
#endif
//i2cInit(); //This is invoked by halInit() so no need to redo it.
}
@ -106,11 +117,11 @@ i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data,
return chibios_to_qmk(&status);
}
i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout)
i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)
{
i2c_address = devaddr;
i2cStart(&I2C_DRIVER, &i2cconfig);
msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), regaddr, 1, data, length, MS2ST(timeout));
msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), &regaddr, 1, data, length, MS2ST(timeout));
return chibios_to_qmk(&status);
}

View File

@ -22,10 +22,16 @@
* Please ensure that HAL_USE_I2C is TRUE in the halconf.h file and that
* STM32_I2C_USE_I2C1 is TRUE in the mcuconf.h file.
*/
#pragma once
#include "ch.h"
#include <hal.h>
#if defined(STM32F1XX) || defined(STM32F1xx) || defined(STM32F2xx) || defined(STM32F4xx) || defined(STM32L0xx) || defined(STM32L1xx)
#define USE_I2CV1
#endif
#ifdef I2C1_BANK
#define I2C1_SCL_BANK I2C1_BANK
#define I2C1_SDA_BANK I2C1_BANK
@ -46,30 +52,42 @@
#define I2C1_SDA 7
#endif
// The default PAL alternate modes are used to signal that the pins are used for I2C
#ifndef I2C1_SCL_PAL_MODE
#define I2C1_SCL_PAL_MODE 4
#endif
#ifndef I2C1_SDA_PAL_MODE
#define I2C1_SDA_PAL_MODE 4
#endif
#ifdef USE_I2CV1
#ifndef I2C1_OPMODE
#define I2C1_OPMODE OPMODE_I2C
#endif
#ifndef I2C1_CLOCK_SPEED
#define I2C1_CLOCK_SPEED 100000 /* 400000 */
#endif
#ifndef I2C1_DUTY_CYCLE
#define I2C1_DUTY_CYCLE STD_DUTY_CYCLE /* FAST_DUTY_CYCLE_2 */
#endif
#else
// The default PAL alternate modes are used to signal that the pins are used for I2C
#ifndef I2C1_SCL_PAL_MODE
#define I2C1_SCL_PAL_MODE 4
#endif
#ifndef I2C1_SDA_PAL_MODE
#define I2C1_SDA_PAL_MODE 4
#endif
// The default timing values below configures the I2C clock to 400khz assuming a 72Mhz clock
// For more info : https://www.st.com/en/embedded-software/stsw-stm32126.html
#ifndef I2C1_TIMINGR_PRESC
#define I2C1_TIMINGR_PRESC 15U
#endif
#ifndef I2C1_TIMINGR_SCLDEL
#define I2C1_TIMINGR_SCLDEL 4U
#endif
#ifndef I2C1_TIMINGR_SDADEL
#define I2C1_TIMINGR_SDADEL 2U
#endif
#ifndef I2C1_TIMINGR_SCLH
#define I2C1_TIMINGR_SCLH 15U
#endif
#ifndef I2C1_TIMINGR_SCLL
#define I2C1_TIMINGR_SCLL 21U
// The default timing values below configures the I2C clock to 400khz assuming a 72Mhz clock
// For more info : https://www.st.com/en/embedded-software/stsw-stm32126.html
#ifndef I2C1_TIMINGR_PRESC
#define I2C1_TIMINGR_PRESC 15U
#endif
#ifndef I2C1_TIMINGR_SCLDEL
#define I2C1_TIMINGR_SCLDEL 4U
#endif
#ifndef I2C1_TIMINGR_SDADEL
#define I2C1_TIMINGR_SDADEL 2U
#endif
#ifndef I2C1_TIMINGR_SCLH
#define I2C1_TIMINGR_SCLH 15U
#endif
#ifndef I2C1_TIMINGR_SCLL
#define I2C1_TIMINGR_SCLL 21U
#endif
#endif
#ifndef I2C_DRIVER
@ -88,5 +106,5 @@ i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length,
i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);
i2c_status_t i2c_transmit_receive(uint8_t address, uint8_t * tx_body, uint16_t tx_length, uint8_t * rx_body, uint16_t rx_length);
i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout);
i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
void i2c_stop(void);

View File

@ -71,10 +71,10 @@ uint8_t g_twi_transfer_buffer[20];
// buffers and the transfers in IS31FL3731_write_pwm_buffer() but it's
// probably not worth the extra complexity.
uint8_t g_pwm_buffer[DRIVER_COUNT][144];
bool g_pwm_buffer_update_required = false;
bool g_pwm_buffer_update_required[DRIVER_COUNT] = { false };
uint8_t g_led_control_registers[DRIVER_COUNT][18] = { { 0 }, { 0 } };
bool g_led_control_registers_update_required = false;
bool g_led_control_registers_update_required[DRIVER_COUNT] = { false };
// This is the bit pattern in the LED control registers
// (for matrix A, add one to register for matrix B)
@ -204,7 +204,7 @@ void IS31FL3731_set_color( int index, uint8_t red, uint8_t green, uint8_t blue )
g_pwm_buffer[led.driver][led.r - 0x24] = red;
g_pwm_buffer[led.driver][led.g - 0x24] = green;
g_pwm_buffer[led.driver][led.b - 0x24] = blue;
g_pwm_buffer_update_required = true;
g_pwm_buffer_update_required[led.driver] = true;
}
}
@ -220,12 +220,12 @@ void IS31FL3731_set_led_control_register( uint8_t index, bool red, bool green, b
{
is31_led led = g_is31_leds[index];
uint8_t control_register_r = (led.r - 0x24) / 8;
uint8_t control_register_g = (led.g - 0x24) / 8;
uint8_t control_register_b = (led.b - 0x24) / 8;
uint8_t bit_r = (led.r - 0x24) % 8;
uint8_t bit_g = (led.g - 0x24) % 8;
uint8_t bit_b = (led.b - 0x24) % 8;
uint8_t control_register_r = (led.r - 0x24) / 8;
uint8_t control_register_g = (led.g - 0x24) / 8;
uint8_t control_register_b = (led.b - 0x24) / 8;
uint8_t bit_r = (led.r - 0x24) % 8;
uint8_t bit_g = (led.g - 0x24) % 8;
uint8_t bit_b = (led.b - 0x24) % 8;
if ( red ) {
g_led_control_registers[led.driver][control_register_r] |= (1 << bit_r);
@ -243,28 +243,26 @@ void IS31FL3731_set_led_control_register( uint8_t index, bool red, bool green, b
g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b);
}
g_led_control_registers_update_required = true;
g_led_control_registers_update_required[led.driver] = true;
}
void IS31FL3731_update_pwm_buffers( uint8_t addr1, uint8_t addr2 )
void IS31FL3731_update_pwm_buffers( uint8_t addr, uint8_t index )
{
if ( g_pwm_buffer_update_required )
if ( g_pwm_buffer_update_required[index] )
{
IS31FL3731_write_pwm_buffer( addr1, g_pwm_buffer[0] );
IS31FL3731_write_pwm_buffer( addr2, g_pwm_buffer[1] );
IS31FL3731_write_pwm_buffer( addr, g_pwm_buffer[index] );
}
g_pwm_buffer_update_required = false;
g_pwm_buffer_update_required[index] = false;
}
void IS31FL3731_update_led_control_registers( uint8_t addr1, uint8_t addr2 )
void IS31FL3731_update_led_control_registers( uint8_t addr, uint8_t index )
{
if ( g_led_control_registers_update_required )
if ( g_led_control_registers_update_required[index] )
{
for ( int i=0; i<18; i++ )
{
IS31FL3731_write_register(addr1, i, g_led_control_registers[0][i] );
IS31FL3731_write_register(addr2, i, g_led_control_registers[1][i] );
IS31FL3731_write_register( addr, i, g_led_control_registers[index][i] );
}
}
}

View File

@ -44,8 +44,8 @@ void IS31FL3731_set_led_control_register( uint8_t index, bool red, bool green, b
// (eg. from a timer interrupt).
// Call this while idle (in between matrix scans).
// If the buffer is dirty, it will update the driver with the buffer.
void IS31FL3731_update_pwm_buffers( uint8_t addr1, uint8_t addr2 );
void IS31FL3731_update_led_control_registers( uint8_t addr1, uint8_t addr2 );
void IS31FL3731_update_pwm_buffers( uint8_t addr, uint8_t index );
void IS31FL3731_update_led_control_registers( uint8_t addr, uint8_t index );
#define C1_1 0x24
#define C1_2 0x25

View File

@ -1,5 +1,4 @@
# MCU name
#MCU = at90usb1286
MCU = atmega32u4
# Processor frequency.

View File

@ -1,5 +1,4 @@
# MCU name
#MCU = at90usb1286
MCU = atmega32u4
# Processor frequency.

View File

@ -1,5 +1,4 @@
# MCU name
#MCU = at90usb1287
MCU = atmega32u4
# Processor frequency.

View File

@ -1,5 +1,4 @@
# MCU name
#MCU = at90usb1287
MCU = atmega32u4
# Processor frequency.

View File

@ -125,11 +125,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* key combination for magic key command */
/*#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)*/
/* control how magic key switches layers */
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
@ -239,7 +234,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define BOOTMAGIC_LITE_ROW 0
// #define BOOTMAGIC_LITE_COLUMN 0
#define NUMBER_OF_ENCODERS 3
#define ENCODERS_PAD_A { B2, B3, D5 }
#define ENCODERS_PAD_B { B1, B7, B4 }
#define ENCODER_RESOLUTION 2

View File

@ -1,5 +1,4 @@
# MCU name
#MCU = at90usb1287
MCU = atmega32u4
# Processor frequency.

View File

@ -1,5 +1,4 @@
# MCU name
#MCU = at90usb1286
MCU = atmega32u4
# Processor frequency.
@ -83,4 +82,4 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
SRC += keyboards/wilba_tech/wt_main.c
RAW_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes
DYNAMIC_KEYMAP_ENABLE = yes

View File

@ -1,5 +1,4 @@
# MCU name
#MCU = at90usb1286
MCU = atmega32u4
# Processor frequency.

View File

@ -5,7 +5,6 @@ SRC += split_util.c \
matrix.c
# MCU name
#MCU = at90usb1286
MCU = atmega32u4
# Processor frequency.

View File

@ -1,5 +1,4 @@
# MCU name
#MCU = at90usb1286
MCU = atmega32u4
# Processor frequency.
@ -69,4 +68,4 @@ AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
CUSTOM_MATRIX = yes
SRC += matrix.c
SRC += matrix.c

View File

@ -1,5 +1,4 @@
# MCU name
#MCU = at90usb1286
MCU = atmega32u4
# Processor frequency.

View File

@ -1,103 +1,112 @@
{
"keyboard_name": "QMK80",
"url": "",
"maintainer": "qmk",
"width": 18.25,
"height": 6.5,
"layouts": {
"LAYOUT": {
"key_count": 88,
"layout": [
{"label":"K00", "x":0, "y":0},
{"label":"K01", "x":2, "y":0},
{"label":"K02", "x":3, "y":0},
{"label":"K03", "x":4, "y":0},
{"label":"K04", "x":5, "y":0},
{"label":"K05", "x":6.5, "y":0},
{"label":"K06", "x":7.5, "y":0},
{"label":"K07", "x":8.5, "y":0},
{"label":"K08", "x":9.5, "y":0},
{"label":"K09", "x":11, "y":0},
{"label":"K0A", "x":12, "y":0},
{"label":"K0B", "x":13, "y":0},
{"label":"K0C", "x":14, "y":0},
{"label":"K60", "x":15.25, "y":0},
{"label":"K61", "x":16.25, "y":0},
{"label":"K62", "x":17.25, "y":0},
{"label":"K10", "x":0, "y":1.5},
{"label":"K11", "x":1, "y":1.5},
{"label":"K12", "x":2, "y":1.5},
{"label":"K13", "x":3, "y":1.5},
{"label":"K14", "x":4, "y":1.5},
{"label":"K15", "x":5, "y":1.5},
{"label":"K16", "x":6, "y":1.5},
{"label":"K17", "x":7, "y":1.5},
{"label":"K18", "x":8, "y":1.5},
{"label":"K19", "x":9, "y":1.5},
{"label":"K1A", "x":10, "y":1.5},
{"label":"K1B", "x":11, "y":1.5},
{"label":"K1C", "x":12, "y":1.5},
{"label":"K5A", "x":13, "y":1.5, "w":2},
{"label":"K63", "x":15.25, "y":1.5},
{"label":"K65", "x":16.25, "y":1.5},
{"label":"K67", "x":17.25, "y":1.5},
{"label":"K20", "x":0, "y":2.5, "w":1.5},
{"label":"K21", "x":1.5, "y":2.5},
{"label":"K22", "x":2.5, "y":2.5},
{"label":"K23", "x":3.5, "y":2.5},
{"label":"K24", "x":4.5, "y":2.5},
{"label":"K25", "x":5.5, "y":2.5},
{"label":"K26", "x":6.5, "y":2.5},
{"label":"K27", "x":7.5, "y":2.5},
{"label":"K28", "x":8.5, "y":2.5},
{"label":"K29", "x":9.5, "y":2.5},
{"label":"K2A", "x":10.5, "y":2.5},
{"label":"K2B", "x":11.5, "y":2.5},
{"label":"K2C", "x":12.5, "y":2.5},
{"label":"K4C", "x":13.5, "y":2.5, "w":1.5},
{"label":"K64", "x":15.25, "y":2.5},
{"label":"K66", "x":16.25, "y":2.5},
{"label":"K68", "x":17.25, "y":2.5},
{"label":"K30", "x":0, "y":3.5, "w":1.75},
{"label":"K31", "x":1.75, "y":3.5},
{"label":"K32", "x":2.75, "y":3.5},
{"label":"K33", "x":3.75, "y":3.5},
{"label":"K34", "x":4.75, "y":3.5},
{"label":"K35", "x":5.75, "y":3.5},
{"label":"K36", "x":6.75, "y":3.5},
{"label":"K37", "x":7.75, "y":3.5},
{"label":"K38", "x":8.75, "y":3.5},
{"label":"K39", "x":9.75, "y":3.5},
{"label":"K3A", "x":10.75, "y":3.5},
{"label":"K3B", "x":11.75, "y":3.5},
{"label":"K3C", "x":12.75, "y":3.5, "w":2.25},
{"label":"K40", "x":0, "y":4.5, "w":2.25},
{"label":"K41", "x":2.25, "y":4.5},
{"label":"K42", "x":3.25, "y":4.5},
{"label":"K43", "x":4.25, "y":4.5},
{"label":"K44", "x":5.25, "y":4.5},
{"label":"K45", "x":6.25, "y":4.5},
{"label":"K46", "x":7.25, "y":4.5},
{"label":"K47", "x":8.25, "y":4.5},
{"label":"K48", "x":9.25, "y":4.5},
{"label":"K49", "x":10.25, "y":4.5},
{"label":"K4A", "x":11.25, "y":4.5},
{"label":"K4B", "x":12.25, "y":4.5, "w":1.75},
{"label":"K69", "x":14, "y":4.5},
{"label":"K58", "x":16.25, "y":4.5},
{"label":"K50", "x":0, "y":5.5, "w":1.25},
{"label":"K51", "x":1.25, "y":5.5, "w":1.25},
{"label":"K52", "x":2.5, "y":5.5, "w":1.25},
{"label":"K53", "x":3.75, "y":5.5, "w":6.25},
{"label":"K54", "x":10, "y":5.5, "w":1.25},
{"label":"K55", "x":11.25, "y":5.5, "w":1.25},
{"label":"K56", "x":12.5, "y":5.5, "w":1.25},
{"label":"K57", "x":13.75, "y":5.5, "w":1.25},
{"label":"K6A", "x":15.25, "y":5.5},
{"label":"K59", "x":16.25, "y":5.5},
{"label":"K6B", "x":17.25, "y":5.5}
]
}
"keyboard_name": "x11",
"url": "",
"maintainer": "qmk",
"width": 18.25,
"height": 6.5,
"layouts": {
"LAYOUT": {
"key_count": 88,
"layout": [
{"label":"K00", "x":0, "y":0},
{"label":"K01", "x":2, "y":0},
{"label":"K02", "x":3, "y":0},
{"label":"K03", "x":4, "y":0},
{"label":"K04", "x":5, "y":0},
{"label":"K05", "x":6.5, "y":0},
{"label":"K06", "x":7.5, "y":0},
{"label":"K07", "x":8.5, "y":0},
{"label":"K08", "x":9.5, "y":0},
{"label":"K09", "x":11, "y":0},
{"label":"K0A", "x":12, "y":0},
{"label":"K0B", "x":13, "y":0},
{"label":"K0C", "x":14, "y":0},
{"label":"K62", "x":15.25, "y":0},
{"label":"K61", "x":16.25, "y":0},
{"label":"K60", "x":17.25, "y":0},
{"label":"K10", "x":0, "y":1.5},
{"label":"K11", "x":1, "y":1.5},
{"label":"K12", "x":2, "y":1.5},
{"label":"K13", "x":3, "y":1.5},
{"label":"K14", "x":4, "y":1.5},
{"label":"K15", "x":5, "y":1.5},
{"label":"K16", "x":6, "y":1.5},
{"label":"K17", "x":7, "y":1.5},
{"label":"K18", "x":8, "y":1.5},
{"label":"K19", "x":9, "y":1.5},
{"label":"K1A", "x":10, "y":1.5},
{"label":"K1B", "x":11, "y":1.5},
{"label":"K1C", "x":12, "y":1.5},
{"label":"K5A", "x":13, "y":1.5, "w":2},
{"label":"K63", "x":15.25, "y":1.5},
{"label":"K65", "x":16.25, "y":1.5},
{"label":"K67", "x":17.25, "y":1.5},
{"label":"K20", "x":0, "y":2.5, "w":1.5},
{"label":"K21", "x":1.5, "y":2.5},
{"label":"K22", "x":2.5, "y":2.5},
{"label":"K23", "x":3.5, "y":2.5},
{"label":"K24", "x":4.5, "y":2.5},
{"label":"K25", "x":5.5, "y":2.5},
{"label":"K26", "x":6.5, "y":2.5},
{"label":"K27", "x":7.5, "y":2.5},
{"label":"K28", "x":8.5, "y":2.5},
{"label":"K29", "x":9.5, "y":2.5},
{"label":"K2A", "x":10.5, "y":2.5},
{"label":"K2B", "x":11.5, "y":2.5},
{"label":"K2C", "x":12.5, "y":2.5},
{"label":"K4C", "x":13.5, "y":2.5, "w":1.5},
{"label":"K64", "x":15.25, "y":2.5},
{"label":"K66", "x":16.25, "y":2.5},
{"label":"K68", "x":17.25, "y":2.5},
{"label":"K30", "x":0, "y":3.5, "w":1.75},
{"label":"K31", "x":1.75, "y":3.5},
{"label":"K32", "x":2.75, "y":3.5},
{"label":"K33", "x":3.75, "y":3.5},
{"label":"K34", "x":4.75, "y":3.5},
{"label":"K35", "x":5.75, "y":3.5},
{"label":"K36", "x":6.75, "y":3.5},
{"label":"K37", "x":7.75, "y":3.5},
{"label":"K38", "x":8.75, "y":3.5},
{"label":"K39", "x":9.75, "y":3.5},
{"label":"K3A", "x":10.75, "y":3.5},
{"label":"K3B", "x":11.75, "y":3.5},
{"label":"K3C", "x":12.75, "y":3.5, "w":2.25},
{"label":"K40", "x":0, "y":4.5, "w":2.25},
{"label":"K41", "x":2.25, "y":4.5},
{"label":"K42", "x":3.25, "y":4.5},
{"label":"K43", "x":4.25, "y":4.5},
{"label":"K44", "x":5.25, "y":4.5},
{"label":"K45", "x":6.25, "y":4.5},
{"label":"K46", "x":7.25, "y":4.5},
{"label":"K47", "x":8.25, "y":4.5},
{"label":"K48", "x":9.25, "y":4.5},
{"label":"K49", "x":10.25, "y":4.5},
{"label":"K4A", "x":11.25, "y":4.5},
{"label":"K4B", "x":12.25, "y":4.5, "w":1.75},
{"label":"K69", "x":14, "y":4.5},
{"label":"K58", "x":16.25, "y":4.5},
{"label":"K50", "x":0, "y":5.5, "w":1.25},
{"label":"K51", "x":1.25, "y":5.5, "w":1.25},
{"label":"K52", "x":2.5, "y":5.5, "w":1.25},
{"label":"K53", "x":3.75, "y":5.5, "w":6.25},
{"label":"K54", "x":10, "y":5.5, "w":1.25},
{"label":"K55", "x":11.25, "y":5.5, "w":1.25},
{"label":"K56", "x":12.5, "y":5.5, "w":1.25},
{"label":"K57", "x":13.75, "y":5.5, "w":1.25},
{"label":"K6A", "x":15.25, "y":5.5},
{"label":"K59", "x":16.25, "y":5.5},
{"label":"K6B", "x":17.25, "y":5.5}
]
}
}
}

View File

@ -15,64 +15,23 @@
*/
#include QMK_KEYBOARD_H
// Defines the keycodes used by our macros in process_record_user
enum custom_keycodes {
QMKBEST = SAFE_RANGE,
QMKURL
};
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, MO(1), KC_UP, KC_LCTL, \
KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
),
[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, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_MPLY, KC_MSTP, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, RGB_VAD, RGB_SAD \
),
[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, MO(1), KC_UP,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
BL_TOGG, BL_DEC, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_MPLY, KC_MSTP,
RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};
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;
}
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
void led_set_user(uint8_t usb_led) {
}

View File

@ -1,5 +1,4 @@
# MCU name
#MCU = at90usb1286
MCU = atmega32u4
# Processor frequency.

Some files were not shown because too many files have changed in this diff Show More