You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Joakim Tufvegren 0ae20e7457
Make solo half of split keyboards (more) usable. (#13523)
* Make solo half of split keyboards (more) usable.

Using only one half of a split keyboard (that's using the split_common
framework to communicate) is not a great experience, since several read
timeouts per scan cycle cause an unusably slow scan rate.

This change blocks all split communication attempts for 500 ms
(configurable) after an error occurs, causing the scan rate to become at
least _more_ usable, but might need some tweaking to work fully on most
keyboards. One read timeout still needs to occur after the 500 ms has
passed, and if that timeout isn't low enough, some scan cycles may still
be too slow.

* Fix lint complaint.

* Require 25 consecutive comm errors to see comms as disconnected.

The number of max errors can be overridden by defining
`SPLIT_MAX_CONNECTION_ERRORS`.

* Add comments to new defines, and ability to disable disconnection check.

Also increase `SPLIT_MAX_CONNECTION_ERRORS` to 40, since it's divisible
by most relevant numbers for the description.

* Make lint happy ...again

* Only update `connection_check_timer` when needed.

* Add new defines to split keyboard documentation.

* Move connection timeout logic to transport.c, add `is_transport_connected`.

* Use split_common disconnection logic in matrix.c.

Instead of doing more or less the same thing twice.

* Move disconnection logic to `transport_master`.

Is a cleaner implementation, and causes the scan rate while disconnected
to increase instead of decrease.

* Lint fixes.

* Lower default `SERIAL_USART_TIMEOUT` to 20 ms.

The read timeout must be low enough to not cause exessively long scan
cycles when using a solo split half. 10 ms was determined from testing
to work fine even with the slowest defined baudrate of 19200 (5 ms was
too low for that case), so 20 ms should be fine for most cases.

* Remove `SERIAL_USART_TIMEOUT` from ergodox_infinity/config.h

Was somewhat mistakenly included in an earlier PR.

* Fix building with `USE_I2C`.

* Reduce built firmware size.

Not really sure why this works, the idea was taken from tzarc's work on
split disconnection.

* Tweak and improve opt-out for split disconnection logic.

There are now two ways to opt out from this feature:
* Set `SPLIT_MAX_CONNECTION_ERRORS` to 0. This will completely disable
  the connection status checks (also affects the slave matrix reset logic in
  matrix.c, though).
* Set `SPLIT_CONNECTION_CHECK_TIMEOUT` to 0. This will only disable the
  communication throttling while disconnected. Will make the firmware
  smaller.

* Make split disconnection logic work with custom transports.

Includes a fallback implementation for keyboards using a custom
split_util.c but not a custom matrix.c (currently no such keyboard seems
to be merged, though).

* Remove unnecessary include of timer.h

Co-authored-by: Joel Challis <git@zvecr.com>

Co-authored-by: Joel Challis <git@zvecr.com>
4 years ago
..
ChangeLog Update 20210529.md (#13170) 4 years ago
de Merge remote-tracking branch 'origin/master' into develop 4 years ago
es Merge remote-tracking branch 'origin/master' into develop 4 years ago
fr-fr Merge remote-tracking branch 'origin/master' into develop 4 years ago
gitbook/images
he-il [Core] [Docs] Remove travis-ci references (#13916) 4 years ago
ja Merge remote-tracking branch 'origin/master' into develop 4 years ago
ko-kr [Core] [Docs] Remove travis-ci references (#13916) 4 years ago
pt-br [Core] [Docs] Remove travis-ci references (#13916) 4 years ago
ru-ru [Core] [Docs] Remove travis-ci references (#13916) 4 years ago
zh-cn Merge remote-tracking branch 'origin/master' into develop 4 years ago
.nojekyll
CNAME
README.md Small tweaks to docs to make them more user friendly (#11518) 5 years ago
_langs.md
_summary.md Digitizer HID interface : absolute coordinates for mouse cursor (#12851) 4 years ago
adc_driver.md 2021 May 29 Breaking Changes Update (#13034) 5 years ago
api_development_environment.md
api_development_overview.md
api_docs.md [Docs] Use HTTPS for images and links where possible (#11695) 5 years ago
api_overview.md [Docs] Use HTTPS for images and links where possible (#11695) 5 years ago
arm_debugging.md
audio_driver.md Audio system overhaul (#11820) 5 years ago
breaking_changes.md Merge remote-tracking branch 'origin/master' into develop 4 years ago
breaking_changes_history.md 2021 May 29 Breaking Changes Update (#13034) 5 years ago
breaking_changes_instructions.md
chibios_upgrade_instructions.md Update ChibiOS, ChibiOS-Contrib. (#13056) 5 years ago
cli.md
cli_commands.md `--parallel` improvements (#13800) 4 years ago
cli_configuration.md
cli_development.md CLI/Docs: Fix the format commands' name (#13668) 4 years ago
cli_tab_complete.md Add support for tab completion (#12411) 5 years ago
coding_conventions_c.md [Docs] Use HTTPS for images and links where possible (#11695) 5 years ago
coding_conventions_python.md
compatible_microcontrollers.md Add support for STM32F407x MCUs. (#13718) 4 years ago
config_options.md Enable sync of OLED/ST7565 display on/off state on Splits (#13542) 4 years ago
configurator_architecture.md Architecture documentation for Configurator and API (#13935) 4 years ago
configurator_default_keymaps.md
configurator_diagram.drawio Architecture documentation for Configurator and API (#13935) 4 years ago
configurator_diagram.svg Architecture documentation for Configurator and API (#13935) 4 years ago
configurator_step_by_step.md
configurator_troubleshooting.md
contributing.md [Core] [Docs] Remove travis-ci references (#13916) 4 years ago
custom_matrix.md
custom_quantum_functions.md Remove Full Bootmagic (#13846) 4 years ago
data_driven_config.md Create a system to map between info.json and config.h/rules.mk (#11548) 5 years ago
documentation_best_practices.md
documentation_templates.md [Docs] Use HTTPS for images and links where possible (#11695) 5 years ago
driver_installation_zadig.md Remove Full Bootmagic (#13846) 4 years ago
easy_maker.md [Keyboard] ez_maker/directpins for easy one-offs in qmk_configurator (#13321) 4 years ago
eeprom_driver.md eeprom_i2c driver: added EXTERNAL_EEPROM_WP_PIN configuration option. (#12617) 5 years ago
faq_build.md [Docs] Use HTTPS for images and links where possible (#11695) 5 years ago
faq_debug.md Allow output of logging when running unit tests (#13556) 4 years ago
faq_general.md Fix typos and reword some sentences in FAQs (#11546) 5 years ago
faq_keymap.md Remove Full Bootmagic (#13846) 4 years ago
faq_misc.md [Docs] Use HTTPS for images and links where possible (#11695) 5 years ago
feature_advanced_keycodes.md Additional documentation for GUI mod combo (#13266) 5 years ago
feature_audio.md Fixup Audio startup and add to documents (#13606) 4 years ago
feature_auto_shift.md 2021 May 29 Breaking Changes Update (#13034) 5 years ago
feature_backlight.md 2021 May 29 Breaking Changes Update (#13034) 5 years ago
feature_bluetooth.md
feature_bootmagic.md Remove Full Bootmagic (#13846) 4 years ago
feature_combo.md Process combos earlier & overlapping combos (#8591) 4 years ago
feature_command.md Remove Full Bootmagic (#13846) 4 years ago
feature_debounce_type.md Remove backwards compatibility of debounce names (#13877) 4 years ago
feature_digitizer.md Digitizer HID interface : absolute coordinates for mouse cursor (#12851) 4 years ago
feature_dip_switch.md Added right vs left specific pin assignments for dip switch (#13074) 4 years ago
feature_dynamic_macros.md
feature_encoders.md Allow for removal of hysteresis on 4x encoders (#13698) 4 years ago
feature_grave_esc.md
feature_haptic_feedback.md Add Per Key exclusions for Haptic Feedback (#12386) 5 years ago
feature_hd44780.md
feature_joystick.md
feature_key_lock.md
feature_key_overrides.md [Feature] Key Overrides (#11422) 4 years ago
feature_layers.md Improve upon the 'Caveats' section of the Layers and Mod-Tap documentation (#12306) 5 years ago
feature_layouts.md
feature_leader_key.md 2021 May 29 Breaking Changes Update (#13034) 5 years ago
feature_led_indicators.md [Docs] Added note about no split support (#12512) 4 years ago
feature_led_matrix.md Rgb matrix/enable modes explicitly (#13758) 4 years ago
feature_macros.md [Docs] New section to modifier docs: Checking Modifier State (#10550) 5 years ago
feature_midi.md [Docs] added basic midi documention of common features (#13113) 5 years ago
feature_mouse_keys.md Add support for 8 buttons to mouse report (#10807) 5 years ago
feature_oled_driver.md Add oled_invert (#13172) 5 years ago
feature_pointing_device.md Merge remote-tracking branch 'origin/master' into develop 5 years ago
feature_ps2_mouse.md [Feature] Swap buttons on PS2 Mouse/Trackball (#9205) 4 years ago
feature_rawhid.md Updated Raw HID docs to clarify packet/report length (#11211) 5 years ago
feature_rgb_matrix.md Rgb matrix/enable modes explicitly (#13758) 4 years ago
feature_rgblight.md Retain brightness with lighting layers (#13025) 4 years ago
feature_sequencer.md Ensure single newline at EOF for core files (#11310) 5 years ago
feature_space_cadet.md [Docs] Use HTTPS for images and links where possible (#11695) 5 years ago
feature_split_keyboard.md Make solo half of split keyboards (more) usable. (#13523) 4 years ago
feature_st7565.md ST7565 invert (#13237) 5 years ago
feature_stenography.md Steno combinedkeys (#12538) 4 years ago
feature_swap_hands.md 2021 May 29 Breaking Changes Update (#13034) 5 years ago
feature_tap_dance.md matrix_scan_x -> x_task (#13748) 4 years ago
feature_terminal.md
feature_thermal_printer.md
feature_unicode.md 2021 May 29 Breaking Changes Update (#13034) 5 years ago
feature_userspace.md
feature_velocikey.md
feature_wpm.md Update feature_wpm.md (#13936) 4 years ago
flashing.md Remove Full Bootmagic (#13846) 4 years ago
flashing_bootloadhid.md
fuse.txt Ensure single newline at EOF for core files (#11310) 5 years ago
getting_started_docker.md Add support for using podman to util/docker_build.sh (#10819) 5 years ago
getting_started_github.md [Docs] Use HTTPS for images and links where possible (#11695) 5 years ago
getting_started_introduction.md
getting_started_make_guide.md Documentation update (#12484) 5 years ago
getting_started_vagrant.md [Docs] Use HTTPS for images and links where possible (#11695) 5 years ago
hand_wire.md [Docs] Added information on soldering diodes in parallel (#13117) 4 years ago
hardware_avr.md Port new_keyboard.sh to CLI (#13706) 4 years ago
hardware_drivers.md
hardware_keyboard_guidelines.md Remove Full Bootmagic (#13846) 4 years ago
how_a_matrix_works.md [Docs] Use HTTPS for images and links where possible (#11695) 5 years ago
how_keyboards_work.md
i2c_driver.md Rework I2C driver docs (#11658) 5 years ago
index.html Simplify the visual flow of the getting started page (#11316) 5 years ago
internals_defines.md
internals_gpio_control.md [Docs] Use HTTPS for images and links where possible (#11695) 5 years ago
internals_input_callback_reg.md
internals_midi_device.md
internals_midi_device_setup_process.md
internals_midi_util.md
internals_send_functions.md
internals_sysex_tools.md
isp_flashing_guide.md [Docs] Update isp_flashing_guide.md (#11777) 5 years ago
keycodes.md Remove Full Bootmagic (#13846) 4 years ago
keycodes_basic.md Update keycode docs (#11343) 5 years ago
keycodes_magic.md Add a toggle key for GUI On/Off in Magic feature (#13830) 4 years ago
keycodes_us_ansi_shifted.md
keymap.md
mod_tap.md Add Mac centric Shift and Alt + GUI Macros (#13107) 5 years ago
newbs.md [Docs] Use HTTPS for images and links where possible (#11695) 5 years ago
newbs_building_firmware.md
newbs_building_firmware_configurator.md Small tweaks to docs to make them more user friendly (#11518) 5 years ago
newbs_flashing.md A few small typo fixes in docs (#12524) 5 years ago
newbs_getting_started.md Update FreeBSD install method (#12815) 5 years ago
newbs_git_best_practices.md
newbs_git_resolving_merge_conflicts.md
newbs_git_resynchronize_a_branch.md
newbs_git_using_your_master_branch.md
newbs_learn_more_resources.md Small tweaks to docs to make them more user friendly (#11518) 5 years ago
newbs_testing_debugging.md Small tweaks to docs to make them more user friendly (#11518) 5 years ago
one_shot_keys.md fix: Fix typo in documentation for one shot keys. ON_TOGG -> OS_TOGG (#13754) 4 years ago
other_eclipse.md eclipse: recommend changing the default project make target (#12447) 5 years ago
other_vscode.md [Core] [Docs] Remove travis-ci references (#13916) 4 years ago
platformdev_chibios_earlyinit.md Ensure single newline at EOF for core files (#11310) 5 years ago
platformdev_selecting_arm_mcu.md
power.txt
pr_checklist.md Explicitly state that VIA should not be enabled in the default keymap. (#13803) 4 years ago
proton_c_conversion.md
qmk.css
qmk_custom_dark.css Small tweaks to docs to make them more user friendly (#11518) 5 years ago
qmk_custom_light.css Small tweaks to docs to make them more user friendly (#11518) 5 years ago
quantum_keycodes.md
redirects.json
ref_functions.md Remove Full Bootmagic (#13846) 4 years ago
reference_configurator_support.md Remove references to info.json `width` and `height` in CLI (#13728) 4 years ago
reference_glossary.md [Docs] Use HTTPS for images and links where possible (#11695) 5 years ago
reference_info_json.md Remove references to info.json `width` and `height` in CLI (#13728) 4 years ago
reference_keymap_extras.md Rework keymap_extras docs (#13949) 4 years ago
serial_driver.md Make solo half of split keyboards (more) usable. (#13523) 4 years ago
spi_driver.md Merge remote-tracking branch 'upstream/master' into develop 5 years ago
support.md
sw.js
syllabus.md Remove Full Bootmagic (#13846) 4 years ago
tap_hold.md Add HOLD_ON_OTHER_KEY_PRESS option for dual-role keys (#9404) 4 years ago
translating.md
uart_driver.md UART driver refactor (#11637) 5 years ago
understanding_qmk.md [Feature] Key Overrides (#11422) 4 years ago
unit_testing.md Allow output of logging when running unit tests (#13556) 4 years ago
usb_nkro.txt
ws2812_driver.md Fix up WS2812 SPI driver on F072. (#13022) 5 years ago

README.md

Quantum Mechanical Keyboard Firmware

What is QMK Firmware?

QMK (Quantum Mechanical Keyboard) is an open source community centered around developing computer input devices. The community encompasses all sorts of input devices, such as keyboards, mice, and MIDI devices. A core group of collaborators maintains QMK Firmware, QMK Configurator, QMK Toolbox, qmk.fm, and this documentation with the help of community members like you.

Get Started

?> Basic QMK Configurator
User friendly graphical interfaces, no programming knowledge required.

?> Advanced Use The Source
More powerful, but harder to use.

Make It Yours

QMK has lots of features to explore, and a good deal of reference documentation to dig through. Most features are taken advantage of by modifying your keymap, and changing the keycodes.

Need help?

Check out the support page to see how you can get help using QMK.

Give Back

There are a lot of ways you can contribute to the QMK Community. The easiest way to get started is to use it and spread the word to your friends.