Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
46a84ec84a | ||
|
|
3b5998085c | ||
|
|
bc13dcd349 | ||
|
|
55002338b1 | ||
|
|
4a92dd327c | ||
|
|
7873b49d40 | ||
|
|
fcf2b45263 | ||
|
|
5607af8524 | ||
|
|
5a45627e17 | ||
|
|
17d0f6338e | ||
|
|
484c059d86 | ||
|
|
3cc68543ca | ||
|
|
daf6dedb02 | ||
|
|
e990863296 | ||
|
|
2ae39ccf38 | ||
|
|
5185c52b4a | ||
|
|
c0b99badcb | ||
|
|
f9bb9ef0b8 | ||
|
|
3d9ffd3efb | ||
|
|
3cea9fedff | ||
|
|
575d99816e | ||
|
|
4bccde37d4 | ||
|
|
f6b40da7f8 | ||
|
|
6fb048fdaf | ||
|
|
06b571aa53 | ||
|
|
355b693e4e | ||
|
|
f514ad5503 | ||
|
|
46e4493761 | ||
|
|
157d121c71 | ||
|
|
7e6b550ebf | ||
|
|
7f4ce4a8b7 | ||
|
|
6452973761 | ||
|
|
a2309b306a | ||
|
|
52ac6c4303 | ||
|
|
05e9ff6554 | ||
|
|
17bda000f3 | ||
|
|
46a69d1f3b | ||
|
|
b56a41800a | ||
|
|
d3c29c9b3c | ||
|
|
370577e4ed | ||
|
|
6e84247ec2 | ||
|
|
5380c29dd7 | ||
|
|
23f19852b9 | ||
|
|
8a5c1e1859 | ||
|
|
6265b78307 | ||
|
|
23124b9fd1 | ||
|
|
eb7fc7f9d9 | ||
|
|
c2df714c3b | ||
|
|
799b21f8cd | ||
|
|
750179e111 | ||
|
|
f538b2273a | ||
|
|
50e85f91e8 | ||
|
|
27e7f322a5 | ||
|
|
dfdc89296b | ||
|
|
671020af08 | ||
|
|
b8c3f4c60b | ||
|
|
511fe643c2 | ||
|
|
f7601dba13 | ||
|
|
89cab95b63 | ||
|
|
cc38627816 | ||
|
|
6c2c3c13e9 | ||
|
|
e4cc642a79 | ||
|
|
c3c3943432 | ||
|
|
061ed87b89 | ||
|
|
5c1aca0b88 | ||
|
|
6384a2abd8 | ||
|
|
439afc883a | ||
|
|
07c75feba3 | ||
|
|
b5aa5e4338 | ||
|
|
be8443b35b | ||
|
|
4b10235f67 | ||
|
|
6ef13f83e2 | ||
|
|
be2f5816b6 | ||
|
|
ff213d5fe1 | ||
|
|
3234118e52 | ||
|
|
a1ffc40b36 | ||
|
|
8fe5c718b4 | ||
|
|
38f14c4174 | ||
|
|
eb683c8c52 | ||
|
|
21799be1ca | ||
|
|
5cfc3ce02e | ||
|
|
724f20ed32 | ||
|
|
c61f016fa4 | ||
|
|
ea7e40bae1 | ||
|
|
974f83ec4b | ||
|
|
400ca2d035 | ||
|
|
e409fb47f2 | ||
|
|
ae74922d14 | ||
|
|
3349a8b49b | ||
|
|
b4ef72423e | ||
|
|
f4b67cde8a | ||
|
|
0a643be39e | ||
|
|
6c8e205fc0 | ||
|
|
7901006753 | ||
|
|
9bfa713421 | ||
|
|
b6fc3ad8e7 | ||
|
|
d1190df10b | ||
|
|
6add103827 | ||
|
|
7642075fc3 | ||
|
|
ca91dc594b | ||
|
|
26cb83b8c0 | ||
|
|
2392ddb76b | ||
|
|
6de77141a4 | ||
|
|
6f6c2e1c5c | ||
|
|
48cad94d7e | ||
|
|
90665aeec9 | ||
|
|
845953cc67 | ||
|
|
c3c2eb71e1 | ||
|
|
28a6a4a15b | ||
|
|
ccb37f673a | ||
|
|
c5efbc45a1 | ||
|
|
6a0d3c3517 | ||
|
|
2fbbac04bb | ||
|
|
04c81a04c7 | ||
|
|
120fcc58b6 | ||
|
|
2f15cb2126 | ||
|
|
8af156d976 | ||
|
|
70b5015162 | ||
|
|
3fad3854d6 | ||
|
|
38d7145da2 | ||
|
|
6e8876be39 | ||
|
|
0bb2924670 | ||
|
|
2f623daa45 | ||
|
|
ebbaba9001 | ||
|
|
5f35b07102 | ||
|
|
781308507d | ||
|
|
3fe8d604a4 |
No files matched your search
@@ -1,24 +0,0 @@
|
|||||||
|
|
||||||
-I.
|
|
||||||
-I./drivers
|
|
||||||
-I./drivers/avr
|
|
||||||
-I./keyboards/ergodox_ez
|
|
||||||
-I./keyboards/ergodox_ez/keymaps/vim
|
|
||||||
-I./lib
|
|
||||||
-I./lib/lufa
|
|
||||||
-I./quantum
|
|
||||||
-I./quantum/api
|
|
||||||
-I./quantum/audio
|
|
||||||
-I./quantum/keymap_extras
|
|
||||||
-I./quantum/process_keycode
|
|
||||||
-I./quantum/serial_link
|
|
||||||
-I./quantum/template
|
|
||||||
-I./quantum/tools
|
|
||||||
-I./quantum/visualizer
|
|
||||||
-I./tmk_core
|
|
||||||
-I./tmk_core/common
|
|
||||||
-I./tmk_core/common/debug.h
|
|
||||||
-I./tmk_core/protocol
|
|
||||||
-I./tmk_core/protocol/lufa
|
|
||||||
-I./util
|
|
||||||
-DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\"
|
|
||||||
+1
-1
@@ -24,6 +24,7 @@ quantum/version.h
|
|||||||
.idea/
|
.idea/
|
||||||
CMakeLists.txt
|
CMakeLists.txt
|
||||||
cmake-build-debug
|
cmake-build-debug
|
||||||
|
.clang_complete
|
||||||
doxygen/
|
doxygen/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
/util/wsl_downloaded
|
/util/wsl_downloaded
|
||||||
@@ -47,7 +48,6 @@ doxygen/
|
|||||||
*.iml
|
*.iml
|
||||||
.browse.VC.db*
|
.browse.VC.db*
|
||||||
*.stackdump
|
*.stackdump
|
||||||
util/Win_Check_Output.txt
|
|
||||||
# Let these ones be user specific, since we have so many different configurations
|
# Let these ones be user specific, since we have so many different configurations
|
||||||
.vscode/c_cpp_properties.json
|
.vscode/c_cpp_properties.json
|
||||||
.vscode/launch.json
|
.vscode/launch.json
|
||||||
|
|||||||
Vendored
+12
-8
@@ -9,13 +9,17 @@
|
|||||||
"**/*.bin": true
|
"**/*.bin": true
|
||||||
},
|
},
|
||||||
"files.associations": {
|
"files.associations": {
|
||||||
"*.h": "c",
|
"*.h": "c",
|
||||||
"*.c": "c",
|
"*.c": "c",
|
||||||
"*.inc": "c",
|
"*.inc": "c",
|
||||||
"*.cpp": "cpp",
|
"*.cpp": "cpp",
|
||||||
"*.hpp": "cpp",
|
"*.hpp": "cpp",
|
||||||
"xstddef": "c",
|
"xstddef": "c",
|
||||||
"type_traits": "c",
|
"type_traits": "c",
|
||||||
"utility": "c"
|
"utility": "c"
|
||||||
|
},
|
||||||
|
"[markdown]": {
|
||||||
|
"editor.trimAutoWhitespace": false,
|
||||||
|
"files.trimTrailingWhitespace": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1 +0,0 @@
|
|||||||
complete -W " 9key-default alps64-default amj40-default amj40-fabian amj60-default_60_ansi amj60-iso_split_rshift amj60-maximized amjpad-default amjpad-max amjpad-ortho_left amjpad-ortho_right atomic-default atomic-default_ortho_5x15 atomic-pvc atreus-alphadox atreus-classic atreus-default atreus-erlandsona atreus-gerb atreus-jeremy atreus-replicaJunction atreus-xyverz atreus62-atreus52 atreus62-default atreus62-mneme atreus62-xyverz bananasplit-0010 bananasplit-coloneljesus bananasplit-default bananasplit-hhkbanana bananasplit-nic bananasplit-rask bantam44-default chibios_test-default clueboard-bloodlvst clueboard-caps_fn clueboard-colemak clueboard-default clueboard-jokrik clueboard-mac_optimized clueboard-magicmonty clueboard-maximised clueboard-mouse_keys clueboard-serubin clueboard-shift_fn clueboard-skully clueboard-smt clueboard-tetris clueboard-unix_optimized clueboard-win_optimized clueboard-xyverz cluecard-default cluecard-rgb_effects cluepad-default deltasplit75-default deltasplit75-itsaferbie deltasplit75-protosplit dk60-default eco-default eco-that_canadian ergodone-333fred ergodone-ab ergodone-absenth ergodone-adam ergodone-adnw_k_o_y ergodone-albert ergodone-alexjj ergodone-algernon ergodone-alphadox ergodone-andrew_osx ergodone-belak ergodone-bepo ergodone-bepo_csa ergodone-bryan ergodone-coderkun_neo2 ergodone-colemak ergodone-colemak_osx_pc_no ergodone-colemak_programmer ergodone-common_nighthawk ergodone-csharp_dev ergodone-dave ergodone-deadcyclo ergodone-default ergodone-default_ergodox ergodone-dragon788 ergodone-dvorak ergodone-dvorak_emacs ergodone-dvorak_emacs_software ergodone-dvorak_intl_squisher ergodone-dvorak_plover ergodone-dvorak_programmer ergodone-dvorak_programmer_swe ergodone-dvorak_spanish ergodone-emacs_osx_dk ergodone-erez_experimental ergodone-familiar ergodone-french_hacker ergodone-galson ergodone-german ergodone-german-kinergo ergodone-german-lukas ergodone-german-manuneo ergodone-guni ergodone-ishigoya-jp ergodone-italian ergodone-j3rn ergodone-jack ergodone-jacobono ergodone-jafo ergodone-jgarr ergodone-josh ergodone-kastyle ergodone-kines-ish ergodone-kristian ergodone-maz ergodone-mclennon_osx ergodone-mpiechotka ergodone-msc ergodone-naps62 ergodone-neo2_on_qwertz_hardware ergodone-norwegian_programmer_osx_pc ergodone-norwegian_programmer_osx_pc_colemak ergodone-ordinary ergodone-osx_de ergodone-osx_de_adnw_koy ergodone-osx_de_experimental ergodone-osx_fr ergodone-osx_kinesis_pnut ergodone-osx_whiskey_tango_foxtrot_capslock ergodone-phoenix ergodone-plover ergodone-plums ergodone-pvinis ergodone-replicaJunction ergodone-reset_eeprom ergodone-robot_test_layout ergodone-romanzolotarev-norman-osx ergodone-romanzolotarev-norman-plover-osx ergodone-romanzolotarev-norman-plover-osx-hjkl ergodone-romanzolotarev-norman-qwerty-osx ergodone-sethbc ergodone-siroken3 ergodone-sneako ergodone-software_neo2 ergodone-supercoder ergodone-swedish ergodone-swedish-lindhe ergodone-swissgerman ergodone-techtomas ergodone-teckinesis ergodone-tkuichooseyou ergodone-tm2030 ergodone-tonyabra_osx ergodone-townk_osx ergodone-twentylives_dvorak_with_hebrew ergodone-twey ergodone-videck ergodone-win10_writers-block ergodone-workman_osx_mdw ergodone-xyverz ergodone-yoruian ergodone-zweihander-osx ergodox_ez-333fred ergodox_ez-ab ergodox_ez-absenth ergodox_ez-adam ergodox_ez-adnw_k_o_y ergodox_ez-albert ergodox_ez-alexjj ergodox_ez-algernon ergodox_ez-alphadox ergodox_ez-andrew_osx ergodox_ez-belak ergodox_ez-bepo ergodox_ez-bepo_csa ergodox_ez-blakedietz ergodox_ez-bryan ergodox_ez-coderkun_neo2 ergodox_ez-colemak ergodox_ez-colemak_osx_pc_no ergodox_ez-colemak_programmer ergodox_ez-common_nighthawk ergodox_ez-csharp_dev ergodox_ez-dave ergodox_ez-deadcyclo ergodox_ez-default ergodox_ez-default_ergodox ergodox_ez-default_osx ergodox_ez-dragon788 ergodox_ez-drashna ergodox_ez-drashna-custom ergodox_ez-dvorak ergodox_ez-dvorak_emacs ergodox_ez-dvorak_emacs_software ergodox_ez-dvorak_intl_squisher ergodox_ez-dvorak_plover ergodox_ez-dvorak_programmer ergodox_ez-dvorak_programmer_swe ergodox_ez-dvorak_spanish ergodox_ez-emacs_osx_dk ergodox_ez-erez_experimental ergodox_ez-familiar ergodox_ez-french_hacker ergodox_ez-galson ergodox_ez-german ergodox_ez-german-kinergo ergodox_ez-german-lukas ergodox_ez-german-manuneo ergodox_ez-guni ergodox_ez-ishigoya-jp ergodox_ez-italian ergodox_ez-j3rn ergodox_ez-jack ergodox_ez-jacobono ergodox_ez-jafo ergodox_ez-jgarr ergodox_ez-josh ergodox_ez-kastyle ergodox_ez-kines-ish ergodox_ez-kristian ergodox_ez-maz ergodox_ez-mclennon_osx ergodox_ez-mpiechotka ergodox_ez-msc ergodox_ez-naps62 ergodox_ez-neo2_on_qwertz_hardware ergodox_ez-norwegian_programmer_osx_pc ergodox_ez-norwegian_programmer_osx_pc_colemak ergodox_ez-ordinary ergodox_ez-osx_de ergodox_ez-osx_de_adnw_koy ergodox_ez-osx_de_experimental ergodox_ez-osx_fr ergodox_ez-osx_kinesis_pnut ergodox_ez-osx_whiskey_tango_foxtrot_capslock ergodox_ez-phoenix ergodox_ez-plover ergodox_ez-plums ergodox_ez-prLine truncated
|
|
||||||
@@ -4,38 +4,59 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from importlib.util import find_spec
|
from importlib.util import find_spec
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
# Add the QMK python libs to our path
|
# Add the QMK python libs to our path
|
||||||
script_dir = os.path.dirname(os.path.realpath(__file__))
|
script_dir = Path(os.path.realpath(__file__)).parent
|
||||||
qmk_dir = os.path.abspath(os.path.join(script_dir, '..'))
|
qmk_dir = script_dir.parent
|
||||||
python_lib_dir = os.path.abspath(os.path.join(qmk_dir, 'lib', 'python'))
|
python_lib_dir = Path(qmk_dir / 'lib' / 'python').resolve()
|
||||||
sys.path.append(python_lib_dir)
|
sys.path.append(str(python_lib_dir))
|
||||||
|
|
||||||
# Make sure our modules have been setup
|
|
||||||
with open(os.path.join(qmk_dir, 'requirements.txt'), 'r') as fd:
|
|
||||||
for line in fd.readlines():
|
|
||||||
line = line.strip().replace('<', '=').replace('>', '=')
|
|
||||||
|
|
||||||
if line[0] == '#':
|
def _check_modules(requirements):
|
||||||
continue
|
""" Check if the modules in the given requirements.txt are available.
|
||||||
|
"""
|
||||||
|
with Path(qmk_dir / requirements).open() as fd:
|
||||||
|
for line in fd.readlines():
|
||||||
|
line = line.strip().replace('<', '=').replace('>', '=')
|
||||||
|
|
||||||
if '#' in line:
|
if len(line) == 0 or line[0] == '#' or line.startswith('-r'):
|
||||||
line = line.split('#')[0]
|
continue
|
||||||
|
|
||||||
module = line.split('=')[0] if '=' in line else line
|
if '#' in line:
|
||||||
|
line = line.split('#')[0]
|
||||||
|
|
||||||
|
module = dict()
|
||||||
|
module['name'] = module['import'] = line.split('=')[0] if '=' in line else line
|
||||||
|
|
||||||
if module in ['pep8-naming']:
|
|
||||||
# Not every module is importable by its own name.
|
# Not every module is importable by its own name.
|
||||||
continue
|
if module['name'] == "pep8-naming":
|
||||||
|
module['import'] = "pep8ext_naming"
|
||||||
|
|
||||||
if not find_spec(module):
|
if not find_spec(module['import']):
|
||||||
print('Could not find module %s!' % module)
|
print('Could not find module %s!' % module['name'])
|
||||||
print('Please run `pip3 install -r requirements.txt` to install the python dependencies.')
|
print('Please run `python3 -m pip install -r %s` to install required python dependencies.' % str(qmk_dir / requirements))
|
||||||
exit(255)
|
if developer:
|
||||||
|
print('You can also turn off developer mode: qmk config user.developer=None')
|
||||||
|
print()
|
||||||
|
exit(255)
|
||||||
|
|
||||||
|
|
||||||
|
developer = False
|
||||||
|
# Make sure our modules have been setup
|
||||||
|
_check_modules('requirements.txt')
|
||||||
|
|
||||||
# Setup the CLI
|
# Setup the CLI
|
||||||
import milc # noqa
|
import milc # noqa
|
||||||
|
|
||||||
|
# For developers additional modules are needed
|
||||||
|
if milc.cli.config.user.developer:
|
||||||
|
# Do not run the check for 'config',
|
||||||
|
# so users can turn off developer mode
|
||||||
|
if len(sys.argv) == 1 or (len(sys.argv) > 1 and 'config' != sys.argv[1]):
|
||||||
|
developer = True
|
||||||
|
_check_modules('requirements-dev.txt')
|
||||||
|
|
||||||
milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}Ψ{style_reset_all}'
|
milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}Ψ{style_reset_all}'
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,11 @@ else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.json)","")
|
|||||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
|
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Load the keymap-level rules.mk if exists
|
||||||
|
ifneq ("$(wildcard $(KEYMAP_PATH))", "")
|
||||||
|
-include $(KEYMAP_PATH)/rules.mk
|
||||||
|
endif
|
||||||
|
|
||||||
# Generate the keymap.c
|
# Generate the keymap.c
|
||||||
$(KEYBOARD_OUTPUT)/src/keymap.c: $(KEYMAP_JSON)
|
$(KEYBOARD_OUTPUT)/src/keymap.c: $(KEYMAP_JSON)
|
||||||
bin/qmk json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)
|
bin/qmk json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)
|
||||||
@@ -121,6 +121,7 @@
|
|||||||
* [Drivers](hardware_drivers.md)
|
* [Drivers](hardware_drivers.md)
|
||||||
* [ADC Driver](adc_driver.md)
|
* [ADC Driver](adc_driver.md)
|
||||||
* [I2C Driver](i2c_driver.md)
|
* [I2C Driver](i2c_driver.md)
|
||||||
|
* [SPI Driver](spi_driver.md)
|
||||||
* [WS2812 Driver](ws2812_driver.md)
|
* [WS2812 Driver](ws2812_driver.md)
|
||||||
* [EEPROM Driver](eeprom_driver.md)
|
* [EEPROM Driver](eeprom_driver.md)
|
||||||
* [GPIO Controls](internals_gpio_control.md)
|
* [GPIO Controls](internals_gpio_control.md)
|
||||||
@@ -135,6 +136,10 @@
|
|||||||
* [Development Environment](api_development_environment.md)
|
* [Development Environment](api_development_environment.md)
|
||||||
* [Architecture Overview](api_development_overview.md)
|
* [Architecture Overview](api_development_overview.md)
|
||||||
|
|
||||||
|
* Hardware Platform Development
|
||||||
|
* Arm/ChibiOS
|
||||||
|
* [Early initialization](platformdev_chibios_earlyinit.md)
|
||||||
|
|
||||||
* QMK Reference
|
* QMK Reference
|
||||||
* [Contributing to QMK](contributing.md)
|
* [Contributing to QMK](contributing.md)
|
||||||
* [Translating the QMK Docs](translating.md)
|
* [Translating the QMK Docs](translating.md)
|
||||||
|
|||||||
+70
-65
@@ -1,38 +1,6 @@
|
|||||||
# QMK CLI Commands
|
# QMK CLI Commands
|
||||||
|
|
||||||
# CLI Commands
|
# User Commands
|
||||||
|
|
||||||
## `qmk cformat`
|
|
||||||
|
|
||||||
This command formats C code using clang-format.
|
|
||||||
|
|
||||||
Run it with no arguments to format all core code that has been changed. Default checks `origin/master` with `git diff`, branch can be changed using `-b <branch_name>`
|
|
||||||
|
|
||||||
Run it with `-a` to format all core code, or pass filenames on the command line to run it on specific files.
|
|
||||||
|
|
||||||
**Usage for specified files**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk cformat [file1] [file2] [...] [fileN]
|
|
||||||
```
|
|
||||||
|
|
||||||
**Usage for all core files**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk cformat -a
|
|
||||||
```
|
|
||||||
|
|
||||||
**Usage for only changed files against origin/master**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk cformat
|
|
||||||
```
|
|
||||||
|
|
||||||
**Usage for only changed files against branch_name**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk cformat -b branch_name
|
|
||||||
```
|
|
||||||
|
|
||||||
## `qmk compile`
|
## `qmk compile`
|
||||||
|
|
||||||
@@ -136,16 +104,6 @@ This command lets you configure the behavior of QMK. For the full `qmk config` d
|
|||||||
qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN]
|
qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN]
|
||||||
```
|
```
|
||||||
|
|
||||||
## `qmk docs`
|
|
||||||
|
|
||||||
This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936.
|
|
||||||
|
|
||||||
**Usage**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk docs [-p PORT]
|
|
||||||
```
|
|
||||||
|
|
||||||
## `qmk doctor`
|
## `qmk doctor`
|
||||||
|
|
||||||
This command examines your environment and alerts you to potential build or flash problems. It can fix many of them if you want it to.
|
This command examines your environment and alerts you to potential build or flash problems. It can fix many of them if you want it to.
|
||||||
@@ -180,28 +138,6 @@ Creates a keymap.c from a QMK Configurator export.
|
|||||||
qmk json2c [-o OUTPUT] filename
|
qmk json2c [-o OUTPUT] filename
|
||||||
```
|
```
|
||||||
|
|
||||||
## `qmk kle2json`
|
|
||||||
|
|
||||||
This command allows you to convert from raw KLE data to QMK Configurator JSON. It accepts either an absolute file path, or a file name in the current directory. By default it will not overwrite `info.json` if it is already present. Use the `-f` or `--force` flag to overwrite.
|
|
||||||
|
|
||||||
**Usage**:
|
|
||||||
|
|
||||||
```
|
|
||||||
qmk kle2json [-f] <filename>
|
|
||||||
```
|
|
||||||
|
|
||||||
**Examples**:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ qmk kle2json kle.txt
|
|
||||||
☒ File info.json already exists, use -f or --force to overwrite.
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
$ qmk kle2json -f kle.txt -f
|
|
||||||
Ψ Wrote out to info.json
|
|
||||||
```
|
|
||||||
|
|
||||||
## `qmk list-keyboards`
|
## `qmk list-keyboards`
|
||||||
|
|
||||||
This command lists all the keyboards currently defined in `qmk_firmware`
|
This command lists all the keyboards currently defined in `qmk_firmware`
|
||||||
@@ -232,6 +168,74 @@ This command creates a new keymap based on a keyboard's existing default keymap.
|
|||||||
qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]
|
qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Developer Commands
|
||||||
|
|
||||||
|
## `qmk cformat`
|
||||||
|
|
||||||
|
This command formats C code using clang-format.
|
||||||
|
|
||||||
|
Run it with no arguments to format all core code that has been changed. Default checks `origin/master` with `git diff`, branch can be changed using `-b <branch_name>`
|
||||||
|
|
||||||
|
Run it with `-a` to format all core code, or pass filenames on the command line to run it on specific files.
|
||||||
|
|
||||||
|
**Usage for specified files**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk cformat [file1] [file2] [...] [fileN]
|
||||||
|
```
|
||||||
|
|
||||||
|
**Usage for all core files**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk cformat -a
|
||||||
|
```
|
||||||
|
|
||||||
|
**Usage for only changed files against origin/master**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk cformat
|
||||||
|
```
|
||||||
|
|
||||||
|
**Usage for only changed files against branch_name**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk cformat -b branch_name
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk docs`
|
||||||
|
|
||||||
|
This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936.
|
||||||
|
|
||||||
|
**Usage**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk docs [-p PORT]
|
||||||
|
```
|
||||||
|
|
||||||
|
## `qmk kle2json`
|
||||||
|
|
||||||
|
This command allows you to convert from raw KLE data to QMK Configurator JSON. It accepts either an absolute file path, or a file name in the current directory. By default it will not overwrite `info.json` if it is already present. Use the `-f` or `--force` flag to overwrite.
|
||||||
|
|
||||||
|
**Usage**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk kle2json [-f] <filename>
|
||||||
|
```
|
||||||
|
|
||||||
|
**Examples**:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ qmk kle2json kle.txt
|
||||||
|
☒ File info.json already exists, use -f or --force to overwrite.
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
$ qmk kle2json -f kle.txt -f
|
||||||
|
Ψ Wrote out to info.json
|
||||||
|
```
|
||||||
|
|
||||||
## `qmk pyformat`
|
## `qmk pyformat`
|
||||||
|
|
||||||
This command formats python code in `qmk_firmware`.
|
This command formats python code in `qmk_firmware`.
|
||||||
@@ -251,3 +255,4 @@ This command runs the python test suite. If you make changes to python code you
|
|||||||
```
|
```
|
||||||
qmk pytest
|
qmk pytest
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -6,6 +6,18 @@ This document has useful information for developers wishing to write new `qmk` s
|
|||||||
|
|
||||||
The QMK CLI operates using the subcommand pattern made famous by git. The main `qmk` script is simply there to setup the environment and pick the correct entrypoint to run. Each subcommand is a self-contained module with an entrypoint (decorated by `@cli.subcommand()`) that performs some action and returns a shell returncode, or None.
|
The QMK CLI operates using the subcommand pattern made famous by git. The main `qmk` script is simply there to setup the environment and pick the correct entrypoint to run. Each subcommand is a self-contained module with an entrypoint (decorated by `@cli.subcommand()`) that performs some action and returns a shell returncode, or None.
|
||||||
|
|
||||||
|
## Developer mode:
|
||||||
|
|
||||||
|
If you intend to maintain keyboards and/or contribute to QMK, you can enable the CLI's "Developer" mode:
|
||||||
|
|
||||||
|
`qmk config user.developer=True`
|
||||||
|
|
||||||
|
This will allow you to see all available subcommands.
|
||||||
|
**Note:** You will have to install additional requirements:
|
||||||
|
```bash
|
||||||
|
python3 -m pip install -r requirements-dev.txt
|
||||||
|
```
|
||||||
|
|
||||||
# Subcommands
|
# Subcommands
|
||||||
|
|
||||||
[MILC](https://github.com/clueboard/milc) is the CLI framework `qmk` uses to handle argument parsing, configuration, logging, and many other features. It lets you focus on writing your tool without wasting your time writing glue code.
|
[MILC](https://github.com/clueboard/milc) is the CLI framework `qmk` uses to handle argument parsing, configuration, logging, and many other features. It lets you focus on writing your tool without wasting your time writing glue code.
|
||||||
|
|||||||
@@ -20,11 +20,11 @@ Most of our style is pretty easy to pick up on, but right now it's not entirely
|
|||||||
* We accept both forms of preprocessor if's: `#ifdef DEFINED` and `#if defined(DEFINED)`
|
* We accept both forms of preprocessor if's: `#ifdef DEFINED` and `#if defined(DEFINED)`
|
||||||
* If you are not sure which to prefer use the `#if defined(DEFINED)` form.
|
* If you are not sure which to prefer use the `#if defined(DEFINED)` form.
|
||||||
* Do not change existing code from one style to the other, except when moving to a multiple condition `#if`.
|
* Do not change existing code from one style to the other, except when moving to a multiple condition `#if`.
|
||||||
* Do not put whitespace between `#` and `if`.
|
* When deciding how (or if) to indent preprocessor directives, keep these points in mind:
|
||||||
* When deciding how (or if) to indent directives keep these points in mind:
|
* Readability is more important than consistency.
|
||||||
* Readability is more important than consistency.
|
* Follow the file's existing style. If the file is mixed, follow the style that makes sense for the section you are modifying.
|
||||||
* Follow the file's existing style. If the file is mixed follow the style that makes sense for the section you are modifying.
|
* When indenting, keep the hash at the start of the line and add whitespace between `#` and `if`, starting with 4 spaces after the `#`.
|
||||||
* When choosing to indent you can follow the indention level of the surrounding C code, or preprocessor directives can have their own indent level. Choose the style that best communicates the intent of your code.
|
* You can follow the indention level of the surrounding C code, or preprocessor directives can have their own indentation levels. Choose the style that best communicates the intent of your code.
|
||||||
|
|
||||||
Here is an example for easy reference:
|
Here is an example for easy reference:
|
||||||
|
|
||||||
|
|||||||
@@ -115,9 +115,9 @@ If you define these options you will disable the associated feature, which can s
|
|||||||
* `#define NO_ACTION_ONESHOT`
|
* `#define NO_ACTION_ONESHOT`
|
||||||
* disable one-shot modifiers
|
* disable one-shot modifiers
|
||||||
* `#define NO_ACTION_MACRO`
|
* `#define NO_ACTION_MACRO`
|
||||||
* disable old style macro handling: MACRO() & action_get_macro
|
* disable old-style macro handling using `MACRO()`, `action_get_macro()` _(deprecated)_
|
||||||
* `#define NO_ACTION_FUNCTION`
|
* `#define NO_ACTION_FUNCTION`
|
||||||
* disable calling of action_function() from the fn_actions array (deprecated)
|
* disable old-style function handling using `fn_actions`, `action_function()` _(deprecated)_
|
||||||
|
|
||||||
## Features That Can Be Enabled
|
## Features That Can Be Enabled
|
||||||
|
|
||||||
@@ -317,10 +317,10 @@ This is a [make](https://www.gnu.org/software/make/manual/make.html) file that i
|
|||||||
* `LAYOUTS`
|
* `LAYOUTS`
|
||||||
* A list of [layouts](feature_layouts.md) this keyboard supports.
|
* A list of [layouts](feature_layouts.md) this keyboard supports.
|
||||||
* `LINK_TIME_OPTIMIZATION_ENABLE`
|
* `LINK_TIME_OPTIMIZATION_ENABLE`
|
||||||
* Enables Link Time Optimization (`LTO`) when compiling the keyboard. This makes the process take longer, but can significantly reduce the compiled size (and since the firmware is small, the added time is not noticeable). However, this will automatically disable the old Macros and Functions features automatically, as these break when `LTO` is enabled.
|
* Enables Link Time Optimization (LTO) when compiling the keyboard. This makes the process take longer, but it can significantly reduce the compiled size (and since the firmware is small, the added time is not noticeable).
|
||||||
It does this by automatically defining `NO_ACTION_MACRO` and `NO_ACTION_FUNCTION`
|
However, this will automatically disable the legacy TMK Macros and Functions features, as these break when LTO is enabled. It does this by automatically defining `NO_ACTION_MACRO` and `NO_ACTION_FUNCTION`. (Note: This does not affect QMK [Macros](feature_macros.md) and [Layers](feature_layers.md).)
|
||||||
* `LTO_ENABLE`
|
* `LTO_ENABLE`
|
||||||
* It has the same meaning as LINK_TIME_OPTIMIZATION_ENABLE. You can use `LTO_ENABLE` instead of `LINK_TIME_OPTIMIZATION_ENABLE`.
|
* Has the same meaning as `LINK_TIME_OPTIMIZATION_ENABLE`. You can use `LTO_ENABLE` instead of `LINK_TIME_OPTIMIZATION_ENABLE`.
|
||||||
|
|
||||||
## AVR MCU Options
|
## AVR MCU Options
|
||||||
* `MCU = atmega32u4`
|
* `MCU = atmega32u4`
|
||||||
|
|||||||
@@ -98,6 +98,7 @@
|
|||||||
* [ISP Flashing Guide](de/isp_flashing_guide.md)
|
* [ISP Flashing Guide](de/isp_flashing_guide.md)
|
||||||
* [ARM Debugging Guide](de/arm_debugging.md)
|
* [ARM Debugging Guide](de/arm_debugging.md)
|
||||||
* [I2C Driver](de/i2c_driver.md)
|
* [I2C Driver](de/i2c_driver.md)
|
||||||
|
* [SPI Driver](de/spi_driver.md)
|
||||||
* [GPIO Controls](de/internals_gpio_control.md)
|
* [GPIO Controls](de/internals_gpio_control.md)
|
||||||
* [Proton C Conversion](de/proton_c_conversion.md)
|
* [Proton C Conversion](de/proton_c_conversion.md)
|
||||||
|
|
||||||
|
|||||||
@@ -98,6 +98,7 @@
|
|||||||
* [Guía de flasheado de ISP](es/isp_flashing_guide.md)
|
* [Guía de flasheado de ISP](es/isp_flashing_guide.md)
|
||||||
* [Guía de depuración de ARM](es/arm_debugging.md)
|
* [Guía de depuración de ARM](es/arm_debugging.md)
|
||||||
* [Driver I2C](es/i2c_driver.md)
|
* [Driver I2C](es/i2c_driver.md)
|
||||||
|
* [Driver SPI](es/spi_driver.md)
|
||||||
* [Controles GPIO](es/internals_gpio_control.md)
|
* [Controles GPIO](es/internals_gpio_control.md)
|
||||||
* [Conversión Proton C](es/proton_c_conversion.md)
|
* [Conversión Proton C](es/proton_c_conversion.md)
|
||||||
|
|
||||||
|
|||||||
@@ -160,10 +160,3 @@ As of now root of its cause is not clear but some build options seem to be relat
|
|||||||
|
|
||||||
https://github.com/tmk/tmk_keyboard/issues/266
|
https://github.com/tmk/tmk_keyboard/issues/266
|
||||||
https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778
|
https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## FLIP Doesn't Work
|
|
||||||
### `AtLibUsbDfu.dll` Not Found
|
|
||||||
Remove current driver and reinstall one FLIP provides from DeviceManager.
|
|
||||||
http://imgur.com/a/bnwzy
|
|
||||||
@@ -6,11 +6,11 @@ These allow you to combine a modifier with a keycode. When pressed, the keydown
|
|||||||
|----------|-------------------------------|----------------------------------------------------|
|
|----------|-------------------------------|----------------------------------------------------|
|
||||||
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
|
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
|
||||||
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
||||||
|`LALT(kc)`|`A(kc)` |Hold Left Alt and press `kc` |
|
|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` |
|
||||||
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
||||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||||
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
||||||
|`RALT(kc)`|`ALGR(kc)` |Hold Right Alt and press `kc` |
|
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` |
|
||||||
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` |
|
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` |
|
||||||
|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` |
|
|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` |
|
||||||
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|
||||||
@@ -18,7 +18,7 @@ These allow you to combine a modifier with a keycode. When pressed, the keydown
|
|||||||
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|
||||||
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`|
|
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`|
|
||||||
|
|
||||||
You can also chain them, for example `LCTL(LALT(KC_DEL))` makes a key that sends Control+Alt+Delete with a single keypress.
|
You can also chain them, for example `LCTL(LALT(KC_DEL))` or `C(A(KC_DEL))` makes a key that sends Control+Alt+Delete with a single keypress.
|
||||||
|
|
||||||
# Legacy Content :id=legacy-content
|
# Legacy Content :id=legacy-content
|
||||||
|
|
||||||
|
|||||||
@@ -38,5 +38,6 @@ For use in keyboards where refreshing ```NUM_KEYS``` 8-bit counters is computati
|
|||||||
appropriate for the ErgoDox models; the matrix is rotated 90°, and hence its "rows" are really columns, and each finger only hits a single "row" at a time in normal use.
|
appropriate for the ErgoDox models; the matrix is rotated 90°, and hence its "rows" are really columns, and each finger only hits a single "row" at a time in normal use.
|
||||||
* eager_pk - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key
|
* eager_pk - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key
|
||||||
* sym_g - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE``` milliseconds of no changes has occured, all input changes are pushed.
|
* sym_g - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE``` milliseconds of no changes has occured, all input changes are pushed.
|
||||||
|
* sym_pk - debouncing per key. On any state change, a per-key timer is set. When ```DEBOUNCE``` milliseconds of no changes have occured on that key, the key status change is pushed.
|
||||||
|
|
||||||
|
|
||||||
@@ -161,11 +161,11 @@ There's also a couple of mod shortcuts you can use:
|
|||||||
|
|
||||||
* `SS_LCTL(string)`
|
* `SS_LCTL(string)`
|
||||||
* `SS_LSFT(string)`
|
* `SS_LSFT(string)`
|
||||||
* `SS_LALT(string)`
|
* `SS_LALT(string)` or `SS_LOPT(string)`
|
||||||
* `SS_LGUI(string)`, `SS_LCMD(string)` or `SS_LWIN(string)`
|
* `SS_LGUI(string)`, `SS_LCMD(string)` or `SS_LWIN(string)`
|
||||||
* `SS_RCTL(string)`
|
* `SS_RCTL(string)`
|
||||||
* `SS_RSFT(string)`
|
* `SS_RSFT(string)`
|
||||||
* `SS_RALT(string)` or `SS_ALGR(string)`
|
* `SS_RALT(string)`, `SS_ROPT(string)` or `SS_ALGR(string)`
|
||||||
* `SS_RGUI(string)`, `SS_RCMD(string)` or `SS_RWIN(string)`
|
* `SS_RGUI(string)`, `SS_RCMD(string)` or `SS_RWIN(string)`
|
||||||
|
|
||||||
These press the respective modifier, send the supplied string and then release the modifier.
|
These press the respective modifier, send the supplied string and then release the modifier.
|
||||||
|
|||||||
@@ -266,6 +266,25 @@ To reverse the scroll axes you can put:
|
|||||||
|
|
||||||
into config.h.
|
into config.h.
|
||||||
|
|
||||||
|
### Rotate Mouse Axes :id=rotate-mouse-axes
|
||||||
|
|
||||||
|
Transform the output of the device with a clockwise rotation of 90, 180, or 270
|
||||||
|
degrees.
|
||||||
|
|
||||||
|
When compensating for device orientation, rotate the output the same amount in
|
||||||
|
the opposite direction. E.g. if the normal device orientation is considered to
|
||||||
|
be North-facing, compensate as follows:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define PS2_MOUSE_ROTATE 270 /* Compensate for East-facing device orientation. */
|
||||||
|
```
|
||||||
|
```c
|
||||||
|
#define PS2_MOUSE_ROTATE 180 /* Compensate for South-facing device orientation. */
|
||||||
|
```
|
||||||
|
```c
|
||||||
|
#define PS2_MOUSE_ROTATE 90 /* Compensate for West-facing device orientation. */
|
||||||
|
```
|
||||||
|
|
||||||
### Debug Settings :id=debug-settings
|
### Debug Settings :id=debug-settings
|
||||||
|
|
||||||
To debug the mouse, add `debug_mouse = true` or enable via bootmagic.
|
To debug the mouse, add `debug_mouse = true` or enable via bootmagic.
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ Compatible flashers:
|
|||||||
|
|
||||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI)
|
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI)
|
||||||
* [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` in QMK (recommended command line)
|
* [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` in QMK (recommended command line)
|
||||||
* [Atmel's Flip](http://www.microchip.com/developmenttools/productdetails.aspx?partno=flip) (not recommended)
|
|
||||||
|
|
||||||
Flashing sequence:
|
Flashing sequence:
|
||||||
|
|
||||||
|
|||||||
@@ -101,7 +101,8 @@
|
|||||||
* [Guide des claviers soudés à la main](fr-fr/hand_wire.md)
|
* [Guide des claviers soudés à la main](fr-fr/hand_wire.md)
|
||||||
* [Guide de flash de l’ISP](fr-fr/isp_flashing_guide.md)
|
* [Guide de flash de l’ISP](fr-fr/isp_flashing_guide.md)
|
||||||
* [Guide du débogage ARM](fr-fr/arm_debugging.md)
|
* [Guide du débogage ARM](fr-fr/arm_debugging.md)
|
||||||
* [Drivers i2c](fr-fr/i2c_driver.md)
|
* [Drivers I2C](fr-fr/i2c_driver.md)
|
||||||
|
* [Drivers SPI](fr-fr/spi_driver.md)
|
||||||
* [Contrôles des GPIO](fr-fr/internals_gpio_control.md)
|
* [Contrôles des GPIO](fr-fr/internals_gpio_control.md)
|
||||||
* [Conversion en Proton C](fr-fr/proton_c_conversion.md)
|
* [Conversion en Proton C](fr-fr/proton_c_conversion.md)
|
||||||
|
|
||||||
|
|||||||
@@ -155,11 +155,3 @@ Pour le moment, l'origine du problème n'est pas comprise, mais certaines option
|
|||||||
|
|
||||||
https://github.com/tmk/tmk_keyboard/issues/266
|
https://github.com/tmk/tmk_keyboard/issues/266
|
||||||
https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778
|
https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778
|
||||||
|
|
||||||
## FLIP ne marche pas
|
|
||||||
|
|
||||||
### `AtLibUsbDfu.dll` Not Found
|
|
||||||
|
|
||||||
Supprimez le pilote actuel et réinstallez celui donné par FLIP dans le gestionnaire de périphériques.
|
|
||||||
|
|
||||||
http://imgur.com/a/bnwzy
|
|
||||||
@@ -26,7 +26,6 @@ Méthodes de flash compatibles :
|
|||||||
|
|
||||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (interface graphique recommandé)
|
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (interface graphique recommandé)
|
||||||
* [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` avec QMK (outil en ligne de commande recommandé)
|
* [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` avec QMK (outil en ligne de commande recommandé)
|
||||||
* [Atmel's Flip](http://www.microchip.com/developmenttools/productdetails.aspx?partno=flip) (non recommandé)
|
|
||||||
|
|
||||||
Ordre des actions :
|
Ordre des actions :
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ The "easy" way to flash the firmware is using a tool from your host OS:
|
|||||||
|
|
||||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox) (recommended)
|
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox) (recommended)
|
||||||
* [Teensy Loader](https://www.pjrc.com/teensy/loader.html)
|
* [Teensy Loader](https://www.pjrc.com/teensy/loader.html)
|
||||||
* [Atmel FLIP](http://www.atmel.com/tools/flip.aspx)
|
|
||||||
|
|
||||||
If you want to program via the command line you can uncomment the ['modifyvm'] lines in the Vagrantfile to enable the USB passthrough into Linux and then program using the command line tools like dfu-util/dfu-programmer or you can install the Teensy CLI version.
|
If you want to program via the command line you can uncomment the ['modifyvm'] lines in the Vagrantfile to enable the USB passthrough into Linux and then program using the command line tools like dfu-util/dfu-programmer or you can install the Teensy CLI version.
|
||||||
|
|
||||||
|
|||||||
@@ -114,6 +114,7 @@
|
|||||||
* [מדריך לצריבת ISP](he-il/isp_flashing_guide.md)
|
* [מדריך לצריבת ISP](he-il/isp_flashing_guide.md)
|
||||||
* [מדריך לדיבאגינג ARM](he-il/arm_debugging.md)
|
* [מדריך לדיבאגינג ARM](he-il/arm_debugging.md)
|
||||||
* [מנהל התקן I2C](he-il/i2c_driver.md)
|
* [מנהל התקן I2C](he-il/i2c_driver.md)
|
||||||
|
* [מנהל התקן SPI](he-il/spi_driver.md)
|
||||||
* [בקרת GPIO](he-il/internals_gpio_control.md)
|
* [בקרת GPIO](he-il/internals_gpio_control.md)
|
||||||
* [המרת Proton C](he-il/proton_c_conversion.md)
|
* [המרת Proton C](he-il/proton_c_conversion.md)
|
||||||
|
|
||||||
|
|||||||
@@ -121,6 +121,7 @@
|
|||||||
* [ドライバ](ja/hardware_drivers.md)
|
* [ドライバ](ja/hardware_drivers.md)
|
||||||
* [ADC ドライバ](ja/adc_driver.md)
|
* [ADC ドライバ](ja/adc_driver.md)
|
||||||
* [I2C ドライバ](ja/i2c_driver.md)
|
* [I2C ドライバ](ja/i2c_driver.md)
|
||||||
|
* [SPI ドライバ](ja/spi_driver.md)
|
||||||
* [WS2812 ドライバ](ja/ws2812_driver.md)
|
* [WS2812 ドライバ](ja/ws2812_driver.md)
|
||||||
* [EEPROM ドライバ](ja/eeprom_driver.md)
|
* [EEPROM ドライバ](ja/eeprom_driver.md)
|
||||||
* [GPIO コントロール](ja/internals_gpio_control.md)
|
* [GPIO コントロール](ja/internals_gpio_control.md)
|
||||||
|
|||||||
@@ -152,10 +152,3 @@ https://geekhack.org/index.php?topic=14290.msg1884034#msg1884034
|
|||||||
|
|
||||||
https://github.com/tmk/tmk_keyboard/issues/266
|
https://github.com/tmk/tmk_keyboard/issues/266
|
||||||
https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778
|
https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## FLIP が動作しない
|
|
||||||
### `AtLibUsbDfu.dll` が見つかりません
|
|
||||||
デバイスマネージャから現在のドライバを削除し、FLIP が提供するものを再インストールします。
|
|
||||||
http://imgur.com/a/bnwzy
|
|
||||||
@@ -54,11 +54,11 @@ QMK を使い始めたばかりの場合は、全てを単純にしたいでし
|
|||||||
|----------|-------------------------------|----------------------------------------------------|
|
|----------|-------------------------------|----------------------------------------------------|
|
||||||
| `LCTL(kc)` | `C(kc)` | 左 Control を押しながら `kc` を押します。 |
|
| `LCTL(kc)` | `C(kc)` | 左 Control を押しながら `kc` を押します。 |
|
||||||
| `LSFT(kc)` | `S(kc)` | 左 Shift を押しながら `kc` を押します。 |
|
| `LSFT(kc)` | `S(kc)` | 左 Shift を押しながら `kc` を押します。 |
|
||||||
| `LALT(kc)` | `A(kc)` | 左 Alt を押しながら `kc`を押します。 |
|
| `LALT(kc)` | `A(kc)`, `LOPT(kc)` | 左 Alt を押しながら `kc`を押します。 |
|
||||||
| `LGUI(kc)` | `G(kc)`, `LCMD(kc)`, `LWIN(kc)` | 左 GUI を押しながら `kc` を押します。 |
|
| `LGUI(kc)` | `G(kc)`, `LCMD(kc)`, `LWIN(kc)` | 左 GUI を押しながら `kc` を押します。 |
|
||||||
| `RCTL(kc)` | | 右 Control を押しながら `kc` を押します。 |
|
| `RCTL(kc)` | | 右 Control を押しながら `kc` を押します。 |
|
||||||
| `RSFT(kc)` | | 右 Shift を押しながら `kc` を押します。 |
|
| `RSFT(kc)` | | 右 Shift を押しながら `kc` を押します。 |
|
||||||
| `RALT(kc)` | `ALGR(kc)` | 右 Alt を押しながら `kc` を押します。 |
|
| `RALT(kc)` | `ROPT(kc)`, `ALGR(kc)` | 右 Alt を押しながら `kc` を押します。 |
|
||||||
| `RGUI(kc)` | `RCMD(kc)`, `LWIN(kc)` | 右 GUI を押しながら `kc` を押します。 |
|
| `RGUI(kc)` | `RCMD(kc)`, `LWIN(kc)` | 右 GUI を押しながら `kc` を押します。 |
|
||||||
| `SGUI(kc)` | `SCMD(kc)`, `SWIN(kc)` | 左 Shift と左 GUI を押しながら `kc` を押します。 |
|
| `SGUI(kc)` | `SCMD(kc)`, `SWIN(kc)` | 左 Shift と左 GUI を押しながら `kc` を押します。 |
|
||||||
| `LCA(kc)` | | 左 Control と左 Alt を押しながら `kc` を押します。 |
|
| `LCA(kc)` | | 左 Control と左 Alt を押しながら `kc` を押します。 |
|
||||||
|
|||||||
@@ -0,0 +1,108 @@
|
|||||||
|
# コンボ
|
||||||
|
|
||||||
|
<!---
|
||||||
|
original document: 0.8.94:docs/feature_combo.md
|
||||||
|
git diff 0.8.94 HEAD -- docs/feature_combo.md | cat
|
||||||
|
-->
|
||||||
|
|
||||||
|
コンボ機能は、同時押し方式でのカスタムアクション追加機能です。同時に複数のキーを押して、異なる効果を生み出すことができます。例えば、タッピング時間内で `A` と `S` を押すと、代わりに `ESC` が押されます。もっと複雑なタスクを実行させることもできます。
|
||||||
|
|
||||||
|
この機能を有効にするには、`rules.mk` に `COMBO_ENABLE = yes` を追加する必要があります。
|
||||||
|
|
||||||
|
さらに、使用するコンボの数を `config.h` の中で、`#define COMBO_COUNT 1` (1を使用するコンボの数で置き換えます)と書いて、指定する必要があります。
|
||||||
|
<!-- At this time, this is necessary -->
|
||||||
|
|
||||||
|
また、デフォルトでは、コンボのタッピング時間は `TAPPING_TERM` と同じ値に設定されます (ほとんどのキーボードではデフォルトで 200)。ただし、`config.h` で定義することにより異なる値を指定することができます。例えば: `#define COMBO_TERM 300` はコンボのためのタイムアウト時間を 300ms に設定します。
|
||||||
|
|
||||||
|
次に、`keymap.c` ファイルに、`COMBO_END` で終了するキーのシーケンス、およびキーの組み合わせを列挙する構造体、その結果のアクションを定義する必要があります。
|
||||||
|
|
||||||
|
```c
|
||||||
|
const uint16_t PROGMEM test_combo[] = {KC_A, KC_B, COMBO_END};
|
||||||
|
combo_t key_combos[COMBO_COUNT] = {COMBO(test_combo, KC_ESC)};
|
||||||
|
```
|
||||||
|
|
||||||
|
これは、A と B のキーを押した場合に、"Escape" を送信します。
|
||||||
|
|
||||||
|
!> このメソッドは[基本的なキーコード](ja/keycodes_basic.md)のみをサポートします。詳細な制御については例を見てください。
|
||||||
|
|
||||||
|
## 例
|
||||||
|
|
||||||
|
リストを追加したい場合は、以下のようなものを使います:
|
||||||
|
|
||||||
|
```c
|
||||||
|
enum combos {
|
||||||
|
AB_ESC,
|
||||||
|
JK_TAB
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM ab_combo[] = {KC_A, KC_B, COMBO_END};
|
||||||
|
const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END};
|
||||||
|
|
||||||
|
combo_t key_combos[COMBO_COUNT] = {
|
||||||
|
[AB_ESC] = COMBO(ab_combo, KC_ESC),
|
||||||
|
[JK_TAB] = COMBO(jk_combo, KC_TAB)
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
より複雑な実装として、カスタム処理を追加するために `process_combo_event` 関数を使うことができます。
|
||||||
|
|
||||||
|
```c
|
||||||
|
enum combo_events {
|
||||||
|
ZC_COPY,
|
||||||
|
XV_PASTE
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM copy_combo[] = {KC_Z, KC_C, COMBO_END};
|
||||||
|
const uint16_t PROGMEM paste_combo[] = {KC_X, KC_V, COMBO_END};
|
||||||
|
|
||||||
|
combo_t key_combos[COMBO_COUNT] = {
|
||||||
|
[ZC_COPY] = COMBO_ACTION(copy_combo),
|
||||||
|
[XV_PASTE] = COMBO_ACTION(paste_combo),
|
||||||
|
};
|
||||||
|
|
||||||
|
void process_combo_event(uint8_t combo_index, bool pressed) {
|
||||||
|
switch(combo_index) {
|
||||||
|
case ZC_COPY:
|
||||||
|
if (pressed) {
|
||||||
|
tap_code16(LCTL(KC_C));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case XV_PASTE:
|
||||||
|
if (pressed) {
|
||||||
|
tap_code16(LCTL(KC_V));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
これは、Z と C を押すと Ctrl+C を送信し、X と V を押すと Ctrl+V を送信します。これを変更して、レイヤーの変更、サウンドの再生、設定の変更などを行うこともできます。
|
||||||
|
|
||||||
|
## 追加の設定
|
||||||
|
|
||||||
|
長いコンボあるいはさらに長いコンボを使っている場合、構造体があなたのしていることに対応するのに十分な大きさで無いかもしれないため、問題が発生するかもしれません。
|
||||||
|
|
||||||
|
この場合、`config.h` ファイルに `#define EXTRA_LONG_COMBOS` または `#define EXTRA_EXTRA_LONG_COMBOS` のどちらかを追加することができます。
|
||||||
|
|
||||||
|
`COMBO_ALLOW_ACTION_KEYS` を定義することでアクションキーを有効にすることもできます。
|
||||||
|
|
||||||
|
## キーコード
|
||||||
|
|
||||||
|
その場でコンボ機能を有効、無効および切り替えすることができます。ゲームなどで、一時的にそれらを無効にする必要がある場合に便利です。
|
||||||
|
|
||||||
|
| キーコード | 説明 |
|
||||||
|
|----------|---------------------------------|
|
||||||
|
| `CMB_ON` | コンボ機能をオンにします |
|
||||||
|
| `CMB_OFF` | コンボ機能をオフにします |
|
||||||
|
| `CMB_TOG` | コンボ機能のオンとオフを切り替えます |
|
||||||
|
|
||||||
|
## ユーザコールバック
|
||||||
|
|
||||||
|
キーコードに加えて、状態を設定または状態をチェックするために使うことができる幾つかの関数があります:
|
||||||
|
|
||||||
|
| 関数 | 説明 |
|
||||||
|
|-----------|--------------------------------------------------------------------|
|
||||||
|
| `combo_enable()` | コンボ機能を有効にします |
|
||||||
|
| `combo_disable()` | コンボ機能を無効にし、コンボバッファをクリアします |
|
||||||
|
| `combo_toggle()` | コンボ機能の状態を切り替えます |
|
||||||
|
| `is_combo_enabled()` | コンボ機能の状態(true か false)を返します |
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
# DIP スイッチ
|
||||||
|
|
||||||
|
<!---
|
||||||
|
original document: 0.8.94:docs/feature_dip_switch.md
|
||||||
|
git diff 0.8.94 HEAD -- docs/feature_dip_switch.md | cat
|
||||||
|
-->
|
||||||
|
|
||||||
|
DIP スイッチは、以下を `rules.mk` に追加することでサポートされます:
|
||||||
|
|
||||||
|
DIP_SWITCH_ENABLE = yes
|
||||||
|
|
||||||
|
さらに、以下を `config.h` に追加します:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define DIP_SWITCH_PINS { B14, A15, A10, B9 }
|
||||||
|
```
|
||||||
|
|
||||||
|
## コールバック
|
||||||
|
|
||||||
|
コールバック関数を `<keyboard>.c` に記述することができます:
|
||||||
|
|
||||||
|
```c
|
||||||
|
void dip_switch_update_kb(uint8_t index, bool active) {
|
||||||
|
dip_switch_update_user(index, active);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
あるいは `keymap.c` に記述することもできます:
|
||||||
|
|
||||||
|
```c
|
||||||
|
void dip_switch_update_user(uint8_t index, bool active) {
|
||||||
|
switch (index) {
|
||||||
|
case 0:
|
||||||
|
if(active) { audio_on(); } else { audio_off(); }
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
if(active) { clicky_on(); } else { clicky_off(); }
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
if(active) { music_on(); } else { music_off(); }
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
if (active) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_SONG(plover_song);
|
||||||
|
#endif
|
||||||
|
layer_on(_PLOVER);
|
||||||
|
} else {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_SONG(plover_gb_song);
|
||||||
|
#endif
|
||||||
|
layer_off(_PLOVER);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
更に、より複雑な処理ができるビットマスク関数をサポートします。
|
||||||
|
|
||||||
|
|
||||||
|
```c
|
||||||
|
void dip_switch_update_mask_kb(uint32_t state) {
|
||||||
|
dip_switch_update_mask_user(state);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
あるいは `keymap.c` に記述することもできます:
|
||||||
|
|
||||||
|
```c
|
||||||
|
void dip_switch_update_mask_user(uint32_t state) {
|
||||||
|
if (state & (1UL<<0) && state & (1UL<<1)) {
|
||||||
|
layer_on(_ADJUST); // C on esc
|
||||||
|
} else {
|
||||||
|
layer_off(_ADJUST);
|
||||||
|
}
|
||||||
|
if (state & (1UL<<0)) {
|
||||||
|
layer_on(_TEST_A); // A on ESC
|
||||||
|
} else {
|
||||||
|
layer_off(_TEST_A);
|
||||||
|
}
|
||||||
|
if (state & (1UL<<1)) {
|
||||||
|
layer_on(_TEST_B); // B on esc
|
||||||
|
} else {
|
||||||
|
layer_off(_TEST_B);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## ハードウェア
|
||||||
|
|
||||||
|
DIP スイッチの片側は MCU のピンへ直接配線し、もう一方の側はグラウンドに配線する必要があります。機能的に同じであるため、どちら側がどちらに接続されているかは問題にはならないはずです。
|
||||||
@@ -31,7 +31,6 @@ BOOTLOADER = atmel-dfu
|
|||||||
|
|
||||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (推奨の GUI)
|
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (推奨の GUI)
|
||||||
* QMK の [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` (推奨のコマンドライン)
|
* QMK の [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` (推奨のコマンドライン)
|
||||||
* [Atmel の Flip](http://www.microchip.com/developmenttools/productdetails.aspx?partno=flip) (非推奨)
|
|
||||||
|
|
||||||
書き込み手順:
|
書き込み手順:
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ Vagrant 以外に、適切なプロバイダがインストールされ、その
|
|||||||
|
|
||||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox) (推奨)
|
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox) (推奨)
|
||||||
* [Teensy ローダー](https://www.pjrc.com/teensy/loader.html)
|
* [Teensy ローダー](https://www.pjrc.com/teensy/loader.html)
|
||||||
* [Atmel FLIP](http://www.atmel.com/tools/flip.aspx)
|
|
||||||
|
|
||||||
コマンドラインでプログラムしたい場合は、Vagranfile の ['modifyvm'] 行のコメントを解除して Linux への USB パススルーを有効にし、dfu-util/dfu-programmer のようなコマンドラインツールを使ってプログラムすることができます。あるいは Teensy CLI バージョンをインストールすることができます。
|
コマンドラインでプログラムしたい場合は、Vagranfile の ['modifyvm'] 行のコメントを解除して Linux への USB パススルーを有効にし、dfu-util/dfu-programmer のようなコマンドラインツールを使ってプログラムすることができます。あるいは Teensy CLI バージョンをインストールすることができます。
|
||||||
|
|
||||||
|
|||||||
+6
-6
@@ -175,11 +175,11 @@ See also: [Basic Keycodes](keycodes_basic.md)
|
|||||||
|`KC_EXSEL` | |ExSel |
|
|`KC_EXSEL` | |ExSel |
|
||||||
|`KC_LCTRL` |`KC_LCTL` |Left Control |
|
|`KC_LCTRL` |`KC_LCTL` |Left Control |
|
||||||
|`KC_LSHIFT` |`KC_LSFT` |Left Shift |
|
|`KC_LSHIFT` |`KC_LSFT` |Left Shift |
|
||||||
|`KC_LALT` | |Left Alt |
|
|`KC_LALT` |`KC_LOPT` |Left Alt (Option) |
|
||||||
|`KC_LGUI` |`KC_LCMD`, `KC_LWIN` |Left GUI (Windows/Command/Meta key) |
|
|`KC_LGUI` |`KC_LCMD`, `KC_LWIN` |Left GUI (Windows/Command/Meta key) |
|
||||||
|`KC_RCTRL` |`KC_RCTL` |Right Control |
|
|`KC_RCTRL` |`KC_RCTL` |Right Control |
|
||||||
|`KC_RSHIFT` |`KC_RSFT` |Right Shift |
|
|`KC_RSHIFT` |`KC_RSFT` |Right Shift |
|
||||||
|`KC_RALT` |`KC_ALGR` |Right Alt (AltGr) |
|
|`KC_RALT` |`KC_ROPT`, `KC_ALGR` |Right Alt (Option/AltGr) |
|
||||||
|`KC_RGUI` |`KC_RCMD`, `KC_RWIN` |Right GUI (Windows/Command/Meta key) |
|
|`KC_RGUI` |`KC_RCMD`, `KC_RWIN` |Right GUI (Windows/Command/Meta key) |
|
||||||
|`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down |
|
|`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down |
|
||||||
|`KC_SYSTEM_SLEEP` |`KC_SLEP` |System Sleep |
|
|`KC_SYSTEM_SLEEP` |`KC_SLEP` |System Sleep |
|
||||||
@@ -378,11 +378,11 @@ See also: [Modifier Keys](feature_advanced_keycodes.md#modifier-keys)
|
|||||||
|----------|-------------------------------|----------------------------------------------------|
|
|----------|-------------------------------|----------------------------------------------------|
|
||||||
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
|
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
|
||||||
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
||||||
|`LALT(kc)`|`A(kc)` |Hold Left Alt and press `kc` |
|
|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` |
|
||||||
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
||||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||||
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
||||||
|`RALT(kc)`|`ALGR(kc)` |Hold Right Alt and press `kc` |
|
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` |
|
||||||
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` |
|
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` |
|
||||||
|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` |
|
|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` |
|
||||||
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|
||||||
@@ -401,11 +401,11 @@ See also: [Mod-Tap](mod_tap.md)
|
|||||||
|`MT(mod, kc)`| |`mod` when held, `kc` when tapped |
|
|`MT(mod, kc)`| |`mod` when held, `kc` when tapped |
|
||||||
|`LCTL_T(kc)` |`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|
|`LCTL_T(kc)` |`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|
||||||
|`LSFT_T(kc)` |`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|
|`LSFT_T(kc)` |`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|
||||||
|`LALT_T(kc)` |`ALT_T(kc)` |Left Alt when held, `kc` when tapped |
|
|`LALT_T(kc)` |`LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` |Left Alt when held, `kc` when tapped |
|
||||||
|`LGUI_T(kc)` |`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped |
|
|`LGUI_T(kc)` |`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped |
|
||||||
|`RCTL_T(kc)` | |Right Control when held, `kc` when tapped |
|
|`RCTL_T(kc)` | |Right Control when held, `kc` when tapped |
|
||||||
|`RSFT_T(kc)` | |Right Shift when held, `kc` when tapped |
|
|`RSFT_T(kc)` | |Right Shift when held, `kc` when tapped |
|
||||||
|`RALT_T(kc)` |`ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
|
|`RALT_T(kc)` |`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
|
||||||
|`RGUI_T(kc)` |`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped |
|
|`RGUI_T(kc)` |`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped |
|
||||||
|`SGUI_T(kc)` |`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|
|`SGUI_T(kc)` |`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|
||||||
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
||||||
|
|||||||
@@ -112,11 +112,11 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07
|
|||||||
|-----------|--------------------|------------------------------------|
|
|-----------|--------------------|------------------------------------|
|
||||||
|`KC_LCTRL` |`KC_LCTL` |Left Control |
|
|`KC_LCTRL` |`KC_LCTL` |Left Control |
|
||||||
|`KC_LSHIFT`|`KC_LSFT` |Left Shift |
|
|`KC_LSHIFT`|`KC_LSFT` |Left Shift |
|
||||||
|`KC_LALT` | |Left Alt |
|
|`KC_LALT` |`KC_LOPT` |Left Alt (Option) |
|
||||||
|`KC_LGUI` |`KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) |
|
|`KC_LGUI` |`KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) |
|
||||||
|`KC_RCTRL` |`KC_RCTL` |Right Control |
|
|`KC_RCTRL` |`KC_RCTL` |Right Control |
|
||||||
|`KC_RSHIFT`|`KC_RSFT` |Right Shift |
|
|`KC_RSHIFT`|`KC_RSFT` |Right Shift |
|
||||||
|`KC_RALT` |`KC_ALGR` |Right Alt (AltGr) |
|
|`KC_RALT` |`KC_ROPT`, `KC_ALGR`|Right Alt (Option/AltGr) |
|
||||||
|`KC_RGUI` |`KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key)|
|
|`KC_RGUI` |`KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key)|
|
||||||
|
|
||||||
## International
|
## International
|
||||||
|
|||||||
+2
-2
@@ -31,11 +31,11 @@ For convenience, QMK includes some Mod-Tap shortcuts to make common combinations
|
|||||||
|------------|-----------------------------------------------------------------|-------------------------------------------------------|
|
|------------|-----------------------------------------------------------------|-------------------------------------------------------|
|
||||||
|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|
|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|
||||||
|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|
|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|
||||||
|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped |
|
|`LALT_T(kc)`|`LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` |Left Alt when held, `kc` when tapped |
|
||||||
|`LGUI_T(kc)`|`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped |
|
|`LGUI_T(kc)`|`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped |
|
||||||
|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped |
|
|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped |
|
||||||
|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
|
|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
|
||||||
|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
|
|`RALT_T(kc)`|`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
|
||||||
|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped |
|
|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped |
|
||||||
|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|
|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|
||||||
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ After installing QMK you can set it up with this command:
|
|||||||
|
|
||||||
In most situations you will want to answer Yes to all of the prompts.
|
In most situations you will want to answer Yes to all of the prompts.
|
||||||
|
|
||||||
?> If you already know [how to use GitHub](getting_started_github.md), we recommend that you create your own fork and use `qmk setup <github_username>` to clone your personal fork. If you don't know what that means you can safely ignore this message.
|
?> If you already know [how to use GitHub](getting_started_github.md), we recommend that you create your own fork and use `qmk setup <github_username>/qmk_firmware` to clone your personal fork. If you don't know what that means you can safely ignore this message.
|
||||||
|
|
||||||
## 4. Test Your Build Environment
|
## 4. Test Your Build Environment
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
# Arm/ChibiOS Early Initialization :id=chibios-early-init
|
||||||
|
|
||||||
|
This page describes a part of QMK that is a somewhat advanced concept, and is only relevant to keyboard designers.
|
||||||
|
|
||||||
|
QMK uses ChibiOS as the underlying layer to support a multitude of Arm-based devices. Each ChibiOS-supported keyboard has a low-level board definition which is responsible for initializing hardware peripherals such as the clocks, and GPIOs.
|
||||||
|
|
||||||
|
Older QMK revisions required duplication of these board definitions inside your keyboard's directory in order to override such early initialization points; this is now abstracted into the following APIs, and allows usage of the board definitions supplied with ChibiOS itself. Check `<qmk_firmware>/lib/chibios/os/hal/boards` for the list of official definitions. If your keyboard needs extra initialization at a very early stage, consider providing keyboard-level overrides of the following APIs:
|
||||||
|
|
||||||
|
## `early_hardware_init_pre()` :id=early-hardware-init-pre
|
||||||
|
|
||||||
|
The function `early_hardware_init_pre` is the earliest possible code that can be executed by a keyboard firmware. This is intended as a replacement for the ChibiOS board definition's `__early_init` function, and is the equivalent of executing at the start of the function.
|
||||||
|
|
||||||
|
This is executed before RAM gets cleared, and before clocks or GPIOs are configured; any delays or preparation using GPIOs is not likely to work at this point. After executing this function, RAM on the MCU may be zero'ed. Assigning values to variables during execution of this function may be overwritten.
|
||||||
|
|
||||||
|
As such, if you wish to override this API consider limiting use to writing to low-level registers. The default implementation of this function can be configured to jump to bootloader if a `RESET` key was pressed, by ensuring `#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE` is in the keyboard's `config.h` file.
|
||||||
|
|
||||||
|
To implement your own version of this function, in your keyboard's source files:
|
||||||
|
|
||||||
|
```c
|
||||||
|
void early_hardware_init_pre(void) {
|
||||||
|
// do things with registers
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## `early_hardware_init_post()` :id=early-hardware-init-post
|
||||||
|
|
||||||
|
The function `early_hardware_init_post` is the next earliest possible code that can be executed by a keyboard firmware. This is executed after RAM has been cleared, and clocks and GPIOs are configured. This is intended as a replacement for the ChibiOS board definition's `__early_init` function, and is the equivalent of executing at the end of the function.
|
||||||
|
|
||||||
|
Much like `early_hardware_init_pre`, ChibiOS has not yet been initialized either, so the same restrictions on delays and timing apply.
|
||||||
|
|
||||||
|
If you wish to override this API, consider limiting functionality to register writes, variable initialization, and GPIO toggling. The default implementation of this function is to do nothing.
|
||||||
|
|
||||||
|
To implement your own version of this function, in your keyboard's source files:
|
||||||
|
|
||||||
|
```c
|
||||||
|
void early_hardware_init_post(void) {
|
||||||
|
// toggle GPIO pins and write to variables
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## `board_init()` :id=board-init
|
||||||
|
|
||||||
|
The function `board_init` is executed directly after the ChibiOS initialization routines have completed. At this stage, all normal low-level functionality should be available for use (including timers and delays), with the restriction that USB is not yet connected. This is intended as a replacement for the ChibiOS board definition's `boardInit` function.
|
||||||
|
|
||||||
|
The default implementation of this function is to do nothing.
|
||||||
|
|
||||||
|
To implement your own version of this function, in your keyboard's source files:
|
||||||
|
|
||||||
|
```c
|
||||||
|
void board_init(void) {
|
||||||
|
// initialize anything that requires ChibiOS
|
||||||
|
}
|
||||||
|
```
|
||||||
@@ -98,6 +98,7 @@
|
|||||||
* [ISP Flashing Guide](pt-br/isp_flashing_guide.md)
|
* [ISP Flashing Guide](pt-br/isp_flashing_guide.md)
|
||||||
* [ARM Debugging Guide](pt-br/arm_debugging.md)
|
* [ARM Debugging Guide](pt-br/arm_debugging.md)
|
||||||
* [I2C Driver](pt-br/i2c_driver.md)
|
* [I2C Driver](pt-br/i2c_driver.md)
|
||||||
|
* [SPI Driver](pt-br/spi_driver.md)
|
||||||
* [GPIO Controls](pt-br/internals_gpio_control.md)
|
* [GPIO Controls](pt-br/internals_gpio_control.md)
|
||||||
* [Proton C Conversion](pt-br/proton_c_conversion.md)
|
* [Proton C Conversion](pt-br/proton_c_conversion.md)
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ There are actually separate functions that you can use there, depending on what
|
|||||||
|
|
||||||
### `update_tri_layer(x, y, z)`
|
### `update_tri_layer(x, y, z)`
|
||||||
|
|
||||||
The first is the `update_tri_layer(x, y, z)` function. This function check to see if layers `x` and `y` are both on. If they are both on, then it runs on layer `z`. Otherwise, if both `x` and `y` are not both on (either only one is, or neither is), then it runs off layer `z`.
|
The first is the `update_tri_layer(x, y, z)` function. This function check to see if layers `x` and `y` are both on. If they are both on, then it turns on layer `z`. Otherwise, if both `x` and `y` are not both on (either only one is, or neither is), then it turns off layer `z`.
|
||||||
|
|
||||||
This function is useful if you want to create specific keys that have this functionality, but other layer keycodes won't do this.
|
This function is useful if you want to create specific keys that have this functionality, but other layer keycodes won't do this.
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
```
|
```
|
||||||
|
|
||||||
### `update_tri_layer_state(state, x, y, z)`
|
### `update_tri_layer_state(state, x, y, z)`
|
||||||
The other function is `update_tri_layer_state(state, x, y, z)`. This function is meant to be called from they [`layer_state_set_*` functions](custom_quantum_functions.md#layer-change-code). This means that any time that you use a keycode to change the layer, this will be checked. So you could use `LT(layer, kc)` to change the layer and it will trigger the same layer check.
|
The other function is `update_tri_layer_state(state, x, y, z)`. This function is meant to be called from the [`layer_state_set_*` functions](custom_quantum_functions.md#layer-change-code). This means that any time that you use a keycode to change the layer, this will be checked. So you could use `LT(layer, kc)` to change the layer and it will trigger the same layer check.
|
||||||
|
|
||||||
The caveat to this method is that you cannot access the `z` layer without having `x` and `y` layers on, since if you try to activate just layer `z`, it will run this code and turn off layer `z` before you could use it.
|
The caveat to this method is that you cannot access the `z` layer without having `x` and `y` layers on, since if you try to activate just layer `z`, it will run this code and turn off layer `z` before you could use it.
|
||||||
|
|
||||||
|
|||||||
@@ -46,9 +46,6 @@ An IDE that is popular with many C developers.
|
|||||||
## Firmware
|
## Firmware
|
||||||
The software that controls your MCU.
|
The software that controls your MCU.
|
||||||
|
|
||||||
## FLIP
|
|
||||||
Software provided by Atmel for flashing AVR devices. We generally recommend [QMK Flasher](https://github.com/qmk/qmk_flasher) instead, but for some advanced use cases FLIP is required.
|
|
||||||
|
|
||||||
## git
|
## git
|
||||||
Versioning software used at the command line
|
Versioning software used at the command line
|
||||||
|
|
||||||
|
|||||||
@@ -99,6 +99,7 @@
|
|||||||
* [ISP Flashing Guide](ru-ru/isp_flashing_guide.md)
|
* [ISP Flashing Guide](ru-ru/isp_flashing_guide.md)
|
||||||
* [ARM Debugging Guide](ru-ru/arm_debugging.md)
|
* [ARM Debugging Guide](ru-ru/arm_debugging.md)
|
||||||
* [I2C Driver](ru-ru/i2c_driver.md)
|
* [I2C Driver](ru-ru/i2c_driver.md)
|
||||||
|
* [SPI Driver](ru-ru/spi_driver.md)
|
||||||
* [WS2812 Driver](ru-ru/ws2812_driver.md)
|
* [WS2812 Driver](ru-ru/ws2812_driver.md)
|
||||||
* [GPIO Controls](ru-ru/internals_gpio_control.md)
|
* [GPIO Controls](ru-ru/internals_gpio_control.md)
|
||||||
* [Proton C Conversion](ru-ru/proton_c_conversion.md)
|
* [Proton C Conversion](ru-ru/proton_c_conversion.md)
|
||||||
|
|||||||
@@ -0,0 +1,121 @@
|
|||||||
|
# SPI Master Driver
|
||||||
|
|
||||||
|
The SPI Master drivers used in QMK have a set of common functions to allow portability between MCUs.
|
||||||
|
|
||||||
|
## AVR Configuration
|
||||||
|
|
||||||
|
No special setup is required - just connect the `SS`, `SCK`, `MOSI` and `MISO` pins of your SPI devices to the matching pins on the MCU:
|
||||||
|
|
||||||
|
|MCU |`SS`|`SCK`|`MOSI`|`MISO`|
|
||||||
|
|---------------|----|-----|------|------|
|
||||||
|
|ATMega16/32U2/4|`B0`|`B1` |`B2` |`B3` |
|
||||||
|
|AT90USB64/128 |`B0`|`B1` |`B2` |`B3` |
|
||||||
|
|ATmega32A |`B4`|`B7` |`B5` |`B6` |
|
||||||
|
|ATmega328P |`B2`|`B5` |`B3` |`B4` |
|
||||||
|
|
||||||
|
You may use more than one slave select pin, not just the `SS` pin. This is useful when you have multiple devices connected and need to communicate with them individually.
|
||||||
|
`SPI_SS_PIN` can be passed to `spi_start()` to refer to `SS`.
|
||||||
|
|
||||||
|
## ChibiOS/ARM Configuration
|
||||||
|
|
||||||
|
ARM support for this driver is not ready yet. Check back later!
|
||||||
|
|
||||||
|
## Functions
|
||||||
|
|
||||||
|
### `void spi_init(void)`
|
||||||
|
|
||||||
|
Initialize the SPI driver. This function must be called only once, before any of the below functions can be called.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### `bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor)`
|
||||||
|
|
||||||
|
Start an SPI transaction.
|
||||||
|
|
||||||
|
#### Arguments
|
||||||
|
|
||||||
|
- `pin_t slavePin`
|
||||||
|
The QMK pin to assert as the slave select pin, eg. `B4`.
|
||||||
|
- `bool lsbFirst`
|
||||||
|
Determines the endianness of the transmission. If `true`, the least significant bit of each byte is sent first.
|
||||||
|
- `uint8_t mode`
|
||||||
|
The SPI mode to use:
|
||||||
|
|
||||||
|
|Mode|Clock Polarity |Clock Phase |
|
||||||
|
|----|--------------------|-----------------------|
|
||||||
|
|`0` |Leading edge rising |Sample on leading edge |
|
||||||
|
|`1` |Leading edge rising |Sample on trailing edge|
|
||||||
|
|`2` |Leading edge falling|Sample on leading edge |
|
||||||
|
|`3` |Leading edge falling|Sample on trailing edge|
|
||||||
|
|
||||||
|
- `uint16_t divisor`
|
||||||
|
The SPI clock divisor, will be rounded up to the nearest power of two. This number can be calculated by dividing the MCU's clock speed by the desired SPI clock speed. For example, an MCU running at 8 MHz wanting to talk to an SPI device at 4 MHz would set the divisor to `2`.
|
||||||
|
|
||||||
|
#### Return Value
|
||||||
|
|
||||||
|
`false` if the supplied parameters are invalid or the SPI peripheral is already in use, or `true`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### `spi_status_t spi_write(uint8_t data)`
|
||||||
|
|
||||||
|
Write a byte to the selected SPI device.
|
||||||
|
|
||||||
|
#### Arguments
|
||||||
|
|
||||||
|
- `uint8_t data`
|
||||||
|
The byte to write.
|
||||||
|
|
||||||
|
#### Return Value
|
||||||
|
|
||||||
|
`SPI_STATUS_TIMEOUT` if the timeout period elapses, or `SPI_STATUS_SUCCESS`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### `spi_status_t spi_read(void)`
|
||||||
|
|
||||||
|
Read a byte from the selected SPI device.
|
||||||
|
|
||||||
|
#### Return Value
|
||||||
|
|
||||||
|
`SPI_STATUS_TIMEOUT` if the timeout period elapses, or the byte read from the device.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### `spi_status_t spi_transmit(const uint8_t *data, uint16_t length)`
|
||||||
|
|
||||||
|
Send multiple bytes to the selected SPI device.
|
||||||
|
|
||||||
|
#### Arguments
|
||||||
|
|
||||||
|
- `const uint8_t *data`
|
||||||
|
A pointer to the data to write from.
|
||||||
|
- `uint16_t length`
|
||||||
|
The number of bytes to write. Take care not to overrun the length of `data`.
|
||||||
|
|
||||||
|
#### Return Value
|
||||||
|
|
||||||
|
`SPI_STATUS_TIMEOUT` if the timeout period elapses, `SPI_STATUS_SUCCESS` on success, or `SPI_STATUS_ERROR` otherwise.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### `spi_status_t spi_receive(uint8_t *data, uint16_t length)`
|
||||||
|
|
||||||
|
Receive multiple bytes from the selected SPI device.
|
||||||
|
|
||||||
|
#### Arguments
|
||||||
|
|
||||||
|
- `uint8_t *data`
|
||||||
|
A pointer to the buffer to read into.
|
||||||
|
- `uint16_t length`
|
||||||
|
The number of bytes to read. Take care not to overrun the length of `data`.
|
||||||
|
|
||||||
|
#### Return Value
|
||||||
|
|
||||||
|
`SPI_STATUS_TIMEOUT` if the internal transmission timeout period elapses, `SPI_STATUS_SUCCESS` on success, or `SPI_STATUS_ERROR` otherwise.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### `void spi_stop(void)`
|
||||||
|
|
||||||
|
End the current SPI transaction. This will deassert the slave select pin and reset the endianness, mode and divisor configured by `spi_start()`.
|
||||||
@@ -104,6 +104,7 @@
|
|||||||
* [ARM调试指南](zh-cn/arm_debugging.md)
|
* [ARM调试指南](zh-cn/arm_debugging.md)
|
||||||
* [ADC设备](zh-cn/adc_driver.md)
|
* [ADC设备](zh-cn/adc_driver.md)
|
||||||
* [I2C设备](zh-cn/i2c_driver.md)
|
* [I2C设备](zh-cn/i2c_driver.md)
|
||||||
|
* [SPI设备](zh-cn/spi_driver.md)
|
||||||
* [WS2812设备](zh-cn/ws2812_driver.md)
|
* [WS2812设备](zh-cn/ws2812_driver.md)
|
||||||
* [EEPROM设备](zh-cn/eeprom_driver.md)
|
* [EEPROM设备](zh-cn/eeprom_driver.md)
|
||||||
* [GPIO控制](zh-cn/internals_gpio_control.md)
|
* [GPIO控制](zh-cn/internals_gpio_control.md)
|
||||||
|
|||||||
@@ -139,10 +139,3 @@ https://geekhack.org/index.php?topic=14290.msg1884034#msg1884034
|
|||||||
|
|
||||||
https://github.com/tmk/tmk_keyboard/issues/266
|
https://github.com/tmk/tmk_keyboard/issues/266
|
||||||
https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778
|
https://geekhack.org/index.php?topic=41989.msg1967778#msg1967778
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## FLIP 不工作
|
|
||||||
### `AtLibUsbDfu.dll` 未找到
|
|
||||||
从设备管理器中删除当前驱动程序并在设备管理器重新安装一个FLIP提供的程序。
|
|
||||||
http://imgur.com/a/bnwzy
|
|
||||||
@@ -46,9 +46,6 @@ Français (法国)标准键盘布局。用键盘的前六个字母命名。
|
|||||||
## Firmware(固件)
|
## Firmware(固件)
|
||||||
用来控制单片机的软件。
|
用来控制单片机的软件。
|
||||||
|
|
||||||
## FLIP
|
|
||||||
爱特梅尔(Atmel)提供的AVR器件刷写软件。我们一般推荐 [QMK刷写工具](https://github.com/qmk/qmk_flasher),但是对于一些高级用例,需要FLIP。
|
|
||||||
|
|
||||||
## git
|
## git
|
||||||
命令行版本控制软件
|
命令行版本控制软件
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,176 @@
|
|||||||
|
/* Copyright 2020
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <avr/io.h>
|
||||||
|
|
||||||
|
#include "spi_master.h"
|
||||||
|
#include "quantum.h"
|
||||||
|
#include "timer.h"
|
||||||
|
|
||||||
|
#if defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__) || defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__)
|
||||||
|
# define SPI_SCK_PIN B1
|
||||||
|
# define SPI_MOSI_PIN B2
|
||||||
|
# define SPI_MISO_PIN B3
|
||||||
|
#elif defined(__AVR_ATmega32A__)
|
||||||
|
# define SPI_SCK_PIN B7
|
||||||
|
# define SPI_MOSI_PIN B5
|
||||||
|
# define SPI_MISO_PIN B6
|
||||||
|
#elif defined(__AVR_ATmega328P__)
|
||||||
|
# define SPI_SCK_PIN B5
|
||||||
|
# define SPI_MOSI_PIN B3
|
||||||
|
# define SPI_MISO_PIN B4
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef SPI_TIMEOUT
|
||||||
|
# define SPI_TIMEOUT 100
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static pin_t currentSlavePin = NO_PIN;
|
||||||
|
static uint8_t currentSlaveConfig = 0;
|
||||||
|
static bool currentSlave2X = false;
|
||||||
|
|
||||||
|
void spi_init(void) {
|
||||||
|
writePinHigh(SPI_SS_PIN);
|
||||||
|
setPinOutput(SPI_SCK_PIN);
|
||||||
|
setPinOutput(SPI_MOSI_PIN);
|
||||||
|
setPinInput(SPI_MISO_PIN);
|
||||||
|
|
||||||
|
SPCR = (_BV(SPE) | _BV(MSTR));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor) {
|
||||||
|
if (currentSlavePin != NO_PIN || slavePin == NO_PIN) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
currentSlaveConfig = 0;
|
||||||
|
|
||||||
|
if (lsbFirst) {
|
||||||
|
currentSlaveConfig |= _BV(DORD);
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (mode) {
|
||||||
|
case 1:
|
||||||
|
currentSlaveConfig |= _BV(CPHA);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
currentSlaveConfig |= _BV(CPOL);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
currentSlaveConfig |= (_BV(CPOL) | _BV(CPHA));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint16_t roundedDivisor = 1;
|
||||||
|
while (roundedDivisor < divisor) {
|
||||||
|
roundedDivisor <<= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (roundedDivisor) {
|
||||||
|
case 16:
|
||||||
|
currentSlaveConfig |= _BV(SPR0);
|
||||||
|
break;
|
||||||
|
case 64:
|
||||||
|
currentSlaveConfig |= _BV(SPR1);
|
||||||
|
break;
|
||||||
|
case 128:
|
||||||
|
currentSlaveConfig |= (_BV(SPR1) | _BV(SPR0));
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
currentSlave2X = true;
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
currentSlave2X = true;
|
||||||
|
currentSlaveConfig |= _BV(SPR0);
|
||||||
|
break;
|
||||||
|
case 32:
|
||||||
|
currentSlave2X = true;
|
||||||
|
currentSlaveConfig |= _BV(SPR1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
SPCR |= currentSlaveConfig;
|
||||||
|
if (currentSlave2X) {
|
||||||
|
SPSR |= _BV(SPI2X);
|
||||||
|
}
|
||||||
|
currentSlavePin = slavePin;
|
||||||
|
setPinOutput(currentSlavePin);
|
||||||
|
writePinLow(currentSlavePin);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
spi_status_t spi_write(uint8_t data) {
|
||||||
|
SPDR = data;
|
||||||
|
|
||||||
|
uint16_t timeout_timer = timer_read();
|
||||||
|
while (!(SPSR & _BV(SPIF))) {
|
||||||
|
if ((timer_read() - timeout_timer) >= SPI_TIMEOUT) {
|
||||||
|
return SPI_STATUS_TIMEOUT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return SPDR;
|
||||||
|
}
|
||||||
|
|
||||||
|
spi_status_t spi_read() {
|
||||||
|
SPDR = 0x00; // Dummy
|
||||||
|
|
||||||
|
uint16_t timeout_timer = timer_read();
|
||||||
|
while (!(SPSR & _BV(SPIF))) {
|
||||||
|
if ((timer_read() - timeout_timer) >= SPI_TIMEOUT) {
|
||||||
|
return SPI_STATUS_TIMEOUT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return SPDR;
|
||||||
|
}
|
||||||
|
|
||||||
|
spi_status_t spi_transmit(const uint8_t *data, uint16_t length) {
|
||||||
|
spi_status_t status = SPI_STATUS_ERROR;
|
||||||
|
|
||||||
|
for (uint16_t i = 0; i < length; i++) {
|
||||||
|
status = spi_write(data[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
spi_status_t spi_receive(uint8_t *data, uint16_t length) {
|
||||||
|
spi_status_t status = SPI_STATUS_ERROR;
|
||||||
|
|
||||||
|
for (uint16_t i = 0; i < length; i++) {
|
||||||
|
status = spi_read();
|
||||||
|
|
||||||
|
if (status > 0) {
|
||||||
|
data[i] = status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (status < 0) ? status : SPI_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
void spi_stop(void) {
|
||||||
|
if (currentSlavePin != NO_PIN) {
|
||||||
|
setPinOutput(currentSlavePin);
|
||||||
|
writePinHigh(currentSlavePin);
|
||||||
|
currentSlavePin = NO_PIN;
|
||||||
|
SPSR &= ~(_BV(SPI2X));
|
||||||
|
SPCR &= ~(currentSlaveConfig);
|
||||||
|
currentSlaveConfig = 0;
|
||||||
|
currentSlave2X = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
/* Copyright 2020
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
typedef int16_t spi_status_t;
|
||||||
|
|
||||||
|
// Hardware SS pin is defined in the header so that user code can refer to it
|
||||||
|
#if defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__) || defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__)
|
||||||
|
# define SPI_SS_PIN B0
|
||||||
|
#elif defined(__AVR_ATmega32A__)
|
||||||
|
# define SPI_SS_PIN B4
|
||||||
|
#elif defined(__AVR_ATmega328P__)
|
||||||
|
# define SPI_SS_PIN B2
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define SPI_STATUS_SUCCESS (0)
|
||||||
|
#define SPI_STATUS_ERROR (-1)
|
||||||
|
#define SPI_STATUS_TIMEOUT (-2)
|
||||||
|
|
||||||
|
#define SPI_TIMEOUT_IMMEDIATE (0)
|
||||||
|
#define SPI_TIMEOUT_INFINITE (0xFFFF)
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
void spi_init(void);
|
||||||
|
|
||||||
|
bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor);
|
||||||
|
|
||||||
|
spi_status_t spi_write(uint8_t data);
|
||||||
|
|
||||||
|
spi_status_t spi_read(void);
|
||||||
|
|
||||||
|
spi_status_t spi_transmit(const uint8_t *data, uint16_t length);
|
||||||
|
|
||||||
|
spi_status_t spi_receive(uint8_t *data, uint16_t length);
|
||||||
|
|
||||||
|
void spi_stop(void);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0x6F75 // OU
|
||||||
#define MANUFACTURER 1up Keyboards
|
#define MANUFACTURER 1up Keyboards
|
||||||
#define PRODUCT Sweet16
|
#define PRODUCT Sweet16
|
||||||
#define DESCRIPTION 4x4 grid
|
#define DESCRIPTION 4x4 grid
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT_ortho_4x4(
|
||||||
|
KC_7, KC_8, KC_9, KC_ASTR,
|
||||||
|
KC_4, KC_5, KC_6, KC_SLSH,
|
||||||
|
KC_1, KC_2, KC_3, KC_MINS,
|
||||||
|
KC_0, KC_ENT, KC_DOT, MO(1)
|
||||||
|
),
|
||||||
|
|
||||||
|
[1] = LAYOUT_ortho_4x4(
|
||||||
|
RESET, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
[2] = LAYOUT_ortho_4x4(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
[3] = LAYOUT_ortho_4x4(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
|
LTO_ENABLE = yes
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define PRODUCT_ID 0x2010
|
#define PRODUCT_ID 0x0161
|
||||||
#define DEVICE_VER 0x0001
|
#define DEVICE_VER 0x0001
|
||||||
|
|
||||||
/* key matrix pins */
|
/* key matrix pins */
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define PRODUCT_ID 0x2011
|
#define PRODUCT_ID 0x0162
|
||||||
#define DEVICE_VER 0x0001
|
#define DEVICE_VER 0x0001
|
||||||
|
|
||||||
/* key matrix pins */
|
/* key matrix pins */
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define PRODUCT_ID 0x2011
|
#define PRODUCT_ID 0x0162
|
||||||
#define DEVICE_VER 0x0001
|
#define DEVICE_VER 0x0001
|
||||||
|
|
||||||
/* key matrix pins */
|
/* key matrix pins */
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2019 Sebastian Williams
|
/* Copyright 2019 Spaceman
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2019 Sebastian Williams
|
/* Copyright 2019 Spaceman
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2019 Sebastian Williams
|
/* Copyright 2019 Spaceman
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"keyboard_name": "2% Milk",
|
"keyboard_name": "2% Milk",
|
||||||
"keyboard_folder": "2_milk",
|
"keyboard_folder": "2_milk",
|
||||||
"url": "",
|
"url": "",
|
||||||
"maintainer": "rionlion100",
|
"maintainer": "rionlion100 (Spaceman)",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
"height": 2,
|
"height": 2,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
@@ -12,4 +12,3 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
A 2% Meme board themed around a milk carton
|
A 2% Meme board themed around a milk carton
|
||||||
|
|
||||||
Keyboard Maintainer: [Rionlion100](https://github.com/rionlion100)
|
Keyboard Maintainer: Spaceman AKA:[Rionlion100](https://github.com/rionlion100)
|
||||||
Hardware Availability: [Open Source](https://github.com/Rionlion100/Spaceboards/tree/master/Keyboards/2%25%20Milk)
|
Hardware Availability: [Open Source](https://github.com/Rionlion100/Spaceboards/tree/master/Keyboards/2%25%20Milk)
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|||||||
@@ -331,7 +331,7 @@
|
|||||||
* @note The default is @p TRUE.
|
* @note The default is @p TRUE.
|
||||||
*/
|
*/
|
||||||
#if !defined(CH_CFG_USE_MEMCORE)
|
#if !defined(CH_CFG_USE_MEMCORE)
|
||||||
#define CH_CFG_USE_MEMCORE FALSE
|
#define CH_CFG_USE_MEMCORE TRUE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -331,7 +331,7 @@
|
|||||||
* @note The default is @p TRUE.
|
* @note The default is @p TRUE.
|
||||||
*/
|
*/
|
||||||
#if !defined(CH_CFG_USE_MEMCORE)
|
#if !defined(CH_CFG_USE_MEMCORE)
|
||||||
#define CH_CFG_USE_MEMCORE FALSE
|
#define CH_CFG_USE_MEMCORE TRUE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -0,0 +1,175 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2019 Ryota Goto
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xA103
|
||||||
|
#define PRODUCT_ID 0x0014
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER ai03 Design Studio
|
||||||
|
#define PRODUCT OrbitX
|
||||||
|
#define DESCRIPTION High-end compact ergonomic keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 8 // Double the rows for split
|
||||||
|
#define MATRIX_COLS 6
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MATRIX_ROW_PINS { D7, D6, D4, F0 }
|
||||||
|
#define MATRIX_COL_PINS { E6, F6, B1, B0, C7, C6 }
|
||||||
|
#define MATRIX_ROW_PINS_RIGHT { B5, D7, B4, D4 }
|
||||||
|
#define MATRIX_COL_PINS_RIGHT { D6, B6, B1, B0, B3, B2 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL*/
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||||
|
*/
|
||||||
|
#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
|
||||||
|
#define SPLIT_HAND_PIN D5
|
||||||
|
#define SPLIT_USB_DETECT
|
||||||
|
#define SPLIT_USB_TIMEOUT 2500
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||||
|
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||||
|
*/
|
||||||
|
// #define GRAVE_ESC_CTRL_OVERRIDE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Force NKRO
|
||||||
|
*
|
||||||
|
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||||
|
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||||
|
* makefile for this to work.)
|
||||||
|
*
|
||||||
|
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||||
|
* until the next keyboard reset.
|
||||||
|
*
|
||||||
|
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||||
|
* fully operational during normal computer usage.
|
||||||
|
*
|
||||||
|
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||||
|
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||||
|
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||||
|
* power-up.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//#define FORCE_NKRO
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Magic Key Options
|
||||||
|
*
|
||||||
|
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||||
|
* the keyboard. They are best used in combination with the HID Listen program,
|
||||||
|
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||||
|
*
|
||||||
|
* The options below allow the magic key functionality to be changed. This is
|
||||||
|
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* key combination for magic key command */
|
||||||
|
/* defined by default; to change, uncomment and set to the combination you want */
|
||||||
|
// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
|
||||||
|
|
||||||
|
/* control how magic key switches layers */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||||
|
|
||||||
|
/* override magic key keymap */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||||
|
//#define MAGIC_KEY_HELP H
|
||||||
|
//#define MAGIC_KEY_HELP_ALT SLASH
|
||||||
|
//#define MAGIC_KEY_DEBUG D
|
||||||
|
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||||
|
//#define MAGIC_KEY_DEBUG_KBD K
|
||||||
|
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||||
|
//#define MAGIC_KEY_VERSION V
|
||||||
|
//#define MAGIC_KEY_STATUS S
|
||||||
|
//#define MAGIC_KEY_CONSOLE C
|
||||||
|
//#define MAGIC_KEY_LAYER0 0
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT GRAVE
|
||||||
|
//#define MAGIC_KEY_LAYER1 1
|
||||||
|
//#define MAGIC_KEY_LAYER2 2
|
||||||
|
//#define MAGIC_KEY_LAYER3 3
|
||||||
|
//#define MAGIC_KEY_LAYER4 4
|
||||||
|
//#define MAGIC_KEY_LAYER5 5
|
||||||
|
//#define MAGIC_KEY_LAYER6 6
|
||||||
|
//#define MAGIC_KEY_LAYER7 7
|
||||||
|
//#define MAGIC_KEY_LAYER8 8
|
||||||
|
//#define MAGIC_KEY_LAYER9 9
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER B
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
|
||||||
|
//#define MAGIC_KEY_LOCK CAPS
|
||||||
|
//#define MAGIC_KEY_EEPROM E
|
||||||
|
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
|
||||||
|
//#define MAGIC_KEY_NKRO N
|
||||||
|
//#define MAGIC_KEY_SLEEP_LED Z
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
|
||||||
|
/* disable these deprecated features by default */
|
||||||
|
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||||
|
#define NO_ACTION_MACRO
|
||||||
|
#define NO_ACTION_FUNCTION
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Bootmagic Lite key configuration */
|
||||||
|
// #define BOOTMAGIC_LITE_ROW 0
|
||||||
|
// #define BOOTMAGIC_LITE_COLUMN 0
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Orbit-X",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "ai03",
|
||||||
|
"width": 13.5,
|
||||||
|
"height": 4.38,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"x":0, "y":0.38},
|
||||||
|
{"x":1, "y":0.38},
|
||||||
|
{"x":2, "y":0.13},
|
||||||
|
{"x":3, "y":0},
|
||||||
|
{"x":4, "y":0.13},
|
||||||
|
{"x":5, "y":0.25},
|
||||||
|
{"x":7.5, "y":0.25},
|
||||||
|
{"x":8.5, "y":0.13},
|
||||||
|
{"x":9.5, "y":0},
|
||||||
|
{"x":10.5, "y":0.13},
|
||||||
|
{"x":11.5, "y":0.38},
|
||||||
|
{"x":12.5, "y":0.38},
|
||||||
|
{"x":0, "y":1.38},
|
||||||
|
{"x":1, "y":1.38},
|
||||||
|
{"x":2, "y":1.13},
|
||||||
|
{"x":3, "y":1.0},
|
||||||
|
{"x":4, "y":1.13},
|
||||||
|
{"x":5, "y":1.25},
|
||||||
|
{"x":7.5, "y":1.25},
|
||||||
|
{"x":8.5, "y":1.13},
|
||||||
|
{"x":9.5, "y":1.0},
|
||||||
|
{"x":10.5, "y":1.13},
|
||||||
|
{"x":11.5, "y":1.38},
|
||||||
|
{"x":12.5, "y":1.38},
|
||||||
|
{"x":0, "y":2.38},
|
||||||
|
{"x":1, "y":2.38},
|
||||||
|
{"x":2, "y":2.13},
|
||||||
|
{"x":3, "y":2},
|
||||||
|
{"x":4, "y":2.13},
|
||||||
|
{"x":5, "y":2.25},
|
||||||
|
{"x":7.5, "y":2.25},
|
||||||
|
{"x":8.5, "y":2.13},
|
||||||
|
{"x":9.5, "y":2},
|
||||||
|
{"x":10.5, "y":2.13},
|
||||||
|
{"x":11.5, "y":2.38},
|
||||||
|
{"x":12.5, "y":2.38},
|
||||||
|
{"x":0, "y":3.38},
|
||||||
|
{"x":1, "y":3.38},
|
||||||
|
{"x":2, "y":3.13},
|
||||||
|
{"x":3, "y":3},
|
||||||
|
{"x":4.25, "y":3.38},
|
||||||
|
{"x":5.25, "y":3.25, "h":1.5},
|
||||||
|
{"x":7.25, "y":3.25, "h":1.5},
|
||||||
|
{"x":8.25, "y":3.38},
|
||||||
|
{"x":9.5, "y":3},
|
||||||
|
{"x":10.5, "y":3.13},
|
||||||
|
{"x":11.5, "y":3.38},
|
||||||
|
{"x":12.5, "y":3.38}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
/* Copyright 2019 Ryota Goto
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Defines names for use in layer keycodes and the keymap
|
||||||
|
enum layer_names {
|
||||||
|
_BASE,
|
||||||
|
_NUM,
|
||||||
|
_NAV,
|
||||||
|
_FN
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
||||||
|
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
||||||
|
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
|
||||||
|
L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
|
||||||
|
*/
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Base */
|
||||||
|
[_BASE] = LAYOUT(
|
||||||
|
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||||
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
|
||||||
|
MO(3), KC_TAB, KC_LGUI, KC_LALT, MO(2), KC_SPC, KC_SPC, MO(1), KC_TAB, KC_DEL, KC_PSCR, MO(3)
|
||||||
|
),
|
||||||
|
[_NUM] = LAYOUT(
|
||||||
|
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
|
||||||
|
_______, KC_GRV, KC_SLSH, KC_LBRC, KC_LPRN, KC_MINS, KC_EQL, KC_RPRN, KC_RBRC, KC_BSLS, XXXXXXX, _______,
|
||||||
|
_______, KC_TILD, KC_QUES, KC_LCBR, XXXXXXX, KC_UNDS, KC_PLUS, XXXXXXX, KC_RCBR, KC_PIPE, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[_NAV] = LAYOUT(
|
||||||
|
_______, XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, _______,
|
||||||
|
_______, XXXXXXX, KC_HOME, KC_PGDN, KC_END, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, _______,
|
||||||
|
_______, XXXXXXX, C(G(KC_LEFT)), XXXXXXX, C(G(KC_RGHT)), XXXXXXX, XXXXXXX, C(S(KC_TAB)), XXXXXXX, C(KC_TAB), XXXXXXX, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[_FN] = LAYOUT(
|
||||||
|
RESET, XXXXXXX, KC_F1, KC_F2, KC_F3, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, XXXXXXX, RESET,
|
||||||
|
_______, XXXXXXX, KC_F4, KC_F5, KC_F6, XXXXXXX, XXXXXXX, KC_F10, KC_F11, KC_F12, XXXXXXX, _______,
|
||||||
|
_______, XXXXXXX, KC_VOLD, XXXXXXX, KC_VOLU, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# The default keymap for orbit_x
|
||||||
|
|
||||||
|
Basic keymap that works well in most cases.
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
/* Copyright 2020 Ryota Goto
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Defines names for use in layer keycodes and the keymap
|
||||||
|
enum layer_names {
|
||||||
|
_BASE,
|
||||||
|
_NUM,
|
||||||
|
_NAV,
|
||||||
|
_FN
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
||||||
|
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
||||||
|
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
|
||||||
|
L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
|
||||||
|
*/
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Base */
|
||||||
|
[_BASE] = LAYOUT(
|
||||||
|
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||||
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
|
||||||
|
MO(3), KC_TAB, KC_LGUI, KC_LALT, MO(2), KC_SPC, KC_SPC, MO(1), KC_TAB, KC_DEL, KC_PSCR, MO(3)
|
||||||
|
),
|
||||||
|
[_NUM] = LAYOUT(
|
||||||
|
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
|
||||||
|
_______, KC_GRV, KC_SLSH, KC_LBRC, KC_LPRN, KC_MINS, KC_EQL, KC_RPRN, KC_RBRC, KC_BSLS, XXXXXXX, _______,
|
||||||
|
_______, KC_TILD, KC_QUES, KC_LCBR, XXXXXXX, KC_UNDS, KC_PLUS, XXXXXXX, KC_RCBR, KC_PIPE, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[_NAV] = LAYOUT(
|
||||||
|
_______, XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, _______,
|
||||||
|
_______, XXXXXXX, KC_HOME, KC_PGDN, KC_END, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, _______,
|
||||||
|
_______, XXXXXXX, C(G(KC_LEFT)), XXXXXXX, C(G(KC_RGHT)), XXXXXXX, XXXXXXX, C(S(KC_TAB)), XXXXXXX, C(KC_TAB), XXXXXXX, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[_FN] = LAYOUT(
|
||||||
|
RESET, XXXXXXX, KC_F1, KC_F2, KC_F3, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, XXXXXXX, RESET,
|
||||||
|
_______, XXXXXXX, KC_F4, KC_F5, KC_F6, XXXXXXX, XXXXXXX, KC_F10, KC_F11, KC_F12, XXXXXXX, _______,
|
||||||
|
_______, XXXXXXX, KC_VOLD, XXXXXXX, KC_VOLU, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# The via keymap for orbit_x
|
||||||
|
For use with VIA configurator only
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
/* Copyright 2019 Ryota Goto
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "orbit_x.h"
|
||||||
|
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
/* Copyright 2019 Ryota Goto
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/* This is a shortcut to help you visually see your layout.
|
||||||
|
*
|
||||||
|
* The first section contains all of the arguments representing the physical
|
||||||
|
* layout of the board and position of the keys.
|
||||||
|
*
|
||||||
|
* The second converts the arguments into a two-dimensional array which
|
||||||
|
* represents the switch matrix.
|
||||||
|
*/
|
||||||
|
#define LAYOUT( \
|
||||||
|
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
|
||||||
|
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
|
||||||
|
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
|
||||||
|
L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ L00, L01, L02, L03, L04, L05 }, \
|
||||||
|
{ L10, L11, L12, L13, L14, L15 }, \
|
||||||
|
{ L20, L21, L22, L23, L24, L25 }, \
|
||||||
|
{ L30, L31, L32, L33, L34, L35 }, \
|
||||||
|
{ R00, R01, R02, R03, R04, R05 }, \
|
||||||
|
{ R10, R11, R12, R13, R14, R15 }, \
|
||||||
|
{ R20, R21, R22, R23, R24, R25 }, \
|
||||||
|
{ R30, R31, R32, R33, R34, R35 }, \
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# Orbit-X
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A compact high-end split keyboard
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [ai03](https://github.com/ai03-2725)
|
||||||
|
* Hardware Supported: The Orbit-X keyboard PCB
|
||||||
|
* Hardware Availability: Deskeys for official kit; open-source PCB [here](https://github.com/ai03-2725/Orbit/tree/master/OrbitX-PCB)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make ai03/orbit_x:via
|
||||||
|
|
||||||
|
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).
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
MIDI_ENABLE = no # MIDI support
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||||
|
SPLIT_KEYBOARD = yes # Split keyboard
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
# Aplx6
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
A stylish (2x3) 6-key MediaPad for your music and browser shortcuts. Designed to be assembled as a sandwich with a blank PCB, using M2.5 screws and spacers, your choice of MX- or Alps-compatible switches, and 1N4148 diodes.
|
||||||
|
|
||||||
|
|
||||||
|
## RGB Underglow (WS2812)
|
||||||
|
|
||||||
|
Just wire them to any of the unused ProMicro pins. Don't forget to edit-uncomment the `config.h` and the `rules.mk` for RGB underglow support, or even add your own functions and modes. Used pins can be found in `config.h` or in the [KiCad Schematic](https://github.com/Aplyard/Aplx6/blob/master/kiCad/xd6.sch). All ProMicro pins can be found [here](https://golem.hu/article/pro-micro-pinout/) along with the +2 pins mod.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [Aplyard](https://github.com/Aplyard)
|
||||||
|
* Hardware Supported: Aplx6 PCB, Pro Micro (ATmega32U4)
|
||||||
|
* Hardware Availability: [GitHub](https://github.com/Aplyard/Aplx6)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make aplx6:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
|
|
||||||
|
---
|
||||||
|
****Designed in**:**
|
||||||
|
[KiCad](https://github.com/KiCad)
|
||||||
|
|
||||||
|
**Components Footprints & Libraries :**
|
||||||
|
[keebs.pretty](https://github.com/egladman/keebs.pretty)
|
||||||
|
[keyboard_parts.pretty
|
||||||
|
](https://github.com/tmk/keyboard_parts.pretty)
|
||||||
|
[ProMicro KiCad](https://github.com/Biacco42/ProMicroKiCad)
|
||||||
|
|
||||||
|
**Usefull Links:**
|
||||||
|
[Qmk Online Configurator](https://config.qmk.fm/#)
|
||||||
|
|
||||||
|
**Alternatives of qmk that worked for me:**
|
||||||
|
[Keyboard Layout Editor](http://www.keyboard-layout-editor.com/#/)
|
||||||
|
[Keyboard Plate & Case Builder](http://builder.swillkb.com/)
|
||||||
|
[Firmware Builder](https://kbfirmware.com/)
|
||||||
|
|
||||||
|
---
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 April Aplyard <[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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "aplx6.h"
|
||||||
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
k000, k001, k002, \
|
||||||
|
k100, k101, k102 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k000, k001, k002 }, \
|
||||||
|
{ k100, k101, k102 } \
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 April Aplyard <[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
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xE0E0
|
||||||
|
#define PRODUCT_ID 0x0030
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Aplyard
|
||||||
|
#define PRODUCT Aplx6
|
||||||
|
#define DESCRIPTION Aplx6 MediaPad
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 2
|
||||||
|
#define MATRIX_COLS 3
|
||||||
|
|
||||||
|
/* pin-out */
|
||||||
|
#define MATRIX_ROW_PINS { E6, B3 }
|
||||||
|
#define MATRIX_COL_PINS { F7, B6, F4 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
|
||||||
|
/* ws2812 RGB LED */
|
||||||
|
//#define RGB_DI_PIN X
|
||||||
|
|
||||||
|
//#define RGBLIGHT_ANIMATIONS
|
||||||
|
//#define RGBLED_NUM X // Number of LEDs
|
||||||
|
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
#define _MAIN 0
|
||||||
|
#define _FN 1
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap __MAIN: Default Layer
|
||||||
|
* ,--------------------------------.
|
||||||
|
* | .------. |-----|-----|-----| |
|
||||||
|
* | | | |Play |VolUp| Fn | |
|
||||||
|
* | | Pro | |-----|-----|-----| |
|
||||||
|
* | | Micro| --------------------|
|
||||||
|
* | | | |-----|-----|-----| |
|
||||||
|
* | '------' |Prev |VolD |Next | |
|
||||||
|
* | |||||| |-----|-----|-----| |
|
||||||
|
* '--------------------------------'
|
||||||
|
*/
|
||||||
|
[_MAIN] = LAYOUT(
|
||||||
|
KC_MPLY, KC_VOLU, MO(1),
|
||||||
|
KC_MPRV, KC_VOLD, KC_MNXT
|
||||||
|
),
|
||||||
|
/* Keymap __FN: Second Layer
|
||||||
|
* ,--------------------------------.
|
||||||
|
* | .------. |-----|-----|-----| |
|
||||||
|
* | | | |Calc |PgUp |TRANS| |
|
||||||
|
* | | Pro | |-----|-----|-----| |
|
||||||
|
* | | Micro| --------------------|
|
||||||
|
* | | | |-----|-----|-----| |
|
||||||
|
* | '------' |MyPC | PgD |RESET| |
|
||||||
|
* | |||||| |-----|-----|-----| |
|
||||||
|
* '--------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_FN] = LAYOUT(
|
||||||
|
KC_CALC, KC_PGUP, _______,
|
||||||
|
KC_MYCM, KC_PGDN, RESET
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
MIDI_ENABLE = no # MIDI support
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||||
|
UNICODE_ENABLE = yes # Unicode
|
||||||
@@ -331,7 +331,7 @@
|
|||||||
* @note The default is @p TRUE.
|
* @note The default is @p TRUE.
|
||||||
*/
|
*/
|
||||||
#if !defined(CH_CFG_USE_MEMCORE)
|
#if !defined(CH_CFG_USE_MEMCORE)
|
||||||
#define CH_CFG_USE_MEMCORE FALSE
|
#define CH_CFG_USE_MEMCORE TRUE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
/* Copyright 2020 yfuku
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "bat43.h"
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
/* Copyright 2020 yfuku
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/* This is a shortcut to help you visually see your layout.
|
||||||
|
*
|
||||||
|
* The first section contains all of the arguments representing the physical
|
||||||
|
* layout of the board and position of the keys.
|
||||||
|
*
|
||||||
|
* The second converts the arguments into a two-dimensional array which
|
||||||
|
* represents the switch matrix.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k30, k50, k51, k52, k53, k54, k55, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \
|
||||||
|
k33, k34, k35, k70, k71, k72, \
|
||||||
|
k74, k75, k73, k31, k32 \
|
||||||
|
) { \
|
||||||
|
{ k00, k01, k02, k03, k04, k05 }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15 }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25 }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35 }, \
|
||||||
|
{ k40, k41, k42, k43, k44, k45 }, \
|
||||||
|
{ k50, k51, k52, k53, k54, k55 }, \
|
||||||
|
{ k60, k61, k62, k63, k64, k65 }, \
|
||||||
|
{ k70, k71, k72, k73, k74, k75 }, \
|
||||||
|
}
|
||||||
@@ -0,0 +1,252 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 yfuku
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x1070
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER yfuku
|
||||||
|
#define PRODUCT bat43
|
||||||
|
#define DESCRIPTION 43key keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 8
|
||||||
|
#define MATRIX_COLS 6
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MATRIX_ROW_PINS { E6, D7, C6, D4, F7, F6, F5, F4 }
|
||||||
|
#define MATRIX_COL_PINS { B6, B2, B3, B1, B5, B4 }
|
||||||
|
// #define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL*/
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||||
|
*/
|
||||||
|
// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
|
||||||
|
|
||||||
|
// #define BACKLIGHT_PIN B7
|
||||||
|
// #define BACKLIGHT_BREATHING
|
||||||
|
// #define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
// #define RGB_DI_PIN E2
|
||||||
|
// #ifdef RGB_DI_PIN
|
||||||
|
// #define RGBLED_NUM 16
|
||||||
|
// #define RGBLIGHT_HUE_STEP 8
|
||||||
|
// #define RGBLIGHT_SAT_STEP 8
|
||||||
|
// #define RGBLIGHT_VAL_STEP 8
|
||||||
|
// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
||||||
|
// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||||
|
// /*== all animations enable ==*/
|
||||||
|
// #define RGBLIGHT_ANIMATIONS
|
||||||
|
// /*== or choose animations ==*/
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHING
|
||||||
|
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||||
|
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||||
|
// #define RGBLIGHT_EFFECT_SNAKE
|
||||||
|
// #define RGBLIGHT_EFFECT_KNIGHT
|
||||||
|
// #define RGBLIGHT_EFFECT_CHRISTMAS
|
||||||
|
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||||
|
// #define RGBLIGHT_EFFECT_RGB_TEST
|
||||||
|
// #define RGBLIGHT_EFFECT_ALTERNATING
|
||||||
|
// /*== customize breathing effect ==*/
|
||||||
|
// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
|
||||||
|
// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
|
||||||
|
// /*==== use exp() and sin() ====*/
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
// #define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
// #define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||||
|
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||||
|
*/
|
||||||
|
// #define GRAVE_ESC_CTRL_OVERRIDE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Force NKRO
|
||||||
|
*
|
||||||
|
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||||
|
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||||
|
* makefile for this to work.)
|
||||||
|
*
|
||||||
|
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||||
|
* until the next keyboard reset.
|
||||||
|
*
|
||||||
|
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||||
|
* fully operational during normal computer usage.
|
||||||
|
*
|
||||||
|
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||||
|
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||||
|
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||||
|
* power-up.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//#define FORCE_NKRO
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Magic Key Options
|
||||||
|
*
|
||||||
|
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||||
|
* the keyboard. They are best used in combination with the HID Listen program,
|
||||||
|
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||||
|
*
|
||||||
|
* The options below allow the magic key functionality to be changed. This is
|
||||||
|
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* key combination for magic key command */
|
||||||
|
/* defined by default; to change, uncomment and set to the combination you want */
|
||||||
|
// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
|
||||||
|
|
||||||
|
/* control how magic key switches layers */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||||
|
|
||||||
|
/* override magic key keymap */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||||
|
//#define MAGIC_KEY_HELP H
|
||||||
|
//#define MAGIC_KEY_HELP_ALT SLASH
|
||||||
|
//#define MAGIC_KEY_DEBUG D
|
||||||
|
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||||
|
//#define MAGIC_KEY_DEBUG_KBD K
|
||||||
|
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||||
|
//#define MAGIC_KEY_VERSION V
|
||||||
|
//#define MAGIC_KEY_STATUS S
|
||||||
|
//#define MAGIC_KEY_CONSOLE C
|
||||||
|
//#define MAGIC_KEY_LAYER0 0
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT GRAVE
|
||||||
|
//#define MAGIC_KEY_LAYER1 1
|
||||||
|
//#define MAGIC_KEY_LAYER2 2
|
||||||
|
//#define MAGIC_KEY_LAYER3 3
|
||||||
|
//#define MAGIC_KEY_LAYER4 4
|
||||||
|
//#define MAGIC_KEY_LAYER5 5
|
||||||
|
//#define MAGIC_KEY_LAYER6 6
|
||||||
|
//#define MAGIC_KEY_LAYER7 7
|
||||||
|
//#define MAGIC_KEY_LAYER8 8
|
||||||
|
//#define MAGIC_KEY_LAYER9 9
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER B
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
|
||||||
|
//#define MAGIC_KEY_LOCK CAPS
|
||||||
|
//#define MAGIC_KEY_EEPROM E
|
||||||
|
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
|
||||||
|
//#define MAGIC_KEY_NKRO N
|
||||||
|
//#define MAGIC_KEY_SLEEP_LED Z
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
|
||||||
|
/* disable these deprecated features by default */
|
||||||
|
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||||
|
#define NO_ACTION_MACRO
|
||||||
|
#define NO_ACTION_FUNCTION
|
||||||
|
#endif
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
//#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
* HD44780 LCD Display Configuration
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
#define LCD_LINES 2 //< number of visible lines of the display
|
||||||
|
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
|
||||||
|
|
||||||
|
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
|
||||||
|
|
||||||
|
#if LCD_IO_MODE
|
||||||
|
#define LCD_PORT PORTB //< port for the LCD lines
|
||||||
|
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
|
||||||
|
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
|
||||||
|
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
|
||||||
|
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
|
||||||
|
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
|
||||||
|
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
|
||||||
|
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||||
|
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
|
||||||
|
#define LCD_RS_PORT LCD_PORT //< port for RS line
|
||||||
|
#define LCD_RS_PIN 3 //< pin for RS line
|
||||||
|
#define LCD_RW_PORT LCD_PORT //< port for RW line
|
||||||
|
#define LCD_RW_PIN 2 //< pin for RW line
|
||||||
|
#define LCD_E_PORT LCD_PORT //< port for Enable line
|
||||||
|
#define LCD_E_PIN 1 //< pin for Enable line
|
||||||
|
#endif
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Bootmagic Lite key configuration */
|
||||||
|
// #define BOOTMAGIC_LITE_ROW 0
|
||||||
|
// #define BOOTMAGIC_LITE_COLUMN 0
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "bat43",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "yfuku",
|
||||||
|
"width": 15,
|
||||||
|
"height": 5.1,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"k00", "x":0, "y":1.43},
|
||||||
|
{"label":"k01", "x":1, "y":1.11},
|
||||||
|
{"label":"k02", "x":2, "y":0.38},
|
||||||
|
{"label":"k03", "x":3, "y":0},
|
||||||
|
{"label":"k04", "x":4, "y":0.05},
|
||||||
|
{"label":"k05", "x":5, "y":0.16},
|
||||||
|
|
||||||
|
{"label":"k40", "x":9, "y":0.16},
|
||||||
|
{"label":"k41", "x":10, "y":0.05},
|
||||||
|
{"label":"k42", "x":11, "y":0},
|
||||||
|
{"label":"k43", "x":12, "y":0.38},
|
||||||
|
{"label":"k44", "x":13, "y":1.11},
|
||||||
|
{"label":"k45", "x":14, "y":1.43},
|
||||||
|
|
||||||
|
{"label":"k10", "x":0, "y":2.43},
|
||||||
|
{"label":"k11", "x":1, "y":2.11},
|
||||||
|
{"label":"k12", "x":2, "y":1.38},
|
||||||
|
{"label":"k13", "x":3, "y":1},
|
||||||
|
{"label":"k14", "x":4, "y":1.05},
|
||||||
|
{"label":"k15", "x":5, "y":1.16},
|
||||||
|
|
||||||
|
{"label":"k30", "x":7, "y":1.16},
|
||||||
|
|
||||||
|
{"label":"k50", "x":9, "y":1.16},
|
||||||
|
{"label":"k51", "x":10, "y":1.05},
|
||||||
|
{"label":"k52", "x":11, "y":1},
|
||||||
|
{"label":"k53", "x":12, "y":1.38},
|
||||||
|
{"label":"k54", "x":13, "y":2.11},
|
||||||
|
{"label":"k55", "x":14, "y":2.43},
|
||||||
|
|
||||||
|
{"label":"k20", "x":0, "y":3.43},
|
||||||
|
{"label":"k21", "x":1, "y":3.11},
|
||||||
|
{"label":"k22", "x":2, "y":2.38},
|
||||||
|
{"label":"k23", "x":3, "y":2},
|
||||||
|
{"label":"k24", "x":4, "y":2.05},
|
||||||
|
{"label":"k25", "x":5, "y":2.16},
|
||||||
|
|
||||||
|
{"label":"k60", "x":9, "y":2.16},
|
||||||
|
{"label":"k61", "x":10, "y":2.05},
|
||||||
|
{"label":"k62", "x":11, "y":2},
|
||||||
|
{"label":"k63", "x":12, "y":2.38},
|
||||||
|
{"label":"k64", "x":13, "y":3.11},
|
||||||
|
{"label":"k65", "x":14, "y":3.43},
|
||||||
|
|
||||||
|
{"label":"k33", "x":4, "y":3.3},
|
||||||
|
{"label":"k34", "x":5, "y":3.3},
|
||||||
|
{"label":"k35", "x":6, "y":3.3},
|
||||||
|
|
||||||
|
{"label":"k70", "x":8, "y":3.3},
|
||||||
|
{"label":"k71", "x":9, "y":3.3},
|
||||||
|
{"label":"k72", "x":10, "y":3.3},
|
||||||
|
|
||||||
|
{"label":"k74", "x":5.1, "y":4.3, "w":0.8, "h":0.8},
|
||||||
|
{"label":"k75", "x":6.1, "y":4.3, "w":0.8, "h":0.8},
|
||||||
|
|
||||||
|
{"label":"k73", "x":8.1, "y":4.3, "w":0.8, "h":0.8},
|
||||||
|
{"label":"k31", "x":9.1, "y":4.3, "w":0.8, "h":0.8},
|
||||||
|
{"label":"k32", "x":10.1, "y":4.3, "w":0.8, "h":0.8}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
/* Copyright 2020 yfuku
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Defines names for use in layer keycodes and the keymap
|
||||||
|
enum layer_names {
|
||||||
|
_BASE,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE
|
||||||
|
};
|
||||||
|
|
||||||
|
#define L_SPC LT(_LOWER, KC_SPC)
|
||||||
|
#define R_ENT LT(_RAISE, KC_ENT)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_BASE] = LAYOUT(
|
||||||
|
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS,
|
||||||
|
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_BSPC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RSFT,
|
||||||
|
KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RCTL,
|
||||||
|
KC_LGUI, KC_LANG2,L_SPC, R_ENT, KC_LANG1,KC_RALT,
|
||||||
|
KC_A, KC_B, KC_C, KC_D, KC_E
|
||||||
|
),
|
||||||
|
[_LOWER] = LAYOUT(
|
||||||
|
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_EQL, KC_PLUS, KC_ASTR, KC_PERC, _______,
|
||||||
|
_______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
|
||||||
|
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, KC_DEL, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[_RAISE] = LAYOUT(
|
||||||
|
_______, KC_BSLS, KC_EXLM, KC_AMPR, KC_PIPE, XXXXXXX, XXXXXXX, KC_EQL, KC_PLUS, KC_ASTR, KC_PERC, _______,
|
||||||
|
_______, KC_HASH, KC_GRV, KC_DQT, KC_QUOT, KC_TILD, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DLR, _______,
|
||||||
|
_______, XXXXXXX, XXXXXXX, KC_LCBR, KC_LBRC, KC_LPRN, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT, KC_CIRC, _______,
|
||||||
|
_______, _______, KC_BSPC, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# The default keymap for bat43
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# bat43
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A 43-key keyboard.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [yfuku](https://github.com/yfuku)
|
||||||
|
* Hardware Supported: bat43 PCB, Pro Micro
|
||||||
|
* Hardware Availability: https://yfuku.booth.pm/
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make bat43: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).
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = no # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
MIDI_ENABLE = no # MIDI support
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||||
@@ -19,8 +19,8 @@
|
|||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0x4B50 // "KP"
|
||||||
#define PRODUCT_ID 0x424D
|
#define PRODUCT_ID 0x016A
|
||||||
#define DEVICE_VER 0x0001
|
#define DEVICE_VER 0x0001
|
||||||
#define MANUFACTURER KPrepublic
|
#define MANUFACTURER KPrepublic
|
||||||
#define PRODUCT bm16a
|
#define PRODUCT bm16a
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
/* Copyright 2019
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum layers {
|
||||||
|
_BASE = 0,
|
||||||
|
_FN1,
|
||||||
|
_FN2,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[0] = LAYOUT_ortho_4x4(
|
||||||
|
KC_PGUP, KC_HOME, KC_UP, KC_END ,
|
||||||
|
KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT,
|
||||||
|
KC_DOT, KC_VOLU, KC_MPLY, KC_MPRV,
|
||||||
|
MO(1), KC_VOLD, KC_MUTE, KC_MNXT
|
||||||
|
),
|
||||||
|
[1] = LAYOUT_ortho_4x4(
|
||||||
|
RESET, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
[2] = LAYOUT_ortho_4x4(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
[3] = LAYOUT_ortho_4x4(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# Via keymap for bm16a
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
|
LTO_ENABLE = yes
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 mechmerlin
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0x6969
|
||||||
|
#define PRODUCT_ID 0x0001
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER botanicalkeyboards
|
||||||
|
#define PRODUCT fm2u
|
||||||
|
#define DESCRIPTION A 1 key macropad
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 1
|
||||||
|
#define MATRIX_COLS 1
|
||||||
|
|
||||||
|
/* Keyboard Matrix Assignments */
|
||||||
|
#define DIRECT_PINS { \
|
||||||
|
{ C4 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL*/
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
/* Copyright 2020 mechmerlin
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "fm2u.h"
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
/* Copyright 2020 mechmerlin
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/* This is a shortcut to help you visually see your layout.
|
||||||
|
*
|
||||||
|
* The first section contains all of the arguments representing the physical
|
||||||
|
* layout of the board and position of the keys.
|
||||||
|
*
|
||||||
|
* The second converts the arguments into a two-dimensional array which
|
||||||
|
* represents the switch matrix.
|
||||||
|
*/
|
||||||
|
#define LAYOUT_100u( \
|
||||||
|
k00 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_125u LAYOUT_100u
|
||||||
|
#define LAYOUT_150u LAYOUT_100u
|
||||||
|
#define LAYOUT_175u LAYOUT_100u
|
||||||
|
#define LAYOUT_200u LAYOUT_100u
|
||||||
|
#define LAYOUT_225u LAYOUT_100u
|
||||||
|
#define LAYOUT_275u LAYOUT_100u
|
||||||
|
#define LAYOUT_300u LAYOUT_100u
|
||||||
|
#define LAYOUT_600u LAYOUT_100u
|
||||||
|
#define LAYOUT_625u LAYOUT_100u
|
||||||
|
#define LAYOUT_700u LAYOUT_100u
|
||||||
|
#define LAYOUT_iso LAYOUT_100u
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "fm2u",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 1,
|
||||||
|
"height": 1,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_100u": {
|
||||||
|
"layout": [{"x":0, "y":0}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_125u": {
|
||||||
|
"layout": [{"x":0, "y":0, "w":1.25}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_150u": {
|
||||||
|
"layout": [{"x":0, "y":0, "w":1.50}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_175u": {
|
||||||
|
"layout": [{"x":0, "y":0, "w":1.75}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_200u": {
|
||||||
|
"layout": [{"x":0, "y":0, "w":2.00}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_225u": {
|
||||||
|
"layout": [{"x":0, "y":0, "w":2.25}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_275u": {
|
||||||
|
"layout": [{"x":0, "y":0, "w":2.75}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_300u": {
|
||||||
|
"layout": [{"x":0, "y":0, "w":3.00}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_600u": {
|
||||||
|
"layout": [{"x":0, "y":0, "w":6.00}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_625u": {
|
||||||
|
"layout": [{"x":0, "y":0, "w":6.25}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_700u": {
|
||||||
|
"layout": [{"x":0, "y":0, "w":7.00}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_iso": {
|
||||||
|
"layout": [{"x":0.25, "y":0, "w":1.25, "h":2}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
/* Copyright 2020 mechmerlin
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Base */
|
||||||
|
[0] = LAYOUT_100u(
|
||||||
|
KC_B
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
/* Copyright 2020 mechmerlin
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Base */
|
||||||
|
[0] = LAYOUT_100u(
|
||||||
|
KC_B
|
||||||
|
),
|
||||||
|
|
||||||
|
[1] = LAYOUT_100u(
|
||||||
|
KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
[2] = LAYOUT_100u(
|
||||||
|
KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
[3] = LAYOUT_100u(
|
||||||
|
KC_TRNS
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
|
LTO_ENABLE = yes
|
||||||
|
|
||||||
|
EXTRAKEY_ENABLE = no
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# fm2u
|
||||||
|
|
||||||
|
A 1 key macropad with USB C and atmega32u2 microcontroller.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
|
||||||
|
* Hardware Supported: fm2u PCB
|
||||||
|
* Hardware Availability: TBD
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make botanicalkeyboards/fm2u:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u2
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
MIDI_ENABLE = no # MIDI support
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# # Dennytom's Butterstick Layout
|
||||||
|
|
||||||
|
This keymap is using a custom chording engine. Head out to my (DennyTom) user space to find the source files and details.
|
||||||
|
|
||||||
|
To make a real keymap from the JSON file, run
|
||||||
|
|
||||||
|
```sh
|
||||||
|
python3 parser.py keymap_def.json keymap.c
|
||||||
|
```
|
||||||
|
|
||||||
|
Somehow it fits the whole keyboard on 20 keys. For longer typing sessions, use the ASET NIOP mode.
|
||||||
Loaded 100 of 601 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user