qmk_sweep_skeletyl/docs
a-chol d4be07dad3 Hid joystick interface (#4226)
* add support for hid gamepad interface
add documentation for HID joystick
Add joystick_task to read analog axes values even when no key is pressed or release. update doc
Update docs/feature_joystick.md
Manage pin setup and read to maintain matrix scan after analog read

* Incorporates patches and changes to HID reporting

There are some patches provided by @a-chol incorporated on this commit,
and also some changes I made to the HID Report structure.

The most interesting is the one dealing with number of buttons: Linux
doesn't seem to care, but Windows requires the HID structure to be byte
aligned (that's in the spec). So if one declares 8/16/32... buttons they
should not have any issues, but this is what happens when you have 9
buttons:

```
 bits |0|1|2|3|4|5|6|7|
      |*|*|*|*|*|*|*|*| axis 0 (report size 8)
      |*|*|*|*|*|*|*|*| ...
      |*|*|*|*|*|*|*|*|
      |*|*|*|*|*|*|*|*|
      |*|*|*|*|*|*|*|*|
      |*|*|*|*|*|*|*|*|
      |*|*|*|*|*|*|*|*| axis 6
      |*|*|*|*|*|*|*|*| first 8 buttons (report size 1)
      |*| | | | | | | | last of 9 buttons, not aligned
```

So for that I added a conditonal that will add a number of reports with
size 1 to make sure it aligns to the next multiple of 8. Those reports
send dummy inputs that don't do anything aside from aligning the data.

Tested on Linux, Windows 10 and Street Fighter (where the joystick is
recognized as direct-input)

* Add save and restore of each pin used in reading joystick (AVR).
Allow output pin to be JS_VIRTUAL_AXIS if the axis is connected to Vcc
instead of an output pin from the MCU.

Fix joystick report id

Fix broken v-usb hid joystick interface. Make it more resilient to unusual settings (none multiple of eight button count, 0 buttons or 0 axes)

Correct adc reading for multiple axes. Piecewise range conversion for uncentered raw value range. Input, output and ground pin configuration per axis.

Documentation fixes

* Fix port addressing for joystick analog read

* The other required set of changes
As per the PR, the changes still holding it up.
Add onekey for testing.
Fix ARM builds.
Fix device descriptor when either axes or buttons is zero.
Add compile-time check for at least one axis or button.
Move definition to try to fix conflict.
PR review comments.
qmk cformat

* avoid float functions to compute range mapping for axis adc reading

* Remove V-USB support for now. Updated docs accordingly.

* Update tmk_core/protocol/lufa/lufa.c

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

* Update tmk_core/protocol/usb_descriptor.c

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

* Update tmk_core/protocol/usb_descriptor.c

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

* Update tmk_core/protocol/usb_descriptor.c

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

* Add support for joystick adc reading for stm32 MCUs. Fix joystick hid report sending for chibios

* Fix HID joystick report sending for ChibiOS.
Add one analog axis to the onekey:joystick keymap.
Fix pin state save and restore during joystick analog read for STM32
MCUs.

* Update tmk_core/protocol/chibios/usb_main.c

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

* Update tmk_core/protocol/lufa/lufa.c

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

* Add missing mcuconf.h and halconf.h to onekey:joystick keymap.
Add suggested fixes from PR.

* Switch saveState and restoreState signature to use pin_t type.
onekey:joystick : add a second axis, virtual and programmatically animated.

* Update docs/feature_joystick.md

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

* Update docs/feature_joystick.md

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

* Add PR corrections

* Remove halconf.h and mcuconf.h from onekey keymaps

* Change ADC_PIN to A0

Co-authored-by: achol <allecooll@hotmail.com>
Co-authored-by: José Júnior <jose.junior@gmail.com>
Co-authored-by: a-chol <achol@notamail.com>
Co-authored-by: Nick Brassel <nick@tzarc.org>
Co-authored-by: Ryan <fauxpark@gmail.com>
2020-08-29 14:30:02 -07:00
..
ChangeLog Bigger combo index (#9318) 2020-08-29 14:30:02 -07:00
de Fix capitalisation of "GitHub" (#9184) 2020-05-25 19:43:14 -07:00
es Remove DESCRIPTION (#9732) 2020-07-16 15:49:18 +10:00
fr-fr Fix capitalisation of "GitHub" (#9184) 2020-05-25 19:43:14 -07:00
gitbook/images
he-il Fix capitalisation of "GitHub" (#9184) 2020-05-25 19:43:14 -07:00
ja [Docs] Japanese translation of docs/proton_c_conversion.md (#9927) 2020-08-17 01:19:52 -07:00
pt-br Fix capitalisation of "GitHub" (#9184) 2020-05-25 19:43:14 -07:00
ru-ru Fix capitalisation of "GitHub" (#9184) 2020-05-25 19:43:14 -07:00
zh-cn Remove unnecessary break after return from documentation (#9892) 2020-07-31 15:58:55 +01:00
.nojekyll
_langs.md
_summary.md Hid joystick interface (#4226) 2020-08-29 14:30:02 -07:00
adc_driver.md Change analogRead calls to analogReadPin (#9023) 2020-08-29 14:30:02 -07:00
api_development_environment.md
api_development_overview.md
api_docs.md
api_overview.md
arm_debugging.md
breaking_changes.md 2020 May 30 Breaking Changes Update (#9215) 2020-05-30 13:14:59 -07:00
breaking_changes_instructions.md 2020 May 30 Breaking Changes Update (#9215) 2020-05-30 13:14:59 -07:00
cli.md Streamline the macos install process 2020-05-18 22:46:33 -07:00
cli_commands.md [CLI] Add a subcommand for getting information about a keyboard (#8666) 2020-05-26 13:05:41 -07:00
cli_configuration.md Fix capitalisation of "GitHub" (#9184) 2020-05-25 19:43:14 -07:00
cli_development.md Fix capitalisation of "GitHub" (#9184) 2020-05-25 19:43:14 -07:00
CNAME
coding_conventions_c.md Update C coding conventions to match .clang-format config for i… (#8717) 2020-04-07 14:14:08 +10:00
coding_conventions_python.md Move everything to Python 3.6 (#8835) 2020-04-18 22:00:56 +02:00
compatible_microcontrollers.md adds support for the atmega328 (#9043) 2020-06-10 22:23:11 +01:00
config_options.md Remove DESCRIPTION (#9732) 2020-07-16 15:49:18 +10:00
configurator_step_by_step.md Fix capitalisation of "GitHub" (#9184) 2020-05-25 19:43:14 -07:00
configurator_troubleshooting.md Polish Configurator section 2020-03-05 16:00:10 -08:00
contributing.md Add explicit id tags to externally linked headers 2020-03-05 16:00:10 -08:00
custom_matrix.md
custom_quantum_functions.md Remove unnecessary break after return from documentation (#9892) 2020-07-31 15:58:55 +01:00
documentation_best_practices.md [Docs] fix file path (#9540) 2020-06-25 15:58:36 +10:00
documentation_templates.md Add explicit id tags to externally linked headers 2020-03-05 16:00:10 -08:00
driver_installation_zadig.md MSYS2: Switch to bootloadHID package and bring back avrdude package (#9736) 2020-07-16 18:01:34 +01:00
eeprom_driver.md Add SPI 25xx EEPROM support. (#8780) 2020-05-19 10:34:00 +10:00
faq_build.md Docs: update ModemManager recommendation (#9328) 2020-07-07 19:22:38 +01:00
faq_debug.md Remove Atmel FLIP from install scripts and documentation (#8822) 2020-04-17 09:50:58 +02:00
faq_general.md
faq_keymap.md
feature_advanced_keycodes.md Add *OPT aliases for *ALT keycodes and macros (#8714) 2020-04-12 11:37:55 -07:00
feature_audio.md
feature_auto_shift.md
feature_backlight.md Backlight docs wordsmithing (#9631) 2020-07-03 10:05:59 +01:00
feature_bluetooth.md
feature_bootmagic.md Add support for Bootmagic lite when using SPLIT_HAND_PIN (#8347) 2020-03-21 23:10:39 +00:00
feature_combo.md
feature_command.md
feature_debounce_type.md quantum/debounce: Added sym_pk debounce algorithm (#8587) 2020-04-11 21:29:48 +10:00
feature_dip_switch.md add DIP_SWITCH_MATRIX_GRID support (#8772) 2020-07-04 23:20:49 +09:00
feature_dynamic_macros.md Fix typo in docs/feature_dynamic_macros (#10085) 2020-08-19 22:59:59 +01:00
feature_encoders.md Adding information to feature_encoders.md (#9486) 2020-06-21 17:10:01 +10:00
feature_grave_esc.md
feature_haptic_feedback.md
feature_hd44780.md fixed typo for clear lcd screen function in hd44780 docs (#9086) 2020-05-13 19:06:41 +01:00
feature_joystick.md Hid joystick interface (#4226) 2020-08-29 14:30:02 -07:00
feature_key_lock.md Add explicit id tags to externally linked headers 2020-03-05 16:00:10 -08:00
feature_layers.md Redefine IS_LAYER_ON/OFF() as aliases for existing layer functions (#6352) 2020-07-16 22:27:55 +10:00
feature_layouts.md
feature_leader_key.md Delete trailing period in documentation (#9416) 2020-06-15 02:49:36 +10:00
feature_led_matrix.md
feature_macros.md [Docs] Improve Unicode documentation (#8676) 2020-06-20 21:58:48 +01:00
feature_mouse_keys.md Implemented New MK_COMBINED Functionality (#9557) 2020-07-21 09:28:38 +10:00
feature_oled_driver.md OLED driver function to set pixels (#9713) 2020-07-16 15:48:04 +10:00
feature_pointing_device.md Include pointing_device_send in docs (#9185) 2020-06-10 23:18:53 +01:00
feature_ps2_mouse.md Add movement hook to ps2_mouse (#8805) 2020-07-02 21:54:15 +01:00
feature_rawhid.md Allow for overriding RAW endpoint usage page and ID. (#8834) 2020-05-21 20:31:42 +10:00
feature_rgb_matrix.md Add Indicator flag for RGB Matrix (#9933) 2020-08-05 13:29:04 -07:00
feature_rgblight.md Add noeeprom speed function for RGBLIGHT (#9706) 2020-08-25 19:08:09 +10:00
feature_space_cadet.md
feature_split_keyboard.md add SPLIT_HAND_MATRIX_GRID support (#8685) 2020-07-04 15:04:47 +01:00
feature_stenography.md fix typo (#9695) 2020-07-11 23:06:33 +10:00
feature_swap_hands.md One shot support for swap hands (#8590) 2020-05-14 07:36:55 +10:00
feature_tap_dance.md Update features to use Custom Tapping Term when appropriate (#6259) 2020-08-29 14:30:02 -07:00
feature_terminal.md
feature_thermal_printer.md
feature_unicode.md [Docs] Improve Unicode documentation (#8676) 2020-06-20 21:58:48 +01:00
feature_userspace.md [Docs] Fixed the hyperlink to /users/_example/. (#9326) 2020-06-10 15:27:25 -07:00
feature_velocikey.md
feature_wpm.md Add Word Per Minute calculation feature (#8054) 2020-03-23 00:06:16 +11:00
flashing.md Remove Atmel FLIP from install scripts and documentation (#8822) 2020-04-17 09:50:58 +02:00
flashing_bootloadhid.md
fuse.txt
getting_started_docker.md Reintegrate previous docker docs (#9084) 2020-05-19 21:54:55 -07:00
getting_started_github.md Fix capitalisation of "GitHub" (#9184) 2020-05-25 19:43:14 -07:00
getting_started_introduction.md
getting_started_make_guide.md
getting_started_vagrant.md Remove Atmel FLIP from install scripts and documentation (#8822) 2020-04-17 09:50:58 +02:00
hand_wire.md make sure all our redirects are in order 2020-03-05 16:00:10 -08:00
hardware_avr.md Remove DESCRIPTION (#9732) 2020-07-16 15:49:18 +10:00
hardware_drivers.md
hardware_keyboard_guidelines.md [Docs] added the description of the reading order of the rules.mk files. (#8566) 2020-03-29 13:00:47 -07:00
how_a_matrix_works.md refactor How a Matrix Works doc 2020-03-05 16:00:10 -08:00
how_keyboards_work.md
i2c_driver.md Update i2c_driver.md (#10131) 2020-08-22 14:06:16 +01:00
index.html Add redirect for old getting started links (#8987) 2020-05-02 04:29:55 +01:00
internals_defines.md
internals_gpio_control.md add 'togglePin' convenience function (#8734) 2020-04-29 04:04:29 -07:00
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 Guide (#9748) 2020-07-18 21:24:23 +01:00
keycodes.md Issue 9942: Add LSA, RSA, RCS, LSA_T, RSA_T, and RCS_T (#9943) 2020-08-17 02:08:15 -07:00
keycodes_basic.md Add *OPT aliases for *ALT keycodes and macros (#8714) 2020-04-12 11:37:55 -07:00
keycodes_us_ansi_shifted.md
keymap.md [Docs] Clarify layer transparency keymap.md (#9081) 2020-05-16 00:35:19 -07:00
mod_tap.md Add *OPT aliases for *ALT keycodes and macros (#8714) 2020-04-12 11:37:55 -07:00
newbs.md
newbs_building_firmware.md Add explicit id tags to externally linked headers 2020-03-05 16:00:10 -08:00
newbs_building_firmware_configurator.md Polish Configurator section 2020-03-05 16:00:10 -08:00
newbs_flashing.md [Docs] newbs_flashing.md: place bootloader instructions before Toolbox intro (#9077) 2020-05-21 09:24:39 -07:00
newbs_getting_started.md Update newbs MSYS2 pacman instructions (#9445) 2020-06-21 10:54:53 +01:00
newbs_git_best_practices.md
newbs_git_resolving_merge_conflicts.md
newbs_git_resynchronize_a_branch.md
newbs_git_using_your_master_branch.md Add explicit id tags to externally linked headers 2020-03-05 16:00:10 -08:00
newbs_learn_more_resources.md
newbs_testing_debugging.md Add explicit id tags to externally linked headers 2020-03-05 16:00:10 -08:00
one_shot_keys.md [Docs] Fix link to mod_tap.md in the one_shot_keys.md file (#9380) 2020-06-15 02:55:00 -07:00
other_eclipse.md fix two links on docs/other_eclipse.md (#8417) 2020-03-14 13:25:21 +00:00
other_vscode.md [Docs] small text and formatting fixes in vscode manual (#9156) 2020-08-03 19:49:26 -07:00
platformdev_chibios_earlyinit.md Add dual-bank STM32 bootloader support, given GPIO toggle on BOOT0 to charge RC circuit. (#8778) 2020-08-29 14:30:02 -07:00
platformdev_selecting_arm_mcu.md Add documentation for selecting an Arm MCU (#9046) 2020-06-10 23:32:58 +01:00
power.txt
pr_checklist.md Add PR checklist document. (#9913) 2020-08-07 06:16:14 +10:00
proton_c_conversion.md Update ARM split keyboard docs (#9160) 2020-05-22 06:20:46 +10:00
qmk.css
qmk_custom_dark.css Fix darkmode (#8393) 2020-03-12 18:17:47 +11:00
qmk_custom_light.css Fix darkmode (#8393) 2020-03-12 18:17:47 +11:00
quantum_keycodes.md Add explicit id tags to externally linked headers 2020-03-05 16:00:10 -08:00
README.md make sure all our redirects are in order 2020-03-05 16:00:10 -08:00
redirects.json
ref_functions.md Remove unnecessary break after return from documentation (#9892) 2020-07-31 15:58:55 +01:00
reference_configurator_support.md Polish Configurator section 2020-03-05 16:00:10 -08:00
reference_glossary.md fixed link to Eclipse instructions (#9647) 2020-07-05 08:50:01 +10:00
reference_info_json.md
reference_keymap_extras.md [Keymap Extra] Add French AZERTY (AFNOR - NF Z71-300) (#9644) 2020-07-08 19:55:02 +01:00
serial_driver.md Update ARM split keyboard docs (#9160) 2020-05-22 06:20:46 +10:00
spi_driver.md adds support for the atmega328 (#9043) 2020-06-10 22:23:11 +01:00
support.md Fix capitalisation of "GitHub" (#9184) 2020-05-25 19:43:14 -07:00
sw.js
syllabus.md [Docs] Fixed minor typos (#8860) 2020-04-19 23:04:26 +01:00
tap_hold.md Add missing bracket for Tap-Hold code sample (#9675) 2020-07-08 13:40:13 +10:00
translating.md
understanding_qmk.md Add Post Processing to process_record (#4892) 2020-03-23 00:29:05 +11:00
unit_testing.md Edit Unit Testing Documentation (#8961) 2020-04-29 07:39:08 +10:00
usb_nkro.txt
ws2812_driver.md Add support for DMAMUX-capable MCU configuration with WS2812 PWM driver. (#9471) 2020-08-29 14:30:02 -07:00

Quantum Mechanical Keyboard Firmware

Current Version Build Status Discord Docs Status GitHub contributors GitHub forks

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

Totally new to QMK? There are two ways to get started:

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.