Skip to content

usb host keyboard: add keymap support - #19

Closed
jepler wants to merge 4 commits into
tannewt:imx_usb_hostfrom
jepler:imx_usb_host
Closed

jepler wants to merge 4 commits into
tannewt:imx_usb_hostfrom
jepler:imx_usb_host

Conversation

@jepler

@jepler jepler commented Jul 8, 2023

Copy link
Copy Markdown
Collaborator

I'll let you decide whether to pull this into your PR, or would prefer me to PR this direct to adafruit after your PR's merged.

This is confined to pure ASCII, but does support Alt Gr. This is enough to make a French keyboard layout work:

  • home row is "qsdfghjklm"
  • numerals are all shifted
  • keys like {} require Alt Gr

While not tested, this should also support layouts like Colemak with the necessary keymap file.

Layouts can be produced from @Neradoc's keyboard layout modules on the device & loaded at runtime. Code to do so is at
https://gist.github.com/jepler/597c0a00e0eb014a433e03c0ae363a08
as well as a sketch of how an extended format could support dead keys & the full Unicode BMP instead of just ASCII.

import keyboard_layout_win_fr
import layout_to_settings
import usb
lay = layout_to_settings.layout_to_settings0(keyboard_layout_win_fr.KeyboardLayout)
usb.set_user_keymap(lay)

tannewt and others added 4 commits July 7, 2023 16:13
Connects up read, write and ctrl_transfer to TinyUSB. USB Host
support is available on iMX RT and RP2040.

Fixes adafruit#6527 (imx) and fixes adafruit#5986 (rp2).
This is confined to pure ASCII, but does support Alt Gr. This is enough
to make a French keyboard layout work:
 * home row is "qsdfghjklm"
 * numerals are all shifted
 * keys like {} require Alt Gr

While not tested, this should also support layouts like Colemak with
the necssary keymap file.

Layouts can be produced from Neradoc's keyboard layout modules on the
device & loaded at runtime. Code to do so is at
    https://gist.github.com/jepler/597c0a00e0eb014a433e03c0ae363a08
as well as a sketch of how an extended format could support dead keys &
the full Unicode BMP instead of just ASCII.
@jepler

jepler commented Oct 29, 2024

Copy link
Copy Markdown
Collaborator Author

I think this is stale and not of value.

@jepler jepler closed this Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants