d4be07dad3
* 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> |
||
---|---|---|
.. | ||
ChangeLog | ||
de | ||
es | ||
fr-fr | ||
gitbook/images | ||
he-il | ||
ja | ||
pt-br | ||
ru-ru | ||
zh-cn | ||
_langs.md | ||
_summary.md | ||
.nojekyll | ||
adc_driver.md | ||
api_development_environment.md | ||
api_development_overview.md | ||
api_docs.md | ||
api_overview.md | ||
arm_debugging.md | ||
breaking_changes_instructions.md | ||
breaking_changes.md | ||
cli_commands.md | ||
cli_configuration.md | ||
cli_development.md | ||
cli.md | ||
CNAME | ||
coding_conventions_c.md | ||
coding_conventions_python.md | ||
compatible_microcontrollers.md | ||
config_options.md | ||
configurator_step_by_step.md | ||
configurator_troubleshooting.md | ||
contributing.md | ||
custom_matrix.md | ||
custom_quantum_functions.md | ||
documentation_best_practices.md | ||
documentation_templates.md | ||
driver_installation_zadig.md | ||
eeprom_driver.md | ||
faq_build.md | ||
faq_debug.md | ||
faq_general.md | ||
faq_keymap.md | ||
feature_advanced_keycodes.md | ||
feature_audio.md | ||
feature_auto_shift.md | ||
feature_backlight.md | ||
feature_bluetooth.md | ||
feature_bootmagic.md | ||
feature_combo.md | ||
feature_command.md | ||
feature_debounce_type.md | ||
feature_dip_switch.md | ||
feature_dynamic_macros.md | ||
feature_encoders.md | ||
feature_grave_esc.md | ||
feature_haptic_feedback.md | ||
feature_hd44780.md | ||
feature_joystick.md | ||
feature_key_lock.md | ||
feature_layers.md | ||
feature_layouts.md | ||
feature_leader_key.md | ||
feature_led_matrix.md | ||
feature_macros.md | ||
feature_mouse_keys.md | ||
feature_oled_driver.md | ||
feature_pointing_device.md | ||
feature_ps2_mouse.md | ||
feature_rawhid.md | ||
feature_rgb_matrix.md | ||
feature_rgblight.md | ||
feature_space_cadet.md | ||
feature_split_keyboard.md | ||
feature_stenography.md | ||
feature_swap_hands.md | ||
feature_tap_dance.md | ||
feature_terminal.md | ||
feature_thermal_printer.md | ||
feature_unicode.md | ||
feature_userspace.md | ||
feature_velocikey.md | ||
feature_wpm.md | ||
flashing_bootloadhid.md | ||
flashing.md | ||
fuse.txt | ||
getting_started_docker.md | ||
getting_started_github.md | ||
getting_started_introduction.md | ||
getting_started_make_guide.md | ||
getting_started_vagrant.md | ||
hand_wire.md | ||
hardware_avr.md | ||
hardware_drivers.md | ||
hardware_keyboard_guidelines.md | ||
how_a_matrix_works.md | ||
how_keyboards_work.md | ||
i2c_driver.md | ||
index.html | ||
internals_defines.md | ||
internals_gpio_control.md | ||
internals_input_callback_reg.md | ||
internals_midi_device_setup_process.md | ||
internals_midi_device.md | ||
internals_midi_util.md | ||
internals_send_functions.md | ||
internals_sysex_tools.md | ||
isp_flashing_guide.md | ||
keycodes_basic.md | ||
keycodes_us_ansi_shifted.md | ||
keycodes.md | ||
keymap.md | ||
mod_tap.md | ||
newbs_building_firmware_configurator.md | ||
newbs_building_firmware.md | ||
newbs_flashing.md | ||
newbs_getting_started.md | ||
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 | ||
newbs_testing_debugging.md | ||
newbs.md | ||
one_shot_keys.md | ||
other_eclipse.md | ||
other_vscode.md | ||
platformdev_chibios_earlyinit.md | ||
platformdev_selecting_arm_mcu.md | ||
power.txt | ||
pr_checklist.md | ||
proton_c_conversion.md | ||
qmk_custom_dark.css | ||
qmk_custom_light.css | ||
qmk.css | ||
quantum_keycodes.md | ||
README.md | ||
redirects.json | ||
ref_functions.md | ||
reference_configurator_support.md | ||
reference_glossary.md | ||
reference_info_json.md | ||
reference_keymap_extras.md | ||
serial_driver.md | ||
spi_driver.md | ||
support.md | ||
sw.js | ||
syllabus.md | ||
tap_hold.md | ||
translating.md | ||
understanding_qmk.md | ||
unit_testing.md | ||
usb_nkro.txt | ||
ws2812_driver.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
Totally new to QMK? There are two ways to get started:
- Basic: QMK Configurator
- Just select your keyboard from the dropdown and program your keyboard.
- We have an introductory video you can watch.
- There is also an overview document you can read.
- 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.
- Help people out on our forums and chat rooms:
- Contribute to our documentation by clicking "Edit This Page" at the bottom
- Translate our documentation into your language
- Report a bug
- Open a Pull Request