Compare commits

...
80 Commits
Author SHA1 Message Date
Max Rumpf 8af3fe0c7d [Keymap] Actually swap space and left control in gaming mode (#6162) 2019-06-19 22:02:43 -07:00
Danny 810c8db770 Set default I2C clock speed to 100kHz for split_common (#6161)
* Set default I2C clock rate for split_common boards to 100kHz

Default from I2C driver is 400kHz.

* Update documentation for setting I2C clock speed
2019-06-19 22:02:20 -07:00
noroadsleftandDrashna Jaelre 5f0ab5a24b [Keyboard] Planck Layout Macro Refactor, Part II (#6156)
* Move layout macros to revision folders

* Update Planck EZ layout macros

Planck EZ only supports one layout (centered 2u spacebar). Deleted all the other macros.

* Flesh out QMK Configurator support

Give each Planck revision its own info.json file.

* Readme updates

- give each revision its own readme
- add the Planck EZ to the main Planck readme

* Fix layout macro for Planck EZ

Previous matrix didn't compile because the electrical matrix defined a k3b location, which was unused by the physical arguments.

Drashna was kind enough to confirm the Planck EZ's matrix for me.

Co-authored-by: Drashna Jaelre <[email protected]>

* Pretend the Planck EZ supports ortho_4x12 layout

The hardware doesn't, but doing so prevents CI errors because the default keymap uses LAYOUT_planck_grid.

Going to pretend LAYOUT_ortho_4x12 is a valid layout for the Planck EZ.

* Update Planck EZ's URL in info.json

Co-Authored-By: Drashna Jaelre <[email protected]>
2019-06-19 10:56:20 -07:00
Jimmy Multani a825bbf5ea [Keyboard] Fix incorrect RGBLED_NUM value (#6148)
KBD67 Rev 2 has 20 LEDs, not 18. This was causing 2 of the underglow LEDs to remain off. This fix updates that.
2019-06-18 22:54:55 -07:00
jotix 4a43a947bd [Keymap] Update Jotix keymap (#6154)
* jotix ortho_4x12_layout

* jotix ortho_4x12_layout

* add KC_CAPS to raise
2019-06-18 22:47:54 -07:00
Ismael Venegas Castelló 628e08c606 [Keymap] Add new mod tap dances to Hacker Dvorak (#6155) 2019-06-18 22:43:06 -07:00
joelprokoandnoroadsleft 2d15961855 [Keyboard] added custom keyboard (#6141)
* added keyboard_layout_jopr

* making it compile

* #pragma once instead of #ifndef and #define

* renamed and added keymap

renamed old "default" to "modded_white", added new "default" that resembles an ISO 105-key layout

* reordered keyboards/jopr/info.json to match order o layout array

* implemented most suggestions

* fixed missing ;

* fixed bootloader setting for rules.mk

* adopted standard layout matrix naming convention

* "fixed" commented-out code in keymaps

* changes to keymap layers and LEDs

Turns out adding a layer for ROYA-modified keycodes is more trouble than it's worth and works better by just defining a ROYA key.
Also, LEDs were set up incorrectly.
Lastly, implemented SysReq-Warning LED.

* moved forced NumLock code

just in case either it or the CapsLock & ScrlLock update code wouldn't both work otherwise

* rearranged media keycodes

* replaced Shifted keycodes with basic ones

* Apply suggestions from code review

Co-Authored-By: noroadsleft <[email protected]>

* implemented suggestions by noroadsleft

* Apply suggestions from code review

Make ISO-Enter QMK Configurator-friendly

Co-Authored-By: noroadsleft <[email protected]>

* Update readme.md

* Update keyboards/jopr/info.json

Co-Authored-By: noroadsleft <[email protected]>

* moved keyboard to handwired folder

It was said that personal passion projects belong in there, even if they're not actually handwired

* Update readme.md
2019-06-18 11:34:36 -07:00
George Petriandnoroadsleft d5f0327b97 [Keymap] Add keymap for keebio/nyquist (#6144)
* duplicate default

* delete colemak, dvorak

* cleanup

* update keymap

* disable unused rules, fix spit leds

* ascii layout keymap

* wip change rgb on layer

* change rgb on layer

* change rgb on caps lock

* add impl navigation layer

* add readme, swap gui and alt

* update readme

* Update keyboards/keebio/nyquist/keymaps/georgepetri/readme.md

Co-Authored-By: noroadsleft <[email protected]>

* Update keyboards/keebio/nyquist/keymaps/georgepetri/readme.md

Co-Authored-By: noroadsleft <[email protected]>

* remove backslashes, use IS_HOST_LED_ON
2019-06-18 11:01:51 -07:00
M-AS 70285f5ed9 [Keymap] Update to personal keymaps (#6142)
* added personal CTRL keymap

* added personal dz60rgb keymap

* enabled new rgb effect

* added space cadet shift

* media player track buttons now orange

* updated keymaps with rgb setting and visual HSV setting preview

* fixed source stuff?

* added support for underglow toggle (bugged to all hell)

* everything now behaves as expected when ti comes to RGB toggles, thank god

* removed ifdefs

* changed color of MAS_CRM

* uh, whitespace

* changed rgb positions and modifiers within RGB matrix thing for CTRL and DZ60RGB

* updated keymap to work kindof

* KEYMAP: changed list of rgb effects

* changed CTRL rgb defaults

* KEYMAP: new LED layout for ctrl

* fixed white LED position in indicator

* changed capslock tap timing
2019-06-17 23:37:51 -07:00
Benjamin 875ae08692 [Keymap] ortho_4x12: bredfield (#6137)
* [Layout] 4x12: bredfield

* ortho_4x12:bredfield code review tweaks
2019-06-17 19:50:31 -07:00
Scott Sheffield 7f65844f75 [Keymap] 40percent/gherkin Midi Layout (#6130)
* Add midi layout for 40percent/gherkin

* Add readme for 40percent/gherkin:midi
2019-06-17 19:40:38 -07:00
fauxpark 6bdcbfb25a Fix backlight breathing on C6 (#6102)
* Fix backlight breathing on C6

* Account for ATmega32A's single TIMSK register (MT40)

* Document hardware PWM on D4 for ATmega32A

* Add C6 and D4 to BACKLIGHT_PIN description
2019-06-17 19:37:17 -07:00
Sid Carter c6850bad74 [Keymap] Layout for FC660C with additions for mouse keys and few other changes (#6139)
* new keymap for the hasu with media keys and mac layout

* switch escape and grave

* switch to the usual default

* with play and stop

* add reset on fn layer

* add mouse buttons, move reset, update copyright
2019-06-16 17:44:14 -07:00
SpacebarRacecar 83754c1146 [Keymap] Update to personal keymaps (#6136)
* changes to keymaps

* changes to userspace

* changes to userspace

* removed reference to fc660c keymap which no longer exists from userspace readme

* removed preonic keymap
2019-06-16 17:35:20 -07:00
Jonathan Rascher 53a81fc2f6 [Keymap] Minor userspace and Quefrency keymap fixes (#6134)
* Fix typo for RGBLIGHT config values

It doesn't make a difference right now since these are the defaults in
rgblight.h (which I'm just setting explicitly since some of the keyboard
configs change these defaults). However, I'd rather be explicit, so
fixing my typo. :)

* Remove mouse keys layer from Quefrency keymap

It's a fun idea, but I never use it in practice.
2019-06-16 00:35:46 -07:00
Rob Hilgefort fff526cb00 [Keymap] Fix firmware errors when flashing Rev6 Planck (#6135) 2019-06-16 00:34:10 -07:00
Yusuke Nakamura 5f69ca47ff Install avrdude in Arch/Manjaro Linux (#6132)
avrdude is require package but not installed by script when
arch linux.
2019-06-15 11:32:06 -07:00
jotix d34b71f008 [Keymap] jotix ortho_4x12_layout rethink (#6126)
* jotix ortho_4x12_layout rethink

* refactor

* readme update
2019-06-14 11:10:56 -07:00
roggan87 1cd26607bd [Keyboard] Made it possible for real to choose register on io expander for cols and rows (#6124)
* Replace deprecated EXPANDER_MASK with dynamic expander_pin_input_mask

* Made it possible to switch rows and cols registers on expander
2019-06-13 11:47:31 -07:00
Nicholas Ryan 03ce37052f [Keymap] add new planck keymap (#6122)
* add new planck keymap

* add newlines to end of files
2019-06-13 11:45:48 -07:00
kakunpcandDrashna Jaelre 61b884d865 [Keymap] add keymap hecomi alpha (#6115)
* add keymap hecomi alpha

* Update keyboards/hecomi/keymaps/kakunpc/keymap.c

Co-Authored-By: Drashna Jaelre <[email protected]>
2019-06-13 11:44:44 -07:00
noroadsleft f4840139a2 [Keyboard] Planck: Layout Macro Refactor (#4402)
* Planck: layout macro refactor

Unified layout macro names across AVR and ARM boards.

Currently certain layout macros are specific to either AVR or ARM when used in the QMK Configurator. If an AVR-specific macro is used for a Planck rev. 6, or an ARM-specific macro on a rev. 5 or earlier, the user receives a compile error.

* Update keyboards/planck/planck.h per @drashna

Changed KC_LAYOUT_ortho_4x12 alias to LAYOUT_kc_ortho_4x12.

Co-Authored-By: noroadsleft <[email protected]>

* Add KC_KEYMAP alias for LAYOUT_kc macro

per @drashna
Update keyboards/planck/planck.h

Co-Authored-By: noroadsleft <[email protected]>

* Fix LAYOUT_planck_1x2uC macro for Planck rev6

Thanks to drashna for testing.

* Fix inline comment regarding revisions

* Add specific info.json file for Planck rev6
2019-06-12 09:53:15 -07:00
mgalisa 29824f3cf7 [Keymap] New planck keymap (#6093)
* New keymap

* Add readme; fix lack of asterisk on raise

* Update default planck map to tap_code vs reg/unreg

* Press F to pay respects
2019-06-11 16:02:33 -07:00
brickbots 5343eaf89a [Keymap] Adding personal keymap / clarifying default keymap readme (#6119)
* Adding led support for Plaid

* Adding led support for Plaid

* Update readme.md

Fixing bad markdown

* Adding my personal keymap

* Clarifying LED instructions / formatting
2019-06-11 15:56:06 -07:00
Michael F. Lamb e6a81133dd Add SH1106 OLED support (#5787)
* modify oled_driver to support SH1106

also:
- improve mechanism to specify which OLED IC we use
- comment calc_bounds()
- give OLED_COLUMN_OFFSET a default value
- inline comment re: OLED MEMORY_MODE and SH1106
- update docs/feature_oled_driver.h for SH1106 support and related changes
- docs: OLED: note we have tested SSD1306 on ARM boards (per @XScorpion2)
- define out MEMORY_MODE when using SH1106 OLED driver

* document that SSD1306 128x64 on AVR works

Per @XScorpion2: https://github.com/qmk/qmk_firmware/pull/5787#discussion_r291837842
2019-06-11 15:27:17 -07:00
Volodymyr Lukashevych b92387b749 [Keymap] Add BB8520 trackpad support for CrKbd (#5925)
* Add vlukash CrKbd keymap to support trackpad adapter.

The trackpad adapter uses Elite-C board that has five extra pins.
Also SPI pins are taken for trackpad, keymap config updates column data
pins for matrix scan.

* Update vlukash keymap

* Enable pointing devide, configure mouse BTN1

* Set TAPPING_TERM to 300

* Add support for the BlackBerry 8520 trackpad

* Add vlukash keymap for master-right no-trackpad version

* Remap backspace

* Set EXTRAKEY_ENABLE = yes

* Update thumb keys mappings

* Set bootloader to atmel-dfu

* Sync keymap

* Add scrolling support

* Make debug LEDS conditional

* Add support for both flex and no-flex PCBs

* Add readme and rename root folders

* Update readme file with blog link

* Fix readme file formatting

* Remove ADJUST keycode, code cleanup.

* Add Win key to the keymap.
2019-06-11 15:18:14 -07:00
pngu 2558466d78 [Keyboard] Added idb 60 keyboard (#5994)
* Added idb 60 keyboard

* fixed info.json

* implemented revievers' suggested changes

* fixed an error

* implemented revievers' suggestions

* further cleanup

* implemented suggested changes

* fixed errors
2019-06-11 14:58:29 -07:00
Yan-Fa Li 332fc7e814 [Keymap] Tsangan bottom plain60 configuration (#6100)
* Personal keymap for plain60

* Update keymap for incorrect keys

 - update docs

* Placate the gods of Case Insensitivity
2019-06-11 14:49:50 -07:00
Drashna Jaelre 1d11c62df6 Jotix minor layout changes - readme.md fix (#6120)
* jotix layout add KC_GESC

* fix error in readme.md
2019-06-11 14:43:50 -07:00
Chris Scheib bba5c09b23 [Docs] Update feature_rgb_matrix.md (#6117)
* Update feature_rgb_matrix.md

fix indentation on code comments

* Update feature_rgb_matrix.md

more formatting changes, missed these the first time
2019-06-11 14:42:53 -07:00
105c90bd1c [Keyboard] Siemens Tastatur Converter (#6090)
* initial commit

* Siemens Tastatur

* Update keyboards/handwired/siemens_tastatur/keymaps/default/keymap.c

Co-Authored-By: fauxpark <[email protected]>

* beauty fixes

* More tidying up

* Update keyboards/converter/siemens_tastatur/keymaps/default/keymap.c

Co-Authored-By: Drashna Jaelre <[email protected]>
2019-06-11 09:14:54 -07:00
Calvin Moody f664ed9254 [Keymap] add keymap with split spacebar, ansi, hhkb features (#6114)
* add calbatr0ss dz60 layout

* add media controls

* add media next/prev controls

* add base layer for windows and macos

* swap right ctrl and menu

* missing bracket

* update gitignore
2019-06-11 09:11:47 -07:00
brickbots 8c22d641ee [Keyboard] Adding LED support to the plaid default keycap (#6109)
* Adding led support for Plaid

* Adding led support for Plaid
2019-06-11 09:01:59 -07:00
Yan-Fa Li d0c29f25c9 [Keyboard] Fix the layer state messages for actual values (#6116)
- display adjust when the bits are set correctly
2019-06-11 02:45:00 -07:00
shela c3c61dc76e fix indent size 2019-06-11 01:51:40 -07:00
Christopher Jenkins 8ac9048803 [Keyboard] niu_mini uses dfu bootloader rather than the afrdude bootloader (#6092)
* niu_mini uses dfu bootloader rather than the afrdude bootloader
	modified: readme.md

* Change rules in rules.mk to reflect the bootloader change
	modified:   keyboards/niu_mini/rules.mk
2019-06-08 20:39:23 -07:00
jotix a03ece6aff fix error in readme.md 2019-06-08 00:31:07 -03:00
XScorpion2 09968ba035 Fixing OLED Driver for 128x64 displays (#6085) 2019-06-07 17:02:05 -07:00
Jonathan Rascher 54ac80d4a5 Add 60_ansi_split_bs_rshift layout to DZ60, with a new keymap for the same (#6096)
* Add 60_ansi_split_bs_rshift layout to DZ60

I know there's already a lot of DZ60 layout macros, and #4668 suggests
they should be refactored at some point, but since this is one of the
standard layouts already in QMK that this PCB supports, I figured it was
okay to add so that DZ60 keyboards can share this layout with other
keyboards.

* New 60% ANSI split backspace/right-shift layout

I'm using this on a DZ60, but it should work fine on most 60% PCBs. It's
basically a HHKB layout with a standard ANSI bottom row (3x 1.25U mods,
6.25U spacebar, 4x 1.25U mods).
2019-06-07 17:01:13 -07:00
jotix f6e2716dfb jotix layout add KC_GESC 2019-06-07 18:14:03 -03:00
MechMerlin 2cb32328b6 [Keyboard] New Keyboard(s): Red Scarf II+ RS68 and RS78 (#6084)
* martenwuut's original code commit

* delete random directory that is the same as the parent directory

* get this compiling

* update readmes

* add manufacturer

* fix up the keymap error and replace KC_A with KC_1

* add verc support which is basically just at trimmed down verb

* update keymap readme to specify which redscarf it is

* add parent level readme

* fix grammar

* fix up readmes and put in alternative name for PCBs

* add configurator support for the ver.c pcb

* add configurator support for Ver.B (RS78) pcb

* add iso support for Ver.C (RS68)

* change DEBOUNCING_DELAY to just DEBOUNCE

* remove K2C to fit the default layouts

* fix keymap

* fixup configurator layout with split backspace
2019-06-07 13:42:40 -07:00
jotix 2a71bc9fde [Keymap] jotix ortho_4x12 layout change (#6088) 2019-06-07 13:22:30 -07:00
Domantas Petrauskas e86298fbe2 [Keymap] Update jj40:cockpit keymap (#6089)
* Add JJ40 Cockpit keymap

* Fix lower layer symbols

* Improve documentation JJ40 Cockpit

* Add screen backlight controls jj40:cockpit

* Update docs jj40:cockpit
2019-06-07 13:21:24 -07:00
Jonathan Rascher c70016eee5 [Keymap] Set a short TAP_CODE_DELAY so media keys work (#6097)
A delay of 10ms seems sufficient. Otherwise, media keys tapped from the
encoder of my BDN9 macropad only seem to get picked up by the OS
(Windows 10) some of the time.
2019-06-07 12:58:23 -07:00
Pavlos Vinieratos e495574670 use mods (#6095) 2019-06-07 06:44:46 -07:00
Drashna Jaelre 44f4338688 Fix debounce conflicts in a few boards 2019-06-06 20:03:33 -07:00
Viktor Eikman 983613c88d [Keyboard] Added DMOTE (#6087)
* Added DMOTE as a variant of the Dactyl-ManuForm, with slight changes to
  prior code organization to reflect differences.
2019-06-06 13:15:19 -07:00
TerryMathews 29c7fa6efc [Keyboard] Candybar: updated rules.mk (#6083)
* Candybar: updated rules.mk

Disabled console and command to get compiled size under flash space limitations.

* Candybar: Enable LINK_TIME_OPTIMIZATION_ENABLE
2019-06-06 13:08:27 -07:00
Stick de29da973a [Keymap] update @nstickney's keymaps (#6076)
* [Keymap] iris@nstickney: improve RGB init

Perfecting the rgb backlight initialization with a delay for each
color; also start and stop the animation at the "default layer"
color.

* [Keymap] iris,ergodox@nstickney fix FN on SYMB

The function key was not operational on the SYMB and SYSH layers due
to other keycodes being mapped over MO() on those layers. The
offending keycodes have been moved to other keys.

* [Keymap] add @nstickney's userspace

Pulled common code out to a userspace directory for my iris and
ergodox keymaps.

* [Keymap] iris@nstickney add image to README

Added an image from keyboard-layout-editor.com to meet the README
standard.

* iris@nstickney hue values now `uint8_t` (#6050)
2019-06-06 13:00:52 -07:00
omkbd 872480dde2 [Keyboard] add runner3680 keyboards (#6069)
* add runner3680

* Remove unnecessary code
2019-06-06 12:50:00 -07:00
Drashna Jaelreandnoroadsleft 06975aa0dd Remove all Copyrighted Sounds and Songs (#5905)
* Remove all Copyrighted Sounds and Songs

This removes any song that has a license/copyright on them.
Additionally, it adds the license information for any song that remains.

* Add removed song list

Can be reverted if we'd rather do that

* Use newer coding conventions

* Fix typo

Co-Authored-By: noroadsleft <[email protected]>

* Revert copyright date

* Update quantum/audio/song_list.h

Co-Authored-By: noroadsleft <[email protected]>
2019-06-06 12:23:46 -07:00
Drashna Jaelre faaaa134fd Replace DEBOUNCING_DELAY (deprecated) with DEBOUNCE (#5997) 2019-06-06 12:09:56 -07:00
Jack Humbert fe6b8edd58 use twitter card large setting for larger previews 2019-06-06 01:23:18 -04:00
Jack Humbert 834a8d1da1 add type:object to docs meta info (github uses it) 2019-06-06 01:07:54 -04:00
Jack Humbert 91b0c75045 Add meta tags for docs 2019-06-06 01:01:24 -04:00
Danny Nguyen 4f2f2271cd Change from avr-gcc@7 to @8 for Mac 2019-06-05 17:51:39 -07:00
XScorpion2 de968eb310 [Keymap] Xulkal changes (#6075) 2019-06-05 16:14:35 -07:00
Alex Mayer b2f7915994 [Docs] Make Code Examples Consistent On Combo Page (#6078) 2019-06-05 11:18:20 -07:00
noroadsleft a63e2abc9c [Keyboard] Fix Configurator support for Mulletpad (#6074)
- correct layout macro name
- correct JSON object ordering
2019-06-04 20:29:05 -07:00
ymzcdg e0a0d80bd3 docs to Mandarin Chinese (#5960)
* faq_general.md to Chinese

faq_general.md to Chinese
faq finished

* custom_quantum_functions.md to Chinese

custom_quantum_functions.md to Chinese

* custom_quantum_functions.md fix 

custom_quantum_functions.md fix

* custom_quantum_functions.md fix translate 

custom_quantum_functions.md fix translate

* !ver.English! _summary.md bug fix

 _summary.md bug fix of English doc. add".md" behind "feature_combo"

* !ver.English! custom_quantum_functions.md fix#5869

custom_quantum_functions.md in English : delete redundant "is" . issue#5869

* !ver.English! how_keyboards_work.md link fix

change 
https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_code_input
to 
https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_input
"#Hexadecimal_code_input" not exist

* !English! how_keyboards_work.md add missing "t"

Tied to a specific OS a a time (need recompilation when changing OS);
change to
Tied to a specific OS at a time (need recompilation when changing OS);

* _summary.md improve translation

_summary.md improve translation

* reference_glossary.md into Chinese

reference_glossary.md into Chinese
术语表翻译,这个术语表英文版似乎不太全,应该补充英文版,并在中文版添加其他具有中国特色的术语。
2019-06-04 11:06:17 -07:00
XScorpion2 e7711b3b66 Moving rgb typedefs into a single location (#5978)
Because someone named the define poorly

Using full relative path as handwired/promethium has a color.h file
2019-06-04 11:04:30 -07:00
Jack Humbertandnoroadsleft 661a9154ae Add missing links to features page and sidebar section (#5949)
* Add missing links to features page and sidebar section

* Fix links

Co-Authored-By: noroadsleft <[email protected]>

* Additional link fixes

Co-Authored-By: noroadsleft <[email protected]>

* Fix typo
2019-06-04 02:26:44 -04:00
DannyandDrashna Jaelre 0dc0be7302 [Keyboard] Add Levinson Rev 3 (#6064)
* Add Levinson Rev 3

* Update keyboards/keebio/levinson/rev3/config.h

Co-Authored-By: Drashna Jaelre <[email protected]>

* Update keyboards/keebio/levinson/rev3/config.h

Co-Authored-By: Drashna Jaelre <[email protected]>
2019-06-03 23:26:34 -07:00
zvecr 91849853ba upgrade gcc-arm-none-eabi from the default 5.4.1 to 6.3.1 due to ARM runtime issues 2019-06-03 17:14:34 -07:00
Danny a8958c5e53 [Keyboard] Updates to iris (#6063)
* Swap LSFT/LCTL in default Iris keymaps

* Migrate to new DEBOUNCE setting
2019-06-03 12:15:18 -07:00
Chris Dosé 7ddf3c28f4 Fixes compile errors for massdrop keyboards 2019-06-03 12:11:03 -07:00
Erovia a678f4a206 [Keyboard] Dimple: fix unintended LED behaviour (#6046)
* Dimple: fix unintended LED behaviour

The LED was always-on if the custom keymap did not call dimple_led_off()
at least once.

* Dimple: LED code fixup
2019-06-03 12:09:46 -07:00
Peter Tillemans 32952d8624 Pti keymaps (#6025)
* created new folder to port my old layout

* removed Colemak, enabled backlight.

* fixed backlight support

* added Ctrl/Esc + Shift/Enter double function keys

* made planck compatible with Atreus board, including docs

* enable backlight control

* make planck more compatible with atreus layout

* migrate to qwerty and separate alt-space

* adding ok64 and redox layouts

* fix dot in numerical pad

* fix dot in dvorak layout

* added redox and pro micro version of snampad

* add arrows on right mod keys and map PrtScr on Fn P

* add keys to swap between mac and windows

* added escape to redox layout

* added printscreen key

* moved layout closer to what I am used to.

* swap spc and bspc, add ctrl to quot

* qwertified atreus layout

* fix for compile errors when RGB or BACKLIGHT disabled

* add customized keymap for the m65a

* Reverted unintended change in default keymap.

* Remove unused code in my keymap and modernized tap hold keys

* Update keyboards/snampad/config.h

Co-Authored-By: noroadsleft <[email protected]>

* Update keyboards/snampad/rules.mk

Co-Authored-By: noroadsleft <[email protected]>

* Update keyboards/snampad/rules.mk

Co-Authored-By: noroadsleft <[email protected]>

* Update keyboards/snampad/snampad.h

Co-Authored-By: noroadsleft <[email protected]>

* Update keyboards/snampad/config.h

Co-Authored-By: noroadsleft <[email protected]>

* Update keyboards/snampad/keymaps/default/config.h

Co-Authored-By: noroadsleft <[email protected]>

* Update keyboards/snampad/snampad.h

Co-Authored-By: Drashna Jaelre <[email protected]>

* Update keyboards/snampad/readme.md

Co-Authored-By: noroadsleft <[email protected]>

* Update keyboards/snampad/keymaps/default/keymap.c

Co-Authored-By: noroadsleft <[email protected]>

* Update keyboards/snampad/snampad.h

Co-Authored-By: Drashna Jaelre <[email protected]>

* Update keyboards/snampad/snampad.h

Co-Authored-By: Drashna Jaelre <[email protected]>

* Update keyboards/snampad/snampad.h

Co-Authored-By: Drashna Jaelre <[email protected]>

* Update keyboards/snampad/rules.mk

Co-Authored-By: Drashna Jaelre <[email protected]>

* Update keyboards/planck/keymaps/ptillemans/keymap.c

Co-Authored-By: Drashna Jaelre <[email protected]>

* Update keyboards/jc65/v32a/keymaps/ptillemans/keymap.c

Co-Authored-By: Drashna Jaelre <[email protected]>

* Update keyboards/snampad/snampad.h

Co-Authored-By: Drashna Jaelre <[email protected]>

* cleanup snampad layout

* Update keyboards/snampad/snampad.c

Co-Authored-By: noroadsleft <[email protected]>

* further mmended cleaning

- removed obsolete Backspace handling in jc65 keymap
- improved shift detection
- modernized planck keymap
- added details to snampad readme
- other recommended refactors in snampad
2019-06-03 12:09:01 -07:00
Boy_314 28539fd67f [Keymap] Create Boy_314's Canoe layout, small update on xd75 layout (#6060)
* create canoe layout, update caps lock on xd75 layout

* added readme

* fixed copyright comments
2019-06-03 12:01:49 -07:00
1a9173cafc [Keyboard] Added WT65-B, WT75-B, minor fixes (#5991)
* Added WT65-B, WT75-B, minor fixes

* Update keyboards/wilba_tech/wt65_b/config.h

Co-Authored-By: Drashna Jaelre <[email protected]>

* Update keyboards/wilba_tech/wt65_b/readme.md

Co-Authored-By: fauxpark <[email protected]>

* Update keyboards/wilba_tech/wt75_b/config.h

Co-Authored-By: Drashna Jaelre <[email protected]>

* Change DEBOUNCING_DELAY to DEBOUNCE

* Change DEBOUNCING_DELAY to DEBOUNCE
2019-06-03 00:46:00 -07:00
Danny Nguyen 4a8e62d30e Have hexwire Iris keymap use I2C 2019-06-02 21:23:35 -07:00
Danny Nguyen 2c8149aa55 Fix compilation error when I2C and encoder is enabled for split code 2019-06-02 21:23:35 -07:00
holtenc 5971b663cb Enable extrakey in rules (#6055)
* correct indicator light states.

function of indicator lights was inverted. these changes correct that.

* flesh out keymaps pre production

* Enable extrakey in rules
2019-06-02 14:19:31 -07:00
gorbachev 6766c5315e [Keyboard] 8 pack (#6031)
* 8-Pack Macropad

* Added MANUFACTUTER to config.h

* Fix the mirrored keymaps by creating rev1.1 and rev1.2 layouts, then using them in the keymaps

* fixes from code review comments

* Use revisions to manage the different layouts for rev1.1 and rev1.2

* Add DEFAULT_FOLDER to fix default build failures

* code review comments fixes

* code review comments fixes
2019-06-01 22:43:00 -07:00
Danny 0744af97af [Keyboard] Update Iris Rev 3 QMK-DFU settings (#6050)
* Set the correct pinout for Iris Rev 3 QMK-DFU

* Set bootloader to QMK-DFU
2019-06-01 22:36:30 -07:00
3449000f42 [Keyboard] Add support for KBDPAD MKII (#6034)
* Build some testing keymaps

* Match naming convention to 8x

* Add configurator json

* Forgot to build the readme

* Apply suggestions from code review

Co-Authored-By: Elliot Powell <[email protected]>
Co-Authored-By: Drashna Jaelre <[email protected]>

* Update keyboards/kbdfans/kbdpad_mk2/rules.mk

Co-Authored-By: Drashna Jaelre <[email protected]>
2019-06-01 22:02:33 -07:00
Drashna Jaelre 36f427f40c Fix typo 2019-05-23 10:29:18 -07:00
Drashna Jaelreandnoroadsleft c97315dc5a Additional link fixes
Co-Authored-By: noroadsleft <[email protected]>
2019-05-22 21:00:20 -07:00
Drashna Jaelreandnoroadsleft dcb274b286 Fix links
Co-Authored-By: noroadsleft <[email protected]>
2019-05-22 20:55:52 -07:00
Drashna Jaelre 02787ac07f Add missing links to features page and sidebar section 2019-05-21 13:15:59 -07:00
865 changed files with 17979 additions and 2343 deletions

No files matched your search

+1 -1
View File
@@ -13,7 +13,7 @@ BinPackParameters: 'true'
ColumnLimit: '1000' ColumnLimit: '1000'
IndentCaseLabels: 'true' IndentCaseLabels: 'true'
IndentPPDirectives: AfterHash IndentPPDirectives: AfterHash
IndentWidth: '2' IndentWidth: '4'
MaxEmptyLinesToKeep: '1' MaxEmptyLinesToKeep: '1'
PointerAlignment: Right PointerAlignment: Right
SortIncludes: 'false' SortIncludes: 'false'
+4 -1
View File
@@ -9,7 +9,6 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
dfu-programmer \ dfu-programmer \
dfu-util \ dfu-util \
gcc \ gcc \
gcc-arm-none-eabi \
gcc-avr \ gcc-avr \
git \ git \
libnewlib-arm-none-eabi \ libnewlib-arm-none-eabi \
@@ -19,6 +18,10 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
zip \ zip \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# upgrade gcc-arm-none-eabi from the default 5.4.1 to 6.3.1 due to ARM runtime issues
RUN wget -q https://developer.arm.com/-/media/Files/downloads/gnu-rm/6-2017q2/gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2 -O - | \
tar xj --strip-components=1 -C /
VOLUME /qmk_firmware VOLUME /qmk_firmware
WORKDIR /qmk_firmware WORKDIR /qmk_firmware
COPY . . COPY . .
+5 -2
View File
@@ -52,18 +52,21 @@
* [Backlight](feature_backlight.md) * [Backlight](feature_backlight.md)
* [Bluetooth](feature_bluetooth.md) * [Bluetooth](feature_bluetooth.md)
* [Bootmagic](feature_bootmagic.md) * [Bootmagic](feature_bootmagic.md)
* [Combos](feature_combo) * [Combos](feature_combo.md)
* [Command](feature_command.md) * [Command](feature_command.md)
* [Debounce API](feature_debounce_type.md)
* [Dynamic Macros](feature_dynamic_macros.md) * [Dynamic Macros](feature_dynamic_macros.md)
* [Encoders](feature_encoders.md) * [Encoders](feature_encoders.md)
* [Grave Escape](feature_grave_esc.md) * [Grave Escape](feature_grave_esc.md)
* [Haptic Feedback](feature_haptic_feedback.md)
* [HD44780 LCD Controller](feature_hd44780.md)
* [Key Lock](feature_key_lock.md) * [Key Lock](feature_key_lock.md)
* [Layouts](feature_layouts.md) * [Layouts](feature_layouts.md)
* [Leader Key](feature_leader_key.md) * [Leader Key](feature_leader_key.md)
* [LED Matrix](feature_led_matrix.md) * [LED Matrix](feature_led_matrix.md)
* [Macros](feature_macros.md) * [Macros](feature_macros.md)
* [Mouse Keys](feature_mouse_keys.md) * [Mouse Keys](feature_mouse_keys.md)
* [OLED Driver](feature_oled_driver) * [OLED Driver](feature_oled_driver.md)
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) * [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys)
* [Pointing Device](feature_pointing_device.md) * [Pointing Device](feature_pointing_device.md)
* [PS/2 Mouse](feature_ps2_mouse.md) * [PS/2 Mouse](feature_ps2_mouse.md)
+4 -4
View File
@@ -76,14 +76,14 @@ This is a C header file that is one of the first things included, and will persi
* `#define B7_AUDIO` * `#define B7_AUDIO`
* enables audio on pin B7 (duophony is enables if one of B[5-7]\_AUDIO is enabled along with one of C[4-6]\_AUDIO) * enables audio on pin B7 (duophony is enables if one of B[5-7]\_AUDIO is enabled along with one of C[4-6]\_AUDIO)
* `#define BACKLIGHT_PIN B7` * `#define BACKLIGHT_PIN B7`
* pin of the backlight - B5, B6, B7 use PWM, others use softPWM * pin of the backlight - `B5`, `B6`, `B7` and `C6` (and `D4` on ATmega32A) use hardware PWM, others use software implementation
* `#define BACKLIGHT_LEVELS 3` * `#define BACKLIGHT_LEVELS 3`
* number of levels your backlight will have (maximum 15 excluding off) * number of levels your backlight will have (maximum 15 excluding off)
* `#define BACKLIGHT_BREATHING` * `#define BACKLIGHT_BREATHING`
* enables backlight breathing (only works with backlight pins B5, B6 and B7) * enables backlight breathing (only works with backlight pins B5, B6 and B7)
* `#define BREATHING_PERIOD 6` * `#define BREATHING_PERIOD 6`
* the length of one backlight "breath" in seconds * the length of one backlight "breath" in seconds
* `#define DEBOUNCING_DELAY 5` * `#define DEBOUNCE 5`
* the delay when reading the value of the pin (5 is default) * the delay when reading the value of the pin (5 is default)
* `#define LOCKING_SUPPORT_ENABLE` * `#define LOCKING_SUPPORT_ENABLE`
* mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap * mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
@@ -93,8 +93,8 @@ This is a C header file that is one of the first things included, and will persi
* key combination that allows the use of magic commands (useful for debugging) * key combination that allows the use of magic commands (useful for debugging)
* `#define USB_MAX_POWER_CONSUMPTION` * `#define USB_MAX_POWER_CONSUMPTION`
* sets the maximum power (in mA) over USB for the device (default: 500) * sets the maximum power (in mA) over USB for the device (default: 500)
* `#define SCL_CLOCK 100000L` * `#define F_SCL 100000L`
* sets the SCL_CLOCK speed for split keyboards. The default is `100000L` but some boards can be set to `400000L`. * sets the I2C clock rate speed for keyboards using I2C. The default is `400000L`, except for keyboards using `split_common`, where the default is `100000L`.
## Features That Can Be Disabled ## Features That Can Be Disabled
+1 -1
View File
@@ -267,7 +267,7 @@ You should use this function if you need custom matrix scanning code. It can als
If the board supports it, it can be "idled", by stopping a number of functions. A good example of this is RGB lights or backlights. This can save on power consumption, or may be better behavior for your keyboard. If the board supports it, it can be "idled", by stopping a number of functions. A good example of this is RGB lights or backlights. This can save on power consumption, or may be better behavior for your keyboard.
This is controlled by two functions: `suspend_power_down_*` and `suspend_wakeup_init_*`, which are called when the system is board is idled and when it wakes up, respectively. This is controlled by two functions: `suspend_power_down_*` and `suspend_wakeup_init_*`, which are called when the system board is idled and when it wakes up, respectively.
### Example suspend_power_down_user() and suspend_wakeup_init_user() Implementation ### Example suspend_power_down_user() and suspend_wakeup_init_user() Implementation
+2 -2
View File
@@ -140,8 +140,8 @@ For now, you need to rollback avr-gcc to 7 in brew.
``` ```
brew uninstall --force avr-gcc brew uninstall --force avr-gcc
brew install avr-gcc@7 brew install avr-gcc@8
brew link --force avr-gcc@7 brew link --force avr-gcc@8
``` ```
### I just flashed my keyboard and it does nothing/keypresses don't register - it's also ARM (rev6 planck, clueboard 60, hs60v2, etc...) (Feb 2019) ### I just flashed my keyboard and it does nothing/keypresses don't register - it's also ARM (rev6 planck, clueboard 60, hs60v2, etc...) (Feb 2019)
+8 -7
View File
@@ -34,13 +34,14 @@ Hardware PWM is only supported on certain pins of the MCU, so if the backlightin
Hardware PWM is supported according to the following table: Hardware PWM is supported according to the following table:
| Backlight Pin | Hardware timer | | Backlight Pin | Hardware timer |
|---------------|----------------| |---------------|-------------------------|
|`B5` | Timer 1 | |`B5` | Timer 1 |
|`B6` | Timer 1 | |`B6` | Timer 1 |
|`B7` | Timer 1 | |`B7` | Timer 1 |
|`C6` | Timer 3 | |`C6` | Timer 3 |
| other | Software PWM | |`D4` | Timer 1 (ATmega32A only)|
| other | Software PWM |
The [audio feature](feature_audio.md) also uses hardware timers. Please refer to the following table to know what hardware timer the software PWM will use depending on the audio configuration: The [audio feature](feature_audio.md) also uses hardware timers. Please refer to the following table to know what hardware timer the software PWM will use depending on the audio configuration:
+1 -1
View File
@@ -140,7 +140,7 @@ To replace the function, all you need to do is add something like this to your c
```c ```c
void bootmagic_lite(void) { void bootmagic_lite(void) {
matrix_scan(); matrix_scan();
wait_ms(DEBOUNCING_DELAY * 2); wait_ms(DEBOUNCE * 2);
matrix_scan(); matrix_scan();
if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) { if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) {
+2 -1
View File
@@ -29,6 +29,7 @@ enum combos {
AB_ESC, AB_ESC,
JK_TAB JK_TAB
}; };
const uint16_t PROGMEM ab_combo[] = {KC_A, KC_B, COMBO_END}; const uint16_t PROGMEM ab_combo[] = {KC_A, KC_B, COMBO_END};
const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END}; const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END};
@@ -44,7 +45,7 @@ For a more complicated implementation, you can use the `process_combo_event` fun
enum combo_events { enum combo_events {
ZC_COPY, ZC_COPY,
XV_PASTE XV_PASTE
}; };
const uint16_t PROGMEM copy_combo[] = {KC_Z, KC_C, COMBO_END}; const uint16_t PROGMEM copy_combo[] = {KC_Z, KC_C, COMBO_END};
const uint16_t PROGMEM paste_combo[] = {KC_X, KC_V, COMBO_END}; const uint16_t PROGMEM paste_combo[] = {KC_X, KC_V, COMBO_END};
+31 -16
View File
@@ -2,7 +2,17 @@
## OLED Supported Hardware ## OLED Supported Hardware
128x32 OLED modules using SSD1306 driver IC over I2C. Supported on AVR based keyboards. Possible but untested hardware includes ARM based keyboards and other sized OLED modules using SSD1306 over I2C, such as 128x64. OLED modules using SSD1306 or SH1106 driver ICs, communicating over I2C.
Tested combinations:
| IC driver | Size | Keyboard Platform | Notes |
|-----------|--------|-------------------|--------------------------|
| SSD1306 | 128x32 | AVR | Primary support |
| SSD1306 | 128x64 | AVR | Verified working |
| SSD1306 | 128x32 | ARM | |
| SH1106 | 128x64 | AVR | No rotation or scrolling |
Hardware configurations using ARM-based microcontrollers or different sizes of OLED modules may be compatible, but are untested.
!> Warning: This OLED Driver currently uses the new i2c_master driver from split common code. If your split keyboard uses i2c to communication between sides this driver could cause an address conflict (serial is fine). Please contact your keyboard vendor and ask them to migrate to the latest split common code to fix this. !> Warning: This OLED Driver currently uses the new i2c_master driver from split common code. If your split keyboard uses i2c to communication between sides this driver could cause an address conflict (serial is fine). Please contact your keyboard vendor and ask them to migrate to the latest split common code to fix this.
@@ -86,17 +96,17 @@ void oled_task_user(void) {
## Basic Configuration ## Basic Configuration
|Define |Default |Description | | Define | Default | Description |
|-----------------------|---------------|------------------------------------------------| |------------------------|-------------------|----------------------------------------------------------------------------------------------------------------------------|
|`OLED_DISPLAY_ADDRESS` |`0x3C` |The i2c address of the OLED Display | | `OLED_DISPLAY_ADDRESS` | `0x3C` | The i2c address of the OLED Display |
|`OLED_FONT_H` |`"glcdfont.c"` |The font code file to use for custom fonts | | `OLED_FONT_H` | `"glcdfont.c"` | The font code file to use for custom fonts |
|`OLED_FONT_START` |`0` |The starting characer index for custom fonts | | `OLED_FONT_START` | `0` | The starting characer index for custom fonts |
|`OLED_FONT_END` |`224` |The ending characer index for custom fonts | | `OLED_FONT_END` | `224` | The ending characer index for custom fonts |
|`OLED_FONT_WIDTH` |`6` |The font width | | `OLED_FONT_WIDTH` | `6` | The font width |
|`OLED_FONT_HEIGHT` |`8` |The font height (untested) | | `OLED_FONT_HEIGHT` | `8` | The font height (untested) |
|`OLED_DISABLE_TIMEOUT` |*Not defined* |Disables the built in OLED timeout feature. Useful when implementing custom timeout rules.| | `OLED_DISABLE_TIMEOUT` | *Not defined* | Disables the built in OLED timeout feature. Useful when implementing custom timeout rules. |
| `OLED_IC` | `OLED_IC_SSD1306` | Set to `OLED_IC_SH1106` if you're using the SH1106 OLED controller. |
| `OLED_COLUMN_OFFSET` | `0` | (SH1106 only.) Shift output to the right this many pixels.<br />Useful for 128x64 displays centered on a 132x64 SH1106 IC. |
## 128x64 & Custom sized OLED Displays ## 128x64 & Custom sized OLED Displays
@@ -108,16 +118,19 @@ void oled_task_user(void) {
|`OLED_DISPLAY_CUSTOM` |*Not defined* |Changes the display defines for use with custom displays.<br />Requires user to implement the below defines. | |`OLED_DISPLAY_CUSTOM` |*Not defined* |Changes the display defines for use with custom displays.<br />Requires user to implement the below defines. |
|`OLED_DISPLAY_WIDTH` |`128` |The width of the OLED display. | |`OLED_DISPLAY_WIDTH` |`128` |The width of the OLED display. |
|`OLED_DISPLAY_HEIGHT` |`32` |The height of the OLED display. | |`OLED_DISPLAY_HEIGHT` |`32` |The height of the OLED display. |
|`OLED_MATRIX_SIZE` |`512` |The local buffer size to allocate.<br />`(OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH)`| |`OLED_MATRIX_SIZE` |`512` |The local buffer size to allocate.<br />`(OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH)`. |
|`OLED_BLOCK_TYPE` |`uint16_t` |The unsigned integer type to use for dirty rendering.| |`OLED_BLOCK_TYPE` |`uint16_t` |The unsigned integer type to use for dirty rendering. |
|`OLED_BLOCK_COUNT` |`16` |The number of blocks the display is divided into for dirty rendering.<br />`(sizeof(OLED_BLOCK_TYPE) * 8)`| |`OLED_BLOCK_COUNT` |`16` |The number of blocks the display is divided into for dirty rendering.<br />`(sizeof(OLED_BLOCK_TYPE) * 8)`. |
|`OLED_BLOCK_SIZE` |`32` |The size of each block for dirty rendering<br />`(OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)`| |`OLED_BLOCK_SIZE` |`32` |The size of each block for dirty rendering<br />`(OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)`. |
|`OLED_COM_PINS` |`COM_PINS_SEQ` |How the SSD1306 chip maps it's memory to display.<br />Options are `COM_PINS_SEQ`, `COM_PINS_ALT`, `COM_PINS_SEQ_LR`, & `COM_PINS_ALT_LR`. |
|`OLED_SOURCE_MAP` |`{ 0, ... N }` |Precalculated source array to use for mapping source buffer to target OLED memory in 90 degree rendering. | |`OLED_SOURCE_MAP` |`{ 0, ... N }` |Precalculated source array to use for mapping source buffer to target OLED memory in 90 degree rendering. |
|`OLED_TARGET_MAP` |`{ 24, ... N }`|Precalculated target array to use for mapping source buffer to target OLED memory in 90 degree rendering. | |`OLED_TARGET_MAP` |`{ 24, ... N }`|Precalculated target array to use for mapping source buffer to target OLED memory in 90 degree rendering. |
### 90 Degree Rotation - Technical Mumbo Jumbo ### 90 Degree Rotation - Technical Mumbo Jumbo
!> Rotation is unsupported on the SH1106.
```C ```C
// OLED Rotation enum values are flags // OLED Rotation enum values are flags
typedef enum { typedef enum {
@@ -249,6 +262,8 @@ uint8_t oled_max_chars(void);
uint8_t oled_max_lines(void); uint8_t oled_max_lines(void);
``` ```
!> Scrolling and rotation are unsupported on the SH1106.
## SSD1306.h driver conversion guide ## SSD1306.h driver conversion guide
|Old API |Recommended New API | |Old API |Recommended New API |
+10 -10
View File
@@ -42,11 +42,11 @@ Define these arrays listing all the LEDs in your `<keyboard>.c`:
```C ```C
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations /* Refer to IS31 manual for these locations
* driver * driver
* | R location * | R location
* | | G location * | | G location
* | | | B location * | | | B location
* | | | | */ * | | | | */
{0, C1_3, C2_3, C3_3}, {0, C1_3, C2_3, C3_3},
.... ....
} }
@@ -93,11 +93,11 @@ Define these arrays listing all the LEDs in your `<keyboard>.c`:
```C ```C
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations /* Refer to IS31 manual for these locations
* driver * driver
* | R location * | R location
* | | G location * | | G location
* | | | B location * | | | B location
* | | | | */ * | | | | */
{0, B_1, A_1, C_1}, {0, B_1, A_1, C_1},
.... ....
} }
+6 -1
View File
@@ -7,12 +7,15 @@ QMK has a staggering number of features for building your keyboard. It can take
* [Audio](feature_audio.md) - Connect a speaker to your keyboard for audio feedback, midi support, and music mode. * [Audio](feature_audio.md) - Connect a speaker to your keyboard for audio feedback, midi support, and music mode.
* [Auto Shift](feature_auto_shift.md) - Tap for the normal key, hold slightly longer for its shifted state. * [Auto Shift](feature_auto_shift.md) - Tap for the normal key, hold slightly longer for its shifted state.
* [Backlight](feature_backlight.md) - LED lighting support for your keyboard. * [Backlight](feature_backlight.md) - LED lighting support for your keyboard.
* [Bluetooth](feature_bluetooth.md) - BlueTooth support for your keyboard.
* [Bootmagic](feature_bootmagic.md) - Adjust the behavior of your keyboard using hotkeys. * [Bootmagic](feature_bootmagic.md) - Adjust the behavior of your keyboard using hotkeys.
* [Combos](feature_combo.md) - Custom actions for multiple key holds. * [Combos](feature_combo.md) - Custom actions for multiple key holds.
* [Command](feature_command.md) - Runtime version of bootmagic (Formerly known as "Magic"). * [Command](feature_command.md) - Runtime version of bootmagic (Formerly known as "Magic").
* [Debounce API](feature_debounce_type.md) - Customization of debouncing algorithms, and the ability to add more/custom debouncing.
* [Dynamic Macros](feature_dynamic_macros.md) - Record and playback macros from the keyboard itself. * [Dynamic Macros](feature_dynamic_macros.md) - Record and playback macros from the keyboard itself.
* [Encoders](feature_encoders.md) - Rotary encoders! * [Encoders](feature_encoders.md) - Rotary encoders!
* [Grave Escape](feature_grave_esc.md) - Lets you use a single key for Esc and Grave. * [Grave Escape](feature_grave_esc.md) - Lets you use a single key for Esc and Grave.
* [Haptic Feedback](feature_haptic_feedback.md) - Add haptic feedback drivers to your board.
* [HD44780 LCD Display](feature_hd44780.md) - Support for LCD character displays using the HD44780 standard. * [HD44780 LCD Display](feature_hd44780.md) - Support for LCD character displays using the HD44780 standard.
* [Key Lock](feature_key_lock.md) - Lock a key in the "down" state. * [Key Lock](feature_key_lock.md) - Lock a key in the "down" state.
* [Layouts](feature_layouts.md) - Use one keymap with any keyboard that supports your layout. * [Layouts](feature_layouts.md) - Use one keymap with any keyboard that supports your layout.
@@ -20,7 +23,8 @@ QMK has a staggering number of features for building your keyboard. It can take
* [LED Matrix](feature_led_matrix.md) - LED Matrix single color lights for per key lighting (Single Color, not RGB). * [LED Matrix](feature_led_matrix.md) - LED Matrix single color lights for per key lighting (Single Color, not RGB).
* [Macros](feature_macros.md) - Send multiple key presses when pressing only one physical key. * [Macros](feature_macros.md) - Send multiple key presses when pressing only one physical key.
* [Mouse keys](feature_mouse_keys.md) - Control your mouse pointer from your keyboard. * [Mouse keys](feature_mouse_keys.md) - Control your mouse pointer from your keyboard.
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) - Sticky Keys, lets hit a key rather than holding it. * [OLED Driver](feature_oled_driver.md) - Add OLED screens to your keyboard.
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) - Sticky Keys, lets you hit a key rather than holding it.
* [Pointing Device](feature_pointing_device.md) - Framework for connecting your custom pointing device to your keyboard. * [Pointing Device](feature_pointing_device.md) - Framework for connecting your custom pointing device to your keyboard.
* [PS2 Mouse](feature_ps2_mouse.md) - Driver for connecting a PS/2 mouse directly to your keyboard. * [PS2 Mouse](feature_ps2_mouse.md) - Driver for connecting a PS/2 mouse directly to your keyboard.
* [RGB Light](feature_rgblight.md) - RGB lighting for your keyboard. * [RGB Light](feature_rgblight.md) - RGB lighting for your keyboard.
@@ -33,3 +37,4 @@ QMK has a staggering number of features for building your keyboard. It can take
* [Thermal Printer](feature_thermal_printer.md) - Connect a thermal printer to your keyboard to be able to toggle on a printed log of everything you type. * [Thermal Printer](feature_thermal_printer.md) - Connect a thermal printer to your keyboard to be able to toggle on a printed log of everything you type.
* [Unicode](feature_unicode.md) - Unicode input support. * [Unicode](feature_unicode.md) - Unicode input support.
* [Userspace](feature_userspace.md) - Share code between different keymaps and keyboards. * [Userspace](feature_userspace.md) - Share code between different keymaps and keyboards.
* [Velocikey](feature_velocikey.md) - Allows changes in RGB animation speed based on WPM/Typing speed.
+3 -3
View File
@@ -62,14 +62,14 @@ If you're using [homebrew,](http://brew.sh/) you can use the following commands:
brew tap osx-cross/avr brew tap osx-cross/avr
brew tap PX4/homebrew-px4 brew tap PX4/homebrew-px4
brew update brew update
brew install avr-gcc@7 brew install avr-gcc@8
brew link --force avr-gcc@7 brew link --force avr-gcc@8
brew install dfu-programmer brew install dfu-programmer
brew install dfu-util brew install dfu-util
brew install gcc-arm-none-eabi brew install gcc-arm-none-eabi
brew install avrdude brew install avrdude
This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. Note that the `make` and `make install` portion during the homebrew installation of `avr-gcc@7` can take over 20 minutes and exhibit high CPU usage. This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. Note that the `make` and `make install` portion during the homebrew installation of `avr-gcc@8` can take over 20 minutes and exhibit high CPU usage.
## Windows with msys2 (recommended) ## Windows with msys2 (recommended)
+2 -2
View File
@@ -63,10 +63,10 @@ You may wonder why a keyboard layout containing all of Unicode is not devised th
## How to (Maybe) Enter Unicode Characters ## How to (Maybe) Enter Unicode Characters
You can have the firmware send *sequences of keys* to use the [software Unicode Input Method](https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_code_input) of the target operating system, thus effectively entering characters independently of the layout defined in the OS. You can have the firmware send *sequences of keys* to use the [software Unicode Input Method](https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_input) of the target operating system, thus effectively entering characters independently of the layout defined in the OS.
Yet, it does come with multiple disadvantages: Yet, it does come with multiple disadvantages:
- Tied to a specific OS a a time (need recompilation when changing OS); - Tied to a specific OS at a time (need recompilation when changing OS);
- Within a given OS, does not work in all software; - Within a given OS, does not work in all software;
- Limited to a subset of Unicode on some systems. - Limited to a subset of Unicode on some systems.
+7 -1
View File
@@ -5,7 +5,13 @@
<title>QMK Firmware</title> <title>QMK Firmware</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Description"> <meta name="description" content="Description">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta property="og:title" content="QMK Firmware Docs">
<meta property="og:type" content="website">
<meta property="og:description" content="The full documenation of the open-source firmware">
<meta property="og:image" content="https://i.imgur.com/svjvIrw.jpg">
<meta property="og:url" content="https://docs.qmk.fm">
<meta name="twitter:card" content="summary_large_image">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css" title="light"> <link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css" title="light">
<link rel="stylesheet" href="qmk.css" title="dark" disabled> <link rel="stylesheet" href="qmk.css" title="dark" disabled>
<link rel="stylesheet" href="sidebar.css" /> <link rel="stylesheet" href="sidebar.css" />
+33 -33
View File
@@ -7,27 +7,27 @@
* [学习资源](newbs_learn_more_resources.md) * [学习资源](newbs_learn_more_resources.md)
* [QMK基础](README.md) * [QMK基础](README.md)
* [QMK 简介](getting_started_introduction.md) * [QMK简介](getting_started_introduction.md)
* [贡献 QMK](contributing.md) * [向QMK贡献](contributing.md)
* [如何使用Github](getting_started_github.md) * [如何使用Github](getting_started_github.md)
* [获得帮助](getting_started_getting_help.md) * [获得帮助](getting_started_getting_help.md)
* [问题解答](faq.md) * [问题解答](faq.md)
* [一般问题](faq_general.md) * [一般问题](faq_general.md)
* [构建/编译QMK](faq_build.md) * [构建/编译](faq_build.md)
* [调试/故障排除 QMK](faq_debug.md) * [调试/故障排除](faq_debug.md)
* [键盘布局](faq_keymap.md) * [键盘映射](faq_keymap.md)
* 详细指南 * 详细指南
* [安装构建工具](getting_started_build_tools.md) * [安装构建工具](getting_started_build_tools.md)
* [流浪者指南](getting_started_vagrant.md) * [vagrant指南](getting_started_vagrant.md)
* [构建/编译指令](getting_started_make_guide.md) * [构建/编译指令](getting_started_make_guide.md)
* [刷新固件](flashing.md) * [刷新固件](flashing.md)
* [定制功能](custom_quantum_functions.md) * [定制功能](custom_quantum_functions.md)
* [布局概述](keymap.md) * [映射概述](keymap.md)
* [硬件](hardware.md) * [硬件](hardware.md)
* [AVR 处理器](hardware_avr.md) * [AVR处理器](hardware_avr.md)
* [驱动](hardware_drivers.md) * [驱动](hardware_drivers.md)
* 参考 * 参考
@@ -35,8 +35,8 @@
* [配置选项](config_options.md) * [配置选项](config_options.md)
* [键码](keycodes.md) * [键码](keycodes.md)
* [记录最佳实践](documentation_best_practices.md) * [记录最佳实践](documentation_best_practices.md)
* [文档指南](documentation_templates.md) * [文档模板](documentation_templates.md)
* [词汇表](reference_glossary.md) * [术语表](reference_glossary.md)
* [单元测试](unit_testing.md) * [单元测试](unit_testing.md)
* [有用的功能](ref_functions.md) * [有用的功能](ref_functions.md)
* [配置器支持](reference_configurator_support.md) * [配置器支持](reference_configurator_support.md)
@@ -44,35 +44,35 @@
* [特性](features.md) * [特性](features.md)
* [基本键码](keycodes_basic.md) * [基本键码](keycodes_basic.md)
* [US ANSI 控制键](keycodes_us_ansi_shifted.md) * [US ANSI控制码](keycodes_us_ansi_shifted.md)
* [量子键码](quantum_keycodes.md) * [量子键码](quantum_keycodes.md)
* [高级键码](feature_advanced_keycodes.md) * [高级键码](feature_advanced_keycodes.md)
* [音频](feature_audio.md) * [音频](feature_audio.md)
* [自动控制](feature_auto_shift.md) * [自动shift](feature_auto_shift.md)
* [背光](feature_backlight.md) * [背光](feature_backlight.md)
* [蓝牙](feature_bluetooth.md) * [蓝牙](feature_bluetooth.md)
* [Bootmagic](feature_bootmagic.md) * [热改键](feature_bootmagic.md)
* [组合](feature_combo) * [组合](feature_combo)
* [命令](feature_command.md) * [命令](feature_command.md)
* [动态宏指令](feature_dynamic_macros.md) * [动态宏指令](feature_dynamic_macros.md)
* [编码器](feature_encoders.md) * [编码器](feature_encoders.md)
* [Grave Escape](feature_grave_esc.md) * [重音号Esc复合键](feature_grave_esc.md)
* [键锁](feature_key_lock.md) * [自锁键](feature_key_lock.md)
* [层](feature_layouts.md) * [布局](feature_layouts.md)
* [引导键](feature_leader_key.md) * [前导键](feature_leader_key.md)
* [LED 阵列](feature_led_matrix.md) * [LED阵列](feature_led_matrix.md)
* [宏指令](feature_macros.md) * [宏指令](feature_macros.md)
* [鼠标键](feature_mouse_keys.md) * [鼠标键](feature_mouse_keys.md)
* [一键功能](feature_advanced_keycodes.md#one-shot-keys) * [一键功能](feature_advanced_keycodes.md#one-shot-keys)
* [指针设备](feature_pointing_device.md) * [指针设备](feature_pointing_device.md)
* [PS/2 鼠标](feature_ps2_mouse.md) * [PS/2鼠标](feature_ps2_mouse.md)
* [RGB 光](feature_rgblight.md) * [RGB灯光](feature_rgblight.md)
* [RGB 矩阵](feature_rgb_matrix.md) * [RGB矩阵](feature_rgb_matrix.md)
* [空格候补换挡](feature_space_cadet_shift.md) * [空格候补换挡](feature_space_cadet_shift.md)
* [空格候补换挡回车](feature_space_cadet_shift_enter.md) * [空格候补换挡回车](feature_space_cadet_shift_enter.md)
* [速录机](feature_stenography.md) * [速录机](feature_stenography.md)
* [换手](feature_swap_hands.md) * [换手](feature_swap_hands.md)
* [踢踏舞](feature_tap_dance.md) * [多击键](feature_tap_dance.md)
* [终端](feature_terminal.md) * [终端](feature_terminal.md)
* [热敏打印机](feature_thermal_printer.md) * [热敏打印机](feature_thermal_printer.md)
* [Unicode](feature_unicode.md) * [Unicode](feature_unicode.md)
@@ -80,16 +80,16 @@
* [速度键](feature_velocikey.md) * [速度键](feature_velocikey.md)
* 针对制造者和定制者 * 针对制造者和定制者
* [飞线指南](hand_wire.md) * [手工连线指南](hand_wire.md)
* [ISP 刷新指南](isp_flashing_guide.md) * [ISP刷新指南](isp_flashing_guide.md)
* [ARM 调试指南](arm_debugging.md) * [ARM调试指南](arm_debugging.md)
* [I2C 驱动](i2c_driver.md) * [I2C驱动](i2c_driver.md)
* [GPIO 控制器](internals_gpio_control.md) * [GPIO控制器](internals_gpio_control.md)
* [Proton C 转换](proton_c_conversion.md) * [Proton C转换](proton_c_conversion.md)
* 深入了解 * 深入了解
* [键盘如何工作](how_keyboards_work.md) * [键盘如何工作](how_keyboards_work.md)
* [理解 QMK](understanding_qmk.md) * [理解QMK](understanding_qmk.md)
* 其他话题 * 其他话题
* [使用Eclipse开发QMK](other_eclipse.md) * [使用Eclipse开发QMK](other_eclipse.md)
@@ -99,8 +99,8 @@
* QMK 内构 (正在编写) * QMK 内构 (正在编写)
* [定义](internals_defines.md) * [定义](internals_defines.md)
* [输入回调寄存器](internals_input_callback_reg.md) * [输入回调寄存器](internals_input_callback_reg.md)
* [Midi 设备](internals_midi_device.md) * [Midi设备](internals_midi_device.md)
* [Midi 设备设置过程](internals_midi_device_setup_process.md) * [Midi设备设置过程](internals_midi_device_setup_process.md)
* [Midi 工具库](internals_midi_util.md) * [Midi工具库](internals_midi_util.md)
* [发送函数](internals_send_functions.md) * [发送函数](internals_send_functions.md)
* [Sysex 工具](internals_sysex_tools.md) * [Sysex工具](internals_sysex_tools.md)
+490
View File
@@ -0,0 +1,490 @@
# 如何定制你键盘的功能
对于很多人来说客制化键盘可不只是向你的电脑发送你按了那个件这么简单。你肯定想实现比简单按键和宏更复杂的功能。QMK有能让你注入代码的钩子, 覆盖功能, 另外,还可以自定义键盘在不同情况下的行为。
本页不假定任何特殊的QMK知识,但阅读[理解QMK](understanding_qmk.md)将会在更基础的层面帮你理解发生了什么。
## A Word on Core vs 键盘 vs 布局
我们把qmk组织成一个层次结构:
* Core (`_quantum`)
* Keyboard/Revision (`_kb`)
* Keymap (`_user`)
下面描述的每一个函数都可以在定义上加一个`_kb()`或 `_user()` 后缀。 建议在键盘/修订层使用`_kb()`后缀,在布局层使用`_user()`后缀。
在键盘/修订层定义函数时,`_kb()`在执行任何代码前先调用`_user()`是必要的,不然布局层函数就不要被调用。
<!-- 翻译问题:上面那句翻译的不太好-->
# 自定义键码
到目前为止,最常见的任务是更改现有键码的行为或创建新的键码。从代码角度来看这些操作都很相似。
## 定义一个新键码
创建键码第一步,先枚举出它全部,也就是给键码起个名字并分配唯一数值。QMK没有直接限制最大键码值大小,而是提供了一个`SAFE_RANGE`宏。你可以在枚举时用`SAFE_RANGE`来保证你取得了唯一的键码值。
这有枚举两个键码的例子。把这块加到`keymap.c`的话你就在布局中能用`FOO`和`BAR`了。
```c
enum my_keycodes {
FOO = SAFE_RANGE,
BAR
};
```
## 为键码的行为编程
当你覆盖一个已存在按键的行为时,或将这个行为赋给新键时,你要用`process_record_kb()`和`process_record_user()`函数。这俩函数在键处理中真实键事件被处理前被QMK调用。如果这俩函数返回`true`,QMK将会用正常的方式处理键码。这样可以很方便的扩展键码的功能而不是替换它。如果函数返回`false` QMK会跳过正常键处理,然后发送键子抬起还是按下事件就由你决定了。
当某个键按下或释放时这俩函数会被调用。
### process_record_user()`函数示例实现
这个例子做了两个事。自定义了一个叫做`FOO`的键码的行为,并补充了在按下回车时播放音符。
```c
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case FOO:
if (record->event.pressed) {
// 按下时做些什么
} else {
// 释放时做些什么
}
return false; // 跳过此键的所有进一步处理
case KC_ENTER:
// 当按下回车时播放音符
if (record->event.pressed) {
PLAY_NOTE_ARRAY(tone_qwerty);
}
return true; // 让QMK触发回车按下/释放事件
default:
return true; // 正常处理其他键码
}
}
```
### `process_record_*` 函数文档
* 键盘/修订: `bool process_record_kb(uint16_t keycode, keyrecord_t *record)`
* 布局: `bool process_record_user(uint16_t keycode, keyrecord_t *record)`
`keycode(键码)`参数是在布局上定义的,比如`MO(1)`, `KC_L`, 等等。 你要用 `switch...case` 块来处理这些事件。
`record`参数含有实际按键的信息:
```c
keyrecord_t record {
keyevent_t event {
keypos_t key {
uint8_t col
uint8_t row
}
bool pressed
uint16_t time
}
}
```
# LED控制
qmk提供了读取HID规范包含的5个LED的方法。:
* `USB_LED_NUM_LOCK`
* `USB_LED_CAPS_LOCK`
* `USB_LED_SCROLL_LOCK`
* `USB_LED_COMPOSE`
* `USB_LED_KANA`
这五个常量对应于主机LED状态的位置位。
有两种方法可以获得主机LED状态:
* 通过执行 `led_set_user()`
* 通过调用 `host_keyboard_leds()`
## `led_set_user()`
当5个LED中任何一个的状态需要改变时,此函数将被调用。此函数通过参数输入LED参数。
使用`IS_LED_ON(usb_led, led_name)`和`IS_LED_OFF(usb_led, led_name)`这两个宏来检查LED状态。
!> `host_keyboard_leds()`可能会在`led_set_user()`被调用前返回新值。
### `led_set_user()`函数示例实现
```c
void led_set_user(uint8_t usb_led) {
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
writePinLow(B0);
} else {
writePinHigh(B0);
}
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
writePinLow(B1);
} else {
writePinHigh(B1);
}
if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
writePinLow(B2);
} else {
writePinHigh(B2);
}
if (IS_LED_ON(usb_led, USB_LED_COMPOSE)) {
writePinLow(B3);
} else {
writePinHigh(B3);
}
if (IS_LED_ON(usb_led, USB_LED_KANA)) {
writePinLow(B4);
} else {
writePinHigh(B4);
}
}
```
### `led_set_*`函数文档
* 键盘/修订: `void led_set_kb(uint8_t usb_led)`
* 布局: `void led_set_user(uint8_t usb_led)`
## `host_keyboard_leds()`
调用这个函数会返回最后收到的LED状态。这个函数在`led_set_*`之外读取LED状态时很有用,比如在[`matrix_scan_user()`](#矩阵扫描代码).
为了便捷,你可以用`IS_HOST_LED_ON(led_name)`和`IS_HOST_LED_OFF(led_name)` 宏,而不直接调用和检查`host_keyboard_leds()`。
## 设置物理LED状态
一些键盘实现了为设置物理LED的状态提供了方便的方法。
### Ergodox Boards
Ergodox实现了提供`ergodox_right_led_1`/`2`/`3_on`/`off()`来让每个LED开或关, 也可以用 `ergodox_right_led_on`/`off(uint8_t led)` 按索引打开或关闭他们。
此外,还可以使用`ergodox_led_all_set(uint8_t n)`指定所有LED的亮度级别;针对每个LED用`ergodox_right_led_1`/`2`/`3_set(uint8_t n)`;使用索引的话用`ergodox_right_led_set(uint8_t led, uint8_t n)`。
Ergodox boards 同时定义了最低亮度级别`LED_BRIGHTNESS_LO`和最高亮度级别`LED_BRIGHTNESS_HI`(默认最高).
# 键盘初始化代码
键盘初始化过程有几个步骤。你是用那个函数取决于你想要做什么。
有三个主要初始化函数,按调用顺序列出。
* `keyboard_pre_init_*` - 会在大多数其他东西运行前运行。适用于哪些需要提前运行的硬件初始化。
* `matrix_init_*` - 在固件启动过程中间被调用。此时硬件已初始化,功能尚未初始化。
* `keyboard_post_init_*` - 在固件启动过程最后被调用。大多数情况下,你的“客制化”代码都可以放在这里。
!> 对于大多数人来说`keyboard_post_init_user`是你想要调用的函数。例如, 此时你可以设置RGB灯发光。
## 键盘预初始化代码
这代码极早运行,甚至都在USB初始化前运行。
在这之后不久矩阵就被初始化了。
对于大多数用户来说,这用不到,因为它主要是用于面向硬件的初始化。
但如果你有硬件初始化的话放在这里再好不过了(比如初始化LED引脚一类的).
### `keyboard_pre_init_user()`函数示例实现
本例中在键盘级别,设定 B0, B1, B2, B3, 和 B4 是LED引脚。
```c
void keyboard_pre_init_user(void) {
// 调用键盘预初始化代码
// 设置LED引脚为输出模式
setPinOutput(B0);
setPinOutput(B1);
setPinOutput(B2);
setPinOutput(B3);
setPinOutput(B4);
}
```
### `keyboard_pre_init_*` 函数文档
* 键盘/修订: `void keyboard_pre_init_kb(void)`
* 布局: `void keyboard_pre_init_user(void)`
## 矩阵初始化代码
这将会在矩阵初始化时被调用,在某些硬件设置好后,但在一些功能被初始化前。
这在你设置其他地方会用到的东西的时候会很有用,但与硬件无关,也不依赖于它的启动位置。
### `matrix_init_*`函数文档
* 键盘/修订: `void matrix_init_kb(void)`
* 布局: `void matrix_init_user(void)`
## 键盘后初始化代码
这是键盘初始化过程中的最后一个任务。如果您想更改某些特性,这会很有用,因为此时应该对它们进行初始化。
### `keyboard_post_init_user()`示例实现
本示例在所有初始化完成后运行,配置RGB灯。
```c
void keyboard_post_init_user(void) {
// 调用后初始化代码
rgblight_enable_noeeprom(); // 使能Rgb,不保存设置
rgblight_sethsv_noeeprom(180, 255, 255); // 将颜色设置到蓝绿色(青色)不保存
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); // 设置快速呼吸模式不保存
}
```
### `keyboard_post_init_*` 函数文档
* 键盘/修订: `void keyboard_post_init_kb(void)`
* 布局: `void keyboard_post_init_user(void)`
# 矩阵扫描代码
可能的话你要用`process_record_*()`自定义键盘,以这种方式连接到事件中,以确保代码不会对键盘产生负面的性能影响。然而,在极少数情况下,有必要进行矩阵扫描。在这些函数中要特别注意代码的性能,因为它每秒至少被调用10次。
### `matrix_scan_*`示例实现
这个例子被故意省略了。在hook这样一个对性能及其敏感的区域之前,您应该足够了解qmk的内部结构,以便在没有示例的情况下编写。如果你需要帮助,请[建立一个issue](https://github.com/qmk/qmk_firmware/issues/new)或[在Discord上与我们交流](https://discord.gg/Uq7gcHh).
### `matrix_scan_*` 函数文档
* 键盘/修订: `void matrix_scan_kb(void)`
* 布局: `void matrix_scan_user(void)`
该函数在每次矩阵扫描时被调用,这基本与MCU处理能力上限相同。在这里写代码要谨慎,因为它会运行很多次。
你会在自定义矩阵扫描代码时用到这个函数。这也可以用作自定义状态输出(比如LED灯或者屏幕)或者其他即便用户不输入你也想定期运行的功能。
# 键盘 空闲/唤醒 代码
如果键盘支持就可以通过停止一大票功能来达到"空闲"。RGB灯和背光就是很好的例子。这可以节约能耗,也可能让你键盘风味更佳。
用两个函数控制: `suspend_power_down_*`和`suspend_wakeup_init_*`, 分别在系统板空闲和唤醒时调用。
### suspend_power_down_user()和suspend_wakeup_init_user()示例实现
```c
void suspend_power_down_user(void) {
rgb_matrix_set_suspend_state(true);
}
void suspend_wakeup_init_user(void) {
rgb_matrix_set_suspend_state(false);
}
```
### 键盘 挂起/唤醒 函数文档
* 键盘/修订: `void suspend_power_down_kb(void)` 和`void suspend_wakeup_init_user(void)`
* 布局: `void suspend_power_down_kb(void)` 和 `void suspend_wakeup_init_user(void)`
# 层改变代码
每当层改变这个就运行代码。这对于层指示或自定义层处理很有用。
### `layer_state_set_*` 示例实现
本例使用了Planck键盘示范了如何设置 [RGB背光灯](feature_rgblight.md)使之与层对应
```c
uint32_t layer_state_set_user(uint32_t state) {
switch (biton32(state)) {
case _RAISE:
rgblight_setrgb (0x00, 0x00, 0xFF);
break;
case _LOWER:
rgblight_setrgb (0xFF, 0x00, 0x00);
break;
case _PLOVER:
rgblight_setrgb (0x00, 0xFF, 0x00);
break;
case _ADJUST:
rgblight_setrgb (0x7A, 0x00, 0xFF);
break;
default: // for any other layers, or the default layer
rgblight_setrgb (0x00, 0xFF, 0xFF);
break;
}
return state;
}
```
### `layer_state_set_*` 函数文档
* 键盘/修订: `uint32_t layer_state_set_kb(uint32_t state)`
* 布局: `uint32_t layer_state_set_user(uint32_t state)`
该`状态`是活动层的bitmask, 详见[布局概述](keymap.md#布局的层状态)
# 掉电保存配置 (EEPROM)
这会让你的配置长期的保存在键盘中。这些配置保存在你主控的EEPROM里,掉电不会消失。 设置可以用`eeconfig_read_kb`和`eeconfig_read_user`读取,可以用`eeconfig_update_kb`和`eeconfig_update_user`写入。这对于您希望能够切换的功能很有用(比如切换RGB层指示。此外,你可以用`eeconfig_init_kb`和`eeconfig_init_user`来设置EEPROM默认值。
最复杂的部分可能是,有很多方法可以通过EEPROM存储和访问数据,并且并没有用哪种方法是“政治正确”的。你每个功能只有一个双字(四字节)空间。
记住EEPROM是有写入寿命的。尽管写入寿命很高,但是并不是只有设置写道EEPROM中。如果你写入频繁,你的MCU寿命将会变短。
* 如果您不理解这个例子,那么您可能希望避免使用这个特性,因为它相当复杂。
### 示例实现
本例讲解了如何添加设置,并且读写。本里使用了用户布局。这是一个复杂的函数,有很多事情要做。实际上,它使用了很多上述函数来工作!
在你的keymap.c文件中,将以下代码添加至顶部:
```c
typedef union {
uint32_t raw;
struct {
bool rgb_layer_change :1;
};
} user_config_t;
user_config_t user_config;
```
以上代码建立了一个结构体,该结构体可以存储设置并可用于写入EEPROM。如此这般将无需定义变量,因为在结构体中已然定义。要记住`bool` (布尔)值使用1位, `uint8_t`使用8位, `uint16_t`使用16位。你可以混合搭配使用,但是顺序记错可能会招致麻烦,因为那会改变写入写出的值。
`layer_state_set_*`函数中使用了`rgb_layer_change`,使用了`keyboard_post_init_user`和`process_record_user`来配置一切。
首先要使用`keyboard_post_init_user,你要加入`eeconfig_read_user()`来填充你刚刚创建的结构体。然后您可以立即使用这个结构来控制您的布局中的功能。就像这样:
```c
void keyboard_post_init_user(void) {
// 调用布局级别的矩阵初始化
// 从EEPROM读用户配置
user_config.raw = eeconfig_read_user();
// 如使能,设置默认层
if (user_config.rgb_layer_change) {
rgblight_enable_noeeprom();
rgblight_sethsv_noeeprom_cyan();
rgblight_mode_noeeprom(1);
}
}
```
以上函数会在读EEPROM配置后立即使用该设置来设置默认层RGB颜色。"raw"的值是从你上面基于"union"创建的结构体中转换来的。
```c
uint32_t layer_state_set_user(uint32_t state) {
switch (biton32(state)) {
case _RAISE:
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_magenta(); rgblight_mode_noeeprom(1); }
break;
case _LOWER:
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_red(); rgblight_mode_noeeprom(1); }
break;
case _PLOVER:
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_green(); rgblight_mode_noeeprom(1); }
break;
case _ADJUST:
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_white(); rgblight_mode_noeeprom(1); }
break;
default: // 针对其他层或默认层
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_cyan(); rgblight_mode_noeeprom(1); }
break;
}
return state;
}
```
这样仅在值使能时会改变RGB背光灯。现在配置这个值, 为`process_record_user`创建一个新键码叫做`RGB_LYR`。我们要确保,如果使用正常的RGB代码,使用上面的示例将其关闭,请将其设置为:
```c
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case FOO:
if (record->event.pressed) {
// 按下时做点什么
} else {
// 释放时做点什么
}
return false; // 跳过此键的进一步处理
case KC_ENTER:
// 在按下回车时播放音符
if (record->event.pressed) {
PLAY_NOTE_ARRAY(tone_qwerty);
}
return true; // 让QMK产生回车按下/释放事件
case RGB_LYR: // 本句让underglow作为层指示,或正常使用。
if (record->event.pressed) {
user_config.rgb_layer_change ^= 1; // 切换状态
eeconfig_update_user(user_config.raw); // 向EEPROM写入新状态
if (user_config.rgb_layer_change) { // 如果层状态被使能
layer_state_set(layer_state); // 那么立刻更新层颜色
}
}
return false; break;
case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // 对于所有的RGB代码 (see quantum_keycodes.h, L400 可以参考)
if (record->event.pressed) { //本句失能层指示,假设你改变了这个…你要把它禁用
if (user_config.rgb_layer_change) { // 仅当使能时
user_config.rgb_layer_change = false; // 失能,然后
eeconfig_update_user(user_config.raw); // 向EEPROM写入设置
}
}
return true; break;
default:
return true; // 按其他键正常
}
}
```
最后你要加入`eeconfig_init_user`函数,所以当EEPROM重置时,可以指定默认值, 甚至自定义操作。想强制重置EEPROM,请用`EEP_RST`键码或[Bootmagic](feature_bootmagic.md)函数。比如,如果要在默认情况下设置RGB层指示,并保存默认值
```c
void eeconfig_init_user(void) { // EEPROM正被重置
user_config.raw = 0;
user_config.rgb_layer_change = true; // 我们想要默认使能
eeconfig_update_user(user_config.raw); // 向EEPROM写入默认值
// use the non noeeprom versions, 还要向EEPROM写入这些值
rgblight_enable(); // 默认使能RGB
rgblight_sethsv_cyan(); // 默认设置青色
rgblight_mode(1); // 默认设置长亮
}
```
然后就完事了。RGB层指示会在你想让它工作时工作。这个设置会一直保存,即便你拔下键盘。如果你使用其他RGB代码,层指示将失能,现在它可以做你所想了。
### 'EECONFIG' 函数文档
* 键盘/修订: `void eeconfig_init_kb(void)`, `uint32_t eeconfig_read_kb(void)`和`void eeconfig_update_kb(uint32_t val)`
* 布局: `void eeconfig_init_user(void)`, `uint32_t eeconfig_read_user(void)`和`void eeconfig_update_user(uint32_t val)`
`val` 是你想写入EEPROM的值,`eeconfig_read_*`函数会从EEPROM返回一个32位(双字)的值。
# 自定义击键-长按临界值(TAPPING_TERM)
默认情况下,击键-长按临界值是全球统一的,并且不能通过键进行配置。对于大多数用户来说这很好。但是在有些情况下,对于`LT`键来说按键延时对双功能键的提升更大,可能是因为有些键比其他的键更容易按住。为了不给每个都自定义键码,本功能可以为每个键定义`TAPPING_TERM`。
想使能这个功能的话, 要先在`config.h`加上`#define TAPPING_TERM_PER_KEY`。
## `get_tapping_term`示例实现
想要修改基于键码的`TAPPING TERM`,你要向`keymap.c`文件添加如下代码:
```c
uint16_t get_tapping_term(uint16_t keycode) {
switch (keycode) {
case SFT_T(KC_SPC):
return TAPPING_TERM + 1250;
case LT(1, KC_GRV):
return 130;
default:
return TAPPING_TERM;
}
}
```
### `get_tapping_term` 函数文档
不像这篇的其他功能,这个不需要quantum或者键盘级别的函数,只要用户级函数即可。
+2 -2
View File
@@ -137,8 +137,8 @@ brew install avrdude
``` ```
brew uninstall --force avr-gcc brew uninstall --force avr-gcc
brew install avr-gcc@7 brew install avr-gcc@8
brew link --force avr-gcc@7 brew link --force avr-gcc@8
``` ```
### 我刷新了我的键盘但是键盘不工作/按键没有注册 - 而且还是ARM的 (rev6 planck, clueboard 60, hs60v2, etc...) (Feb 2019) ### 我刷新了我的键盘但是键盘不工作/按键没有注册 - 而且还是ARM的 (rev6 planck, clueboard 60, hs60v2, etc...) (Feb 2019)
+19
View File
@@ -0,0 +1,19 @@
# 常见问题
## QMK是什么?
[QMK](https://github.com/qmk), 是量子机械键盘(Quantum Mechanical Keyboard)的缩写,是一群开源爱好者为定制键盘开发的工具。我们从[QMK固件](https://github.com/qmk/qmk_firmware)开始,这是[TMK](https://github.com/tmk/tmk_keyboard)的魔改分叉。
### 为什么叫量子(Quantum)?
<!-- 待修复 译者吐槽:文档作者竟然也不知道为啥。。。 -->
## QMK和TMK有什么区别?
TMK最初由[Jun Wako](https://github.com/tmk)设计和执行。QMK始于[Jack Humbert](https://github.com/jackhumbert)为Planck键盘创建的TMK分叉。一段时间后,Jack的分叉就和TMK相去甚远了,于是在2015年,Jack决定改名QMK。
从技术观点来讲,QMK是TMK添加一些新功能而成的。尤其是QMK扩展了可用的键码,使高级功能进一步丰富比如 `S()`, `LCTL()`, 和 `MO()`。全部键码见[键码](keycodes.md).
从工程的社区管理来讲TMK自己维护了所有官方支持的键盘,只有很小一部分社区支持。独立社区维护已存在分叉或为其他键盘创建的分叉。默认支持很少的键码,所以用户通常不会与他人分享布局。QMK鼓励通过集中管理仓库分享布局和键盘,我们会采纳所有符合质量标准的PR。这就极大的保证了社区维护,同时QMK小组也会在必要时给予帮助。
这两种方法都有其优点和缺点,并且代码在有意义时在TMK和QMK之间自由流动。
+170
View File
@@ -0,0 +1,170 @@
# QMK术语表
## ARM
多家公司生产的32位单片机系列,例如Atmel, Cypress, Kinetis, NXP, ST, 和 TI等公司。
## AVR
[Atmel](http://www.microchip.com/)公司的单片机系列。 AVR是TMK的初始支持平台。
## AZERTY
Français (法国)标准键盘布局。用键盘的前六个字母命名。
## Backlight(背光)
键盘上照明的通称。背光通常是一组LED灯,通过键帽或者按轴发光,但也不总是这样。
## Bluetooth(蓝牙)
一种短距离点对点无线协议。许多多无线键盘使用此协议。
## Bootloader(引导加载程序)
一种写到你单片机的保护区的特殊的程序,该程序可以使单片机升级自己的固件,通常是通过USB来升级。
## Bootmagic(热改键)
允许各种键盘行为动态变化的功能,如交换或禁用常用键。
## C
一种适用于系统代码的低级编程语言。大多数qmk代码是用C编写的。
## Colemak
一种流行的键盘布局。
## Compile(编译)
把人可读的代码转换成你的单片机可以运行的机器代码的过程。
## Dvorak
一个由August Dvorak博士在20世纪30年代创建的布局。Dvorak简化键盘(Dvorak Simplified Keyboard)的缩写。
## Dynamic Macro(动态宏)
一种记录在键盘上的宏,当键盘拔出或计算机重新启动时,宏将丢失。
* [动态宏文档](feature_dynamic_macros.md)
## Eclipse
是一种受C语言开发者追捧的集成开发环境(IDE)。
* [Eclipse安装说明](eclipse.md)
## Firmware(固件)
用来控制单片机的软件。
## FLIP
爱特梅尔(Atmel)提供的AVR器件刷写软件。我们一般推荐 [QMK刷写工具](https://github.com/qmk/qmk_flasher),但是对于一些高级用例,需要FLIP。
## git
命令行版本控制软件
## GitHub
负责大多数QMK项目的网站。它是Git、问题跟踪和其他帮助我们运行qmk的功能的集成平台。
## ISP(在系统编程)
在系统编程(In-system programming), 使用外部硬件和JTAG管脚对AVR芯片进行编程的一种方法。
## hid_listen
从键盘接收调试消息的接口。 您可以使用[QMK Flasher](https://github.com/qmk/qmk_flasher)或[PJRC's hid_listen](https://www.pjrc.com/teensy/hid_listen.html)查看这些消息
## Keycode(键码)
表示特定键的2字节数据。`0x00`-`0xFF`用于[基本键码](keycodes_basic.md)而`0x100`-`0xFFFF`用于[量子键码](quantum_keycodes.md).
## Key Down
一个键按下尚未抬起时触发的事件。
## Key Up
一个键抬起时触发的事件。
## Keymap(键映射)
映射到物理键盘布局的一组键码,在按键和按键释放时进行处理。有时翻译为布局,意为软件上表示的布局,即映射。
## Layer(层)
为了让一个键实现多个功能的抽象结构。最高活动层有限。
## Leader Key(前导键、设置菜单键)
本功能允许您点击前导键,然后按顺序按1-3个键子来激活按键或其他量子功能。
* [前导键文档](feature_leader_key.md)
## LED
发光二极管,键盘上最常用的指示灯装置。
## Make
用于编译所有源文件的软件包。可以使用`make`命令和其他参数来编译你的固件。
## Matrix(矩阵)
一种由列和行组成的接线模式,使单片机能够用较少的引脚检测按键。矩阵通常包含二极管,以达到全键无冲。
## Macro(宏)
本功能可以在敲击单个键后发送多个按键事件(hid报告)。
* [宏文档](feature_macros.md)
## MCU(单片机、微控制单元)
微控制单元,键盘的处理器。
## Modifier(修改键、修饰键、功能键)
按住该键将会改变其他键的功能,修饰键包括 Ctrl, Alt, 和 Shift。
## Mousekeys(鼠标键)
本功能在您敲击键盘时会控制鼠标光标。
* [鼠标键文档](feature_mouse_keys.md)
## N-Key Rollover (NKRO、全键无冲)
一种术语,适用于能够同时报告任意数量按键的键盘。
## Oneshot Modifier(粘滞键)
一种能让你的功能键一直保持按下,直到你按下其他键的功能。它叫做粘滞键或叫做粘连键,该功能由软件实现而非机械结构。
## ProMicro
一种低成本AVR开发板。这种板子很容易在购物网站找到(价格不到20RMB),但是据说刷写pro micro有点令人抓狂。
## Pull Request(拉请求、PR)
向QMK请求提交代码。我们鼓励所有用户提交你们自己的键盘的代码。
## QWERTY
标准英文键盘,通常也用于其他语言,例如中文。是用键盘前6个字母命名的。
## QWERTZ
标准Deutsche(德语)键盘布局。使用前6个字母明名。
## Rollover(允许翻转、无冲形式)
该术语表示在一个键已按下时按下另一个键。形式包括2KRO(双键无冲),6KRO(6键无冲),和NKRO(全键无冲),无冲表示可同时按下而不产生冲突的键的数量。
## Scancode(扫描码)
HID报告中的一个1字节的数字,表示一个键子。这些数字在下列文档中[HID Usage Tables](https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf)该文档发布于[USB-IF](http://www.usb.org/)。
## Space Cadet键盘的shift键
一种特使的shift设置,能让你通过敲击左或右shift一次或多次键入不同的括号。
* [Space Cadet键盘文档](feature_space_cadet.md)
## Tap(敲击、单击)
按下并释放一个键。在某些情况下您需要区分键按下和键抬起,但是单击把两个事件都包括了。
## Tap Dance(多击键)
本功能允许向同一个键子分配多个键码,并根据按键次数区分。
* [多击键文档](feature_tap_dance.md)
## Teensy
一种低成本AVR开发板<!--译者吐槽:我怎么感觉成本不低。好吧,我穷。 -->,通常用于手工连线键盘。这个teensy是有点小贵但是halfkay bootloader会让它刷写十分简单,所以也很常用。
## Underlight(背光)
用于照亮电路板底面的LED的总称。这些LED通常从印刷电路板的底部向键盘所在的表面发光。
## Unicode
在较大的计算机世界中,Unicode是一组编码方案,用于表示任何语言中的字符。 与qmk相关的是,它意味着使用各种操作系统方案来发送Unicode代码点,而不是扫描码。
* [Unicode文档](feature_unicode.md)
## Unit Testing(单元测试)
针对qmk的自动运行测试框架。单元测试帮助我们确信我们的更改不会破坏任何东西。
* [单元测试文档](unit_testing.md)
## USB
通用串行总线,键盘最常见的有线接口。
## USB 主机 (或简易主机)
USB诸暨市你的电脑,或者你的键盘所插的任何设备。
# 并没有找到你想找到的术语?
[建立一个issue](https://github.com/qmk/qmk_firmware/issues) ,想好你的问题,或许你所问的术语就会添加到这里。创建一个PR帮我们添加需要添加的术语当然坠吼了:)
+1 -1
View File
@@ -25,7 +25,7 @@
#include <avr/io.h> #include <avr/io.h>
#include <avr/interrupt.h> #include <avr/interrupt.h>
#include "rgblight_types.h" #include "color.h"
/* User Interface /* User Interface
+1 -1
View File
@@ -28,7 +28,7 @@
//#include "ws2812_config.h" //#include "ws2812_config.h"
//#include "i2cmaster.h" //#include "i2cmaster.h"
#include "rgblight_types.h" #include "quantum/color.h"
/* User Interface /* User Interface
* *
+33 -4
View File
@@ -33,6 +33,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif // defined(__AVR__) #endif // defined(__AVR__)
// Used commands from spec sheet: https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf // Used commands from spec sheet: https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf
// for SH1106: https://www.velleman.eu/downloads/29/infosheets/sh1106_datasheet.pdf
// Fundamental Commands // Fundamental Commands
#define CONTRAST 0x81 #define CONTRAST 0x81
#define DISPLAY_ALL_ON 0xA5 #define DISPLAY_ALL_ON 0xA5
@@ -40,6 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define NORMAL_DISPLAY 0xA6 #define NORMAL_DISPLAY 0xA6
#define DISPLAY_ON 0xAF #define DISPLAY_ON 0xAF
#define DISPLAY_OFF 0xAE #define DISPLAY_OFF 0xAE
#define NOP 0xE3
// Scrolling Commands // Scrolling Commands
#define ACTIVATE_SCROLL 0x2F #define ACTIVATE_SCROLL 0x2F
@@ -53,6 +56,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MEMORY_MODE 0x20 #define MEMORY_MODE 0x20
#define COLUMN_ADDR 0x21 #define COLUMN_ADDR 0x21
#define PAGE_ADDR 0x22 #define PAGE_ADDR 0x22
#define PAM_SETCOLUMN_LSB 0x00
#define PAM_SETCOLUMN_MSB 0x10
#define PAM_PAGE_ADDR 0xB0 // 0xb0 -- 0xb7
// Hardware Configuration Commands // Hardware Configuration Commands
#define DISPLAY_START_LINE 0x40 #define DISPLAY_START_LINE 0x40
@@ -63,6 +69,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define COM_SCAN_DEC 0xC8 #define COM_SCAN_DEC 0xC8
#define DISPLAY_OFFSET 0xD3 #define DISPLAY_OFFSET 0xD3
#define COM_PINS 0xDA #define COM_PINS 0xDA
#define COM_PINS_SEQ 0x02
#define COM_PINS_ALT 0x12
#define COM_PINS_SEQ_LR 0x22
#define COM_PINS_ALT_LR 0x32
// Timing & Driving Commands // Timing & Driving Commands
#define DISPLAY_CLOCK 0xD5 #define DISPLAY_CLOCK 0xD5
@@ -154,7 +164,11 @@ bool oled_init(uint8_t rotation) {
DISPLAY_OFFSET, 0x00, DISPLAY_OFFSET, 0x00,
DISPLAY_START_LINE | 0x00, DISPLAY_START_LINE | 0x00,
CHARGE_PUMP, 0x14, CHARGE_PUMP, 0x14,
MEMORY_MODE, 0x00, }; // Horizontal addressing mode #if (OLED_IC != OLED_IC_SH1106)
// MEMORY_MODE is unsupported on SH1106 (Page Addressing only)
MEMORY_MODE, 0x00, // Horizontal addressing mode
#endif
};
if (I2C_TRANSMIT_P(display_setup1) != I2C_STATUS_SUCCESS) { if (I2C_TRANSMIT_P(display_setup1) != I2C_STATUS_SUCCESS) {
print("oled_init cmd set 1 failed\n"); print("oled_init cmd set 1 failed\n");
return false; return false;
@@ -182,7 +196,7 @@ bool oled_init(uint8_t rotation) {
static const uint8_t PROGMEM display_setup2[] = { static const uint8_t PROGMEM display_setup2[] = {
I2C_CMD, I2C_CMD,
COM_PINS, 0x02, COM_PINS, OLED_COM_PINS,
CONTRAST, 0x8F, CONTRAST, 0x8F,
PRE_CHARGE_PERIOD, 0xF1, PRE_CHARGE_PERIOD, 0xF1,
VCOM_DETECT, 0x40, VCOM_DETECT, 0x40,
@@ -215,10 +229,25 @@ void oled_clear(void) {
static void calc_bounds(uint8_t update_start, uint8_t* cmd_array) static void calc_bounds(uint8_t update_start, uint8_t* cmd_array)
{ {
cmd_array[1] = OLED_BLOCK_SIZE * update_start % OLED_DISPLAY_WIDTH; // Calculate commands to set memory addressing bounds.
cmd_array[4] = OLED_BLOCK_SIZE * update_start / OLED_DISPLAY_WIDTH; uint8_t start_page = OLED_BLOCK_SIZE * update_start / OLED_DISPLAY_WIDTH;
uint8_t start_column = OLED_BLOCK_SIZE * update_start % OLED_DISPLAY_WIDTH;
#if (OLED_IC == OLED_IC_SH1106)
// Commands for Page Addressing Mode. Sets starting page and column; has no end bound.
// Column value must be split into high and low nybble and sent as two commands.
cmd_array[0] = PAM_PAGE_ADDR | start_page;
cmd_array[1] = PAM_SETCOLUMN_LSB | ((OLED_COLUMN_OFFSET + start_column) & 0x0f);
cmd_array[2] = PAM_SETCOLUMN_MSB | ((OLED_COLUMN_OFFSET + start_column) >> 4 & 0x0f);
cmd_array[3] = NOP;
cmd_array[4] = NOP;
cmd_array[5] = NOP;
#else
// Commands for use in Horizontal Addressing mode.
cmd_array[1] = start_column;
cmd_array[4] = start_page;
cmd_array[2] = (OLED_BLOCK_SIZE + OLED_DISPLAY_WIDTH - 1) % OLED_DISPLAY_WIDTH + cmd_array[1]; cmd_array[2] = (OLED_BLOCK_SIZE + OLED_DISPLAY_WIDTH - 1) % OLED_DISPLAY_WIDTH + cmd_array[1];
cmd_array[5] = (OLED_BLOCK_SIZE + OLED_DISPLAY_WIDTH - 1) / OLED_DISPLAY_WIDTH - 1; cmd_array[5] = (OLED_BLOCK_SIZE + OLED_DISPLAY_WIDTH - 1) / OLED_DISPLAY_WIDTH - 1;
#endif
} }
static void calc_bounds_90(uint8_t update_start, uint8_t* cmd_array) static void calc_bounds_90(uint8_t update_start, uint8_t* cmd_array)
+57 -4
View File
@@ -19,22 +19,47 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
// an enumeration of the chips this driver supports
#define OLED_IC_SSD1306 0
#define OLED_IC_SH1106 1
#if defined(OLED_DISPLAY_CUSTOM) #if defined(OLED_DISPLAY_CUSTOM)
// Expected user to implement the necessary defines // Expected user to implement the necessary defines
#elif defined(OLED_DISPLAY_128X64) #elif defined(OLED_DISPLAY_128X64)
// Double height 128x64 // Double height 128x64
#ifndef OLED_DISPLAY_WIDTH
#define OLED_DISPLAY_WIDTH 128 #define OLED_DISPLAY_WIDTH 128
#endif
#ifndef OLED_DISPLAY_HEIGHT
#define OLED_DISPLAY_HEIGHT 64 #define OLED_DISPLAY_HEIGHT 64
#endif
#ifndef OLED_MATRIX_SIZE
#define OLED_MATRIX_SIZE (OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH) // 1024 (compile time mathed) #define OLED_MATRIX_SIZE (OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH) // 1024 (compile time mathed)
#define OLED_BLOCK_TYPE uint32_t #endif
#ifndef OLED_BLOCK_TYPE
#define OLED_BLOCK_TYPE uint16_t
#endif
#ifndef OLED_BLOCK_COUNT
#define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8) // 32 (compile time mathed) #define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8) // 32 (compile time mathed)
#endif
#ifndef OLED_BLOCK_SIZE
#define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) // 32 (compile time mathed) #define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) // 32 (compile time mathed)
#endif
#ifndef OLED_COM_PINS
#define OLED_COM_PINS COM_PINS_ALT
#endif
// For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays // For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays
// The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode // The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode
#define OLED_SOURCE_MAP { 32, 40, 48, 56 } #ifndef OLED_SOURCE_MAP
#define OLED_TARGET_MAP { 24, 16, 8, 0 } #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56 }
#endif
#ifndef OLED_TARGET_MAP
#define OLED_TARGET_MAP { 56, 48, 40, 32, 24, 16, 8, 0 }
#endif
// If OLED_BLOCK_TYPE is uint32_t, these tables would look like:
// #define OLED_SOURCE_MAP { 32, 40, 48, 56 }
// #define OLED_TARGET_MAP { 24, 16, 8, 0 }
// If OLED_BLOCK_TYPE is uint16_t, these tables would look like: // If OLED_BLOCK_TYPE is uint16_t, these tables would look like:
// #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56 } // #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56 }
// #define OLED_TARGET_MAP { 56, 48, 40, 32, 24, 16, 8, 0 } // #define OLED_TARGET_MAP { 56, 48, 40, 32, 24, 16, 8, 0 }
@@ -43,23 +68,51 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define OLED_TARGET_MAP { 56, 120, 48, 112, 40, 104, 32, 96, 24, 88, 16, 80, 8, 72, 0, 64 } // #define OLED_TARGET_MAP { 56, 120, 48, 112, 40, 104, 32, 96, 24, 88, 16, 80, 8, 72, 0, 64 }
#else // defined(OLED_DISPLAY_128X64) #else // defined(OLED_DISPLAY_128X64)
// Default 128x32 // Default 128x32
#ifndef OLED_DISPLAY_WIDTH
#define OLED_DISPLAY_WIDTH 128 #define OLED_DISPLAY_WIDTH 128
#endif
#ifndef OLED_DISPLAY_HEIGHT
#define OLED_DISPLAY_HEIGHT 32 #define OLED_DISPLAY_HEIGHT 32
#endif
#ifndef OLED_MATRIX_SIZE
#define OLED_MATRIX_SIZE (OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH) // 512 (compile time mathed) #define OLED_MATRIX_SIZE (OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH) // 512 (compile time mathed)
#endif
#ifndef OLED_BLOCK_TYPE
#define OLED_BLOCK_TYPE uint16_t // Type to use for segmenting the oled display for smart rendering, use unsigned types only #define OLED_BLOCK_TYPE uint16_t // Type to use for segmenting the oled display for smart rendering, use unsigned types only
#endif
#ifndef OLED_BLOCK_COUNT
#define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8) // 16 (compile time mathed) #define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8) // 16 (compile time mathed)
#endif
#ifndef OLED_BLOCK_SIZE
#define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) // 32 (compile time mathed) #define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) // 32 (compile time mathed)
#endif
#ifndef OLED_COM_PINS
#define OLED_COM_PINS COM_PINS_SEQ
#endif
// For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays // For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays
// The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode // The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode
#ifndef OLED_SOURCE_MAP
#define OLED_SOURCE_MAP { 0, 8, 16, 24 } #define OLED_SOURCE_MAP { 0, 8, 16, 24 }
#endif
#ifndef OLED_TARGET_MAP
#define OLED_TARGET_MAP { 24, 16, 8, 0 } #define OLED_TARGET_MAP { 24, 16, 8, 0 }
#endif
// If OLED_BLOCK_TYPE is uint8_t, these tables would look like: // If OLED_BLOCK_TYPE is uint8_t, these tables would look like:
// #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56 } // #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56 }
// #define OLED_TARGET_MAP { 48, 32, 16, 0, 56, 40, 24, 8 } // #define OLED_TARGET_MAP { 48, 32, 16, 0, 56, 40, 24, 8 }
#endif // defined(OLED_DISPLAY_CUSTOM) #endif // defined(OLED_DISPLAY_CUSTOM)
// Address to use for tthe i2d oled communication #if !defined(OLED_IC)
#define OLED_IC OLED_IC_SSD1306
#endif
// the column address corresponding to the first column in the display hardware
#if !defined(OLED_COLUMN_OFFSET)
#define OLED_COLUMN_OFFSET 0
#endif
// Address to use for the i2c oled communication
#if !defined(OLED_DISPLAY_ADDRESS) #if !defined(OLED_DISPLAY_ADDRESS)
#define OLED_DISPLAY_ADDRESS 0x3C #define OLED_DISPLAY_ADDRESS 0x3C
#endif #endif
+1 -1
View File
@@ -62,7 +62,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
+2 -2
View File
@@ -47,7 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif #endif
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
@@ -62,4 +62,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8 #define RGBLIGHT_VAL_STEP 8
#endif #endif
+1 -1
View File
@@ -29,7 +29,7 @@
#endif #endif
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
+1 -1
View File
@@ -80,7 +80,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
+1 -2
View File
@@ -29,7 +29,7 @@
#endif #endif
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
@@ -45,4 +45,3 @@
#define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8 #define RGBLIGHT_VAL_STEP 8
#endif #endif
+1 -1
View File
@@ -71,7 +71,7 @@
// #endif // #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
+1 -1
View File
@@ -38,7 +38,7 @@
// #define BACKLIGHT_LEVELS 3 // #define BACKLIGHT_LEVELS 3
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
+1 -1
View File
@@ -47,7 +47,7 @@
// #endif // #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
+1 -1
View File
@@ -72,7 +72,7 @@
// #endif // #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
+1 -1
View File
@@ -72,7 +72,7 @@
// #endif // #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
+1 -1
View File
@@ -29,7 +29,7 @@
#endif #endif
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
@@ -0,0 +1,24 @@
/*
Copyright 2012 Jun Wako <[email protected]>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#undef TAPPING_TERM
#define TAPPING_TERM 190
#define MUSIC_MASK (keycode != KC_NO)
#define MIDI_ADVANCED
@@ -0,0 +1,115 @@
#include QMK_KEYBOARD_H
enum layer_number {
_IONIAN = 0,
_DORIAN,
_PHRYGIAN,
_LYDIAN,
_MIXOLYDIAN,
_AEOLIAN,
_LOCRIAN,
_MENU
};
enum custom_keycodes {
IONIAN = SAFE_RANGE,
DORIAN,
PHRYGIAN,
LYDIAN,
MIXOLYDIAN,
AEOLIAN,
LOCRIAN,
};
#define MENU MO(_MENU)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_IONIAN] = LAYOUT_ortho_3x10(
MI_C_1, MI_F_1, MI_B_1, MI_E_2, MI_A_2, MI_D_3, MI_G_3, MI_C_4, MI_OCTD, MI_OCTU,
MI_D_1, MI_G_1, MI_C_2, MI_F_2, MI_B_2, MI_E_3, MI_A_3, MI_D_4, MI_TRNSD, MI_TRNSU,
MI_E_1, MI_A_1, MI_D_2, MI_G_2, MI_C_3, MI_F_3, MI_B_3, MI_E_4, MI_SUS, MENU
),
[_DORIAN] = LAYOUT_ortho_3x10(
MI_C_1, MI_F_1, MI_As_1, MI_Ds_2, MI_A_2, MI_D_3, MI_G_3, MI_C_4, _______, _______,
MI_D_1, MI_G_1, MI_C_2, MI_F_2, MI_As_2, MI_Ds_3, MI_A_3, MI_D_4, _______, _______,
MI_Ds_1, MI_A_1, MI_D_2, MI_G_2, MI_C_3, MI_F_3, MI_As_3, MI_Ds_4, _______, _______
),
[_PHRYGIAN] = LAYOUT_ortho_3x10(
MI_C_1, MI_F_1, MI_As_1, MI_Ds_2, MI_Gs_2, MI_Cs_3, MI_G_3, MI_C_4, _______, _______,
MI_Cs_1, MI_G_1, MI_C_2, MI_F_2, MI_As_2, MI_Ds_3, MI_Gs_3, MI_Cs_4, _______, _______,
MI_Ds_1, MI_Gs_1, MI_Cs_2, MI_G_2, MI_C_3, MI_F_3, MI_As_3, MI_Ds_4, _______, _______
),
[_LYDIAN] = LAYOUT_ortho_3x10(
MI_C_1, MI_Fs_1, MI_B_1, MI_E_2, MI_A_2, MI_D_3, MI_G_3, MI_C_4, _______, _______,
MI_D_1, MI_G_1, MI_C_2, MI_Fs_2, MI_B_2, MI_E_3, MI_A_3, MI_D_4, _______, _______,
MI_E_1, MI_A_1, MI_D_2, MI_G_2, MI_C_3, MI_Fs_3, MI_B_3, MI_E_4, _______, _______
),
[_MIXOLYDIAN] = LAYOUT_ortho_3x10(
MI_C_1, MI_F_1, MI_As_1, MI_E_2, MI_A_2, MI_D_3, MI_G_3, MI_C_4, _______, _______,
MI_D_1, MI_G_1, MI_C_2, MI_F_2, MI_As_2, MI_E_3, MI_A_3, MI_D_4, _______, _______,
MI_E_1, MI_A_1, MI_D_2, MI_G_2, MI_C_3, MI_F_3, MI_As_3, MI_E_4, _______, _______
),
[_AEOLIAN] = LAYOUT_ortho_3x10(
MI_C_1, MI_F_1, MI_As_1, MI_Ds_2, MI_Gs_2, MI_D_3, MI_G_3, MI_C_4, _______, _______,
MI_D_1, MI_G_1, MI_C_2, MI_F_2, MI_As_2, MI_Ds_3, MI_Gs_3, MI_D_4, _______, _______,
MI_Ds_1, MI_Gs_1, MI_D_2, MI_G_2, MI_C_3, MI_F_3, MI_As_3, MI_Ds_4, _______, _______
),
[_LOCRIAN] = LAYOUT_ortho_3x10(
MI_C_1, MI_F_1, MI_As_1, MI_Ds_2, MI_Gs_2, MI_Cs_3, MI_Fs_3, MI_C_4, _______, _______,
MI_Cs_1, MI_Fs_1, MI_C_2, MI_F_2, MI_As_2, MI_Ds_3, MI_Gs_3, MI_Cs_4, _______, _______,
MI_Ds_1, MI_Gs_1, MI_Cs_2, MI_Fs_2, MI_C_3, MI_F_3, MI_As_3, MI_Ds_4, _______, _______
),
[_MENU] = LAYOUT_ortho_3x10(
IONIAN, LYDIAN, LOCRIAN, _______, _______, _______, _______, _______, _______, _______,
DORIAN, MIXOLYDIAN, _______, _______, _______, _______, _______, _______, _______, _______,
PHRYGIAN, AEOLIAN, _______, _______, _______, _______, _______, _______, RESET, _______
)
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case IONIAN:
if (record->event.pressed) {
set_single_persistent_default_layer(_IONIAN);
}
break;
case DORIAN:
if (record->event.pressed) {
set_single_persistent_default_layer(_DORIAN);
}
break;
case PHRYGIAN:
if (record->event.pressed) {
set_single_persistent_default_layer(_PHRYGIAN);
}
break;
case LYDIAN:
if (record->event.pressed) {
set_single_persistent_default_layer(_LYDIAN);
}
break;
case MIXOLYDIAN:
if (record->event.pressed) {
set_single_persistent_default_layer(_MIXOLYDIAN);
}
break;
case AEOLIAN:
if (record->event.pressed) {
set_single_persistent_default_layer(_AEOLIAN);
}
break;
case LOCRIAN:
if (record->event.pressed) {
set_single_persistent_default_layer(_LOCRIAN);
}
break;
}
return true;
}
@@ -0,0 +1,14 @@
### Gherkin Midi
A gherkin midi layout that should cover most midi note playing needs.
A 3x8 grid of notes written bottom left to right upwards as notes for the selected mode, with octave and transpose note controls at the top. Menu accesses other mode layouts, persisted to keyboard settings, and a reset for firmware programming.
Modes are set by pressing Menu and their corresponding note from the C Ionian layout. That is, for Aeolian, press Menu and A 1. For Phrygian, press Menu and E 1.
#### Keyboard Default Layout
![](https://i.imgur.com/VNc0GsI.jpg)
Keyboard Editor Gist [link](https://gist.github.com/scottsheffield/c57859fe1a85d703f5387bf8ce41028c)
#### Glamour Shot
![](https://i.imgur.com/B3Q4JoU.jpg)
@@ -0,0 +1,8 @@
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = no # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no
MIDI_ENABLE = yes
+1 -1
View File
@@ -81,7 +81,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #endif // #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
+1 -1
View File
@@ -27,7 +27,7 @@
#define DESCRIPTION i75 15x5 ortholinear keyboard #define DESCRIPTION i75 15x5 ortholinear keyboard
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
+1 -1
View File
@@ -26,7 +26,7 @@
#endif #endif
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
+1 -1
View File
@@ -75,7 +75,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #endif // #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
+1 -1
View File
@@ -76,7 +76,7 @@
// #endif // #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
+1 -1
View File
@@ -60,7 +60,7 @@
#define RGBLIGHT_VAL_STEP 8 #define RGBLIGHT_VAL_STEP 8
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
+1 -1
View File
@@ -23,7 +23,7 @@
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Locking resynchronize hack */ /* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE #define LOCKING_RESYNC_ENABLE
+1 -1
View File
@@ -43,7 +43,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define BACKLIGHT_LEVELS 3 // #define BACKLIGHT_LEVELS 3
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
+1
View File
@@ -0,0 +1 @@
#include "8pack.h"
+11
View File
@@ -0,0 +1,11 @@
#pragma once
#include "quantum.h"
#ifdef KEYBOARD_8pack_rev11
#include "rev11.h"
#endif
#ifdef KEYBOARD_8pack_rev12
#include "rev12.h"
#endif
+39
View File
@@ -0,0 +1,39 @@
#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x2171
#define MANUFACTURER Charles Garcia
#define PRODUCT 8-Pack
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* 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
/* key matrix size */
#define MATRIX_ROWS 2
#define MATRIX_COLS 4
/* key matrix pins */
#define DIRECT_PINS { { F4, F5, F6, F7 }, { B1, B3, B2, B6 } }
#define BACKLIGHT_LED_COUNT 8
#undef BACKLIGHT_PIN
#define BACKLIGHT_PINS { D1, D0, D4, C6, D7, E6, B4, B5 }
#define BACKLIGHT_LEVELS 8
// ws2812 options
#define RGB_DI_PIN D2 // pin the DI on the ws2812 is hooked-up to
#define RGBLED_NUM 8 // number of LEDs
#define RGBLIGHT_ANIMATIONS
+21
View File
@@ -0,0 +1,21 @@
{
"keyboard_name": "8-Pack",
"url": "https://github.com/cgarcia2097/8-Pack",
"maintainer": "Charles Garcia",
"width": 4,
"height": 2,
"layouts": {
"LAYOUT": {
"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}
]
}
}
}
+12
View File
@@ -0,0 +1,12 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_V, KC_C, KC_X, MO(1),
KC_A, KC_S, KC_D, KC_F
),
[1] = LAYOUT(
RGB_TOG, RGB_RMOD, RGB_MOD, KC_NO,
RESET, BL_DEC, BL_INC, BL_TOGG
)
};
+13
View File
@@ -0,0 +1,13 @@
# 8-Pack Macropad
An open source 2x4 macropad designed by Charles Garcia.
Keyboard Maintainer: [Charles Garcia](https://github.com/cgarcia2097)
Hardware Supported: 8-Pack Macropad PCB
Hardware Availability: [8-Pack Github](https://github.com/cgarcia2097/8-Pack)
Make example for this keyboard (after setting up your build environment):
make 8pack: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).
+3
View File
@@ -0,0 +1,3 @@
#pragma once
#define DEVICE_VER 0x0001
+1
View File
@@ -0,0 +1 @@
#include "rev11.h"
+11
View File
@@ -0,0 +1,11 @@
#pragma once
#include "8pack.h"
#define LAYOUT( \
K00, K01, K02, K03, \
K10, K11, K12, K13 \
) { \
{ K13, K12, K11, K10 }, \
{ K03, K02, K01, K00 } \
}
View File
Whitespace-only changes.
+3
View File
@@ -0,0 +1,3 @@
#pragma once
#define DEVICE_VER 0x0002
+1
View File
@@ -0,0 +1 @@
#include "rev12.h"
+11
View File
@@ -0,0 +1,11 @@
#pragma once
#include "8pack.h"
#define LAYOUT( \
K00, K01, K02, K03, \
K10, K11, K12, K13 \
) { \
{ K03, K02, K01, K00 }, \
{ K13, K12, K11, K10 } \
}
View File
Whitespace-only changes.
+63
View File
@@ -0,0 +1,63 @@
# MCU name
MCU = atmega32u4
# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency in Hz. You can then use this symbol in your source code to
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
#
# This will be an integer division of F_USB below, as it is sourced by
# F_USB after it has run through any CPU prescalers. Note that this value
# does not *change* the processor frequency - it should merely be updated to
# reflect the processor speed set externally so that the code can use accurate
# software delays.
F_CPU = 16000000
#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH = AVR8
# Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the
# input clock frequency (before any prescaling is performed) in Hz. This value may
# differ from F_CPU if prescaling is used on the latter, and is required as the
# raw input clock is fed directly to the PLL sections of the AVR for high speed
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
# at the end, this will be done automatically to create a 32-bit value in your
# source code.
#
# If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# atmega32a bootloadHID
BOOTLOADER = caterina
# Build Options
# comment out to disable the options.
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = no # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
AUDIO_ENABLE = no
RGBLIGHT_ENABLE = yes
OLED_DRIVER_ENABLE = no
DEFAULT_FOLDER = 8pack/rev12
+1 -1
View File
@@ -75,7 +75,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
+1 -1
View File
@@ -28,7 +28,7 @@
#define BACKLIGHT_LEVELS 5 #define BACKLIGHT_LEVELS 5
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
+2 -3
View File
@@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DEVICE_VER 0x0001 #define DEVICE_VER 0x0001
#define MANUFACTURER Bit Trade One #define MANUFACTURER Bit Trade One
#define PRODUCT ADKB96 #define PRODUCT ADKB96
#define DESCRIPTION #define DESCRIPTION
/* key matrix size */ /* key matrix size */
// Rows are doubled-up // Rows are doubled-up
@@ -45,7 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define BACKLIGHT_LEVELS 3 // #define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
@@ -75,4 +75,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_ONESHOT //#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO //#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION //#define NO_ACTION_FUNCTION
+1 -2
View File
@@ -39,7 +39,7 @@
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
@@ -68,4 +68,3 @@
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 899 #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 899
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 125 #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 125
#define DYNAMIC_KEYMAP_MACRO_COUNT 16 #define DYNAMIC_KEYMAP_MACRO_COUNT 16
+2 -2
View File
@@ -80,7 +80,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #endif // #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
@@ -262,5 +262,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR = DYNAMIC_KEYMAP_EEPROM_ADDR + (DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2) // DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR = DYNAMIC_KEYMAP_EEPROM_ADDR + (DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2)
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 635 #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 635
// DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE = 1024 - DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR // DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE = 1024 - DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 389 #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 389
#define DYNAMIC_KEYMAP_MACRO_COUNT 16 #define DYNAMIC_KEYMAP_MACRO_COUNT 16
+1 -1
View File
@@ -89,7 +89,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #endif // #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
+1 -1
View File
@@ -51,7 +51,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define BACKLIGHT_LEVELS 3 #define BACKLIGHT_LEVELS 3
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
+4 -4
View File
@@ -7,10 +7,10 @@
#include "util.h" #include "util.h"
#include "matrix.h" #include "matrix.h"
#ifndef DEBOUNCING_DELAY #ifndef DEBOUNCE
# define DEBOUNCING_DELAY 5 # define DEBOUNCE 5
#endif #endif
static uint8_t debouncing = DEBOUNCING_DELAY; static uint8_t debouncing = DEBOUNCE;
static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix[MATRIX_ROWS];
static matrix_row_t matrix_debouncing[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS];
@@ -69,7 +69,7 @@ uint8_t matrix_scan(void) {
bool curr_bit = rows & (1<<row); bool curr_bit = rows & (1<<row);
if (prev_bit != curr_bit) { if (prev_bit != curr_bit) {
matrix_debouncing[row] ^= ((matrix_row_t)1<<col); matrix_debouncing[row] ^= ((matrix_row_t)1<<col);
debouncing = DEBOUNCING_DELAY; debouncing = DEBOUNCE;
} }
} }
unselect_cols(); unselect_cols();
+1 -1
View File
@@ -62,7 +62,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
+1 -1
View File
@@ -80,7 +80,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
+1 -1
View File
@@ -30,7 +30,7 @@
#endif #endif
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
+1 -1
View File
@@ -30,7 +30,7 @@
#endif #endif
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
+1 -1
View File
@@ -46,7 +46,7 @@
#endif #endif
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
+1 -1
View File
@@ -47,7 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
+1 -1
View File
@@ -47,7 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
+1 -1
View File
@@ -64,7 +64,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define BACKLIGHT_CUSTOM #define BACKLIGHT_CUSTOM
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
+1 -1
View File
@@ -47,7 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
+2 -2
View File
@@ -34,7 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define UNUSED_PINS {} #define UNUSED_PINS {}
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
#define NO_BACKLIGHT_CLOCK #define NO_BACKLIGHT_CLOCK
#define BACKLIGHT_LEVELS 1 #define BACKLIGHT_LEVELS 1
@@ -48,4 +48,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Bootmagic Lite key configuration */ /* Bootmagic Lite key configuration */
// #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_ROW 0
// #define BOOTMAGIC_LITE_COLUMN 0 // #define BOOTMAGIC_LITE_COLUMN 0
+1 -1
View File
@@ -23,7 +23,7 @@
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
+1 -1
View File
@@ -47,7 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
+1 -1
View File
@@ -47,7 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Backlight configuration /* Backlight configuration
*/ */
+1 -1
View File
@@ -52,7 +52,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
+1 -1
View File
@@ -37,7 +37,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
+1 -1
View File
@@ -59,7 +59,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define BACKLIGHT_LEVELS 3 //#define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
+1 -1
View File
@@ -47,7 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define BACKLIGHT_LEVELS 3 //#define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
@@ -71,7 +71,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define BACKLIGHT_LEVELS 3 //#define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
+1 -1
View File
@@ -62,7 +62,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define BACKLIGHT_LEVELS 3 //#define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
@@ -0,0 +1,49 @@
// this is the style you want to emulate.
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
#include 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 _QW 0
#define _RS 1
#define _LW 2
#define MY_SHEN MT(MOD_LSFT, KC_ENT)
#define MY_CTES MT(MOD_LCTL, KC_ESC)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QW] = LAYOUT( /* Qwerty */
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P ,
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN ,
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH ,
TT(_LW), KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, MY_CTES, KC_LALT, KC_SPC, TT(_RS), KC_MINS, KC_QUOT, MY_SHEN
),
/*
* ! @ up { } || pgup 7 8 9 *
* # left down right $ || pgdn 4 5 6 +
* [ ] ( ) & || ` 1 2 3 \
* lower insert super shift bksp ctrl || alt space fn . 0 =
*/
[_RS] = LAYOUT( /* [> RAISE <] */
KC_EXLM, KC_AT, KC_UP, KC_UNDS, KC_PLUS, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR ,
KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DLR, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS ,
KC_RBRC, KC_LBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS ,
TT(_LW), _______, _______, _______, _______, _______, _______, _______, TO(_QW), KC_DOT, KC_0, KC_EQL
),
/*
* insert home up end pgup || up F7 F8 F9 F10
* del left down right pgdn || down F4 F5 F6 F11
* volup reset || F1 F2 F3 F12
* voldn super shift next ctrl || alt space L0 prtsc scroll pause
*/
[_LW] = LAYOUT( /* [> LOWER <] */
KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 ,
KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 ,
KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, KC_TILD, KC_F1, KC_F2, KC_F3, KC_F12 ,
KC_NO, KC_VOLD, _______, _______, KC_MNXT, _______, _______, _______, TO(_QW), KC_PSCR, KC_SLCK, KC_MPLY
)
};
+1 -1
View File
@@ -48,7 +48,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define BACKLIGHT_LEVELS 3 // #define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
+1 -1
View File
@@ -23,7 +23,7 @@ void bootmagic_lite(void)
// We need multiple scans because debouncing can't be turned off. // We need multiple scans because debouncing can't be turned off.
matrix_scan(); matrix_scan();
wait_ms(DEBOUNCING_DELAY); wait_ms(DEBOUNCE);
matrix_scan(); matrix_scan();
// If the Esc and space bar are held down on power up, // If the Esc and space bar are held down on power up,
+1 -1
View File
@@ -62,7 +62,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #endif // #endif
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */ /* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
+1 -1
View File
@@ -49,7 +49,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define BACKLIGHT_LEVELS 3 #define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE #define LOCKING_SUPPORT_ENABLE
+1 -1
View File
@@ -35,7 +35,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define UNUSED_PINS #define UNUSED_PINS
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
#define DEBOUNCING_DELAY 5 #define DEBOUNCE 5
#define NO_BACKLIGHT_CLOCK #define NO_BACKLIGHT_CLOCK
#define BACKLIGHT_LEVELS 1 #define BACKLIGHT_LEVELS 1
+1 -1
View File
@@ -40,7 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION ROW2COL #define DIODE_DIRECTION ROW2COL
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 50 #define DEBOUNCE 50
/* key combination for command */ /* key combination for command */
#define IS_COMMAND() ( \ #define IS_COMMAND() ( \
+1 -1
View File
@@ -40,7 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION ROW2COL #define DIODE_DIRECTION ROW2COL
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 50 #define DEBOUNCE 50
/* key combination for command */ /* key combination for command */
#define IS_COMMAND() ( \ #define IS_COMMAND() ( \
+1 -1
View File
@@ -40,7 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION ROW2COL #define DIODE_DIRECTION ROW2COL
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 50 #define DEBOUNCE 50
/* key combination for command */ /* key combination for command */
#define IS_COMMAND() ( \ #define IS_COMMAND() ( \
+1 -1
View File
@@ -40,7 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION ROW2COL #define DIODE_DIRECTION ROW2COL
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 50 #define DEBOUNCE 50
/* key combination for command */ /* key combination for command */
#define IS_COMMAND() ( \ #define IS_COMMAND() ( \
+1 -1
View File
@@ -40,7 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION ROW2COL #define DIODE_DIRECTION ROW2COL
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 50 #define DEBOUNCE 50
/* key combination for command */ /* key combination for command */
#define IS_COMMAND() ( \ #define IS_COMMAND() ( \
Loaded 100 of 865 files, more files were not shown because too many files have changed in this diff. Show more