Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android AOSP keymap #79

Open
bolives-hax opened this issue Apr 25, 2023 · 1 comment
Open

Android AOSP keymap #79

bolives-hax opened this issue Apr 25, 2023 · 1 comment

Comments

@bolives-hax
Copy link

Hey I recently got to use android on a desktop computer (vnc) and to my surprise found out that there was no way to use the workman layout as a physical input layout instead of a virtual onscreen keyboard. I was using software such as waydroid [lxc container android] but like I said found myself unable to change the keyboard layout to workman. Installing third party apps or changing the wayland compositors keymap don't seem to affect waydroid as it handles the inputs independently as it seems. Looking at the source I found out where the layout files are located.

https://android.googlesource.com/platform/frameworks/base/+/ccbf84f/data/keyboards

these layout files are quite simply structured and it should be relatively easy to add one. When using waydroid it would be found within

/var/lib/waydroid/rootfs/system/usr/keylayout/*

or once added then

/var/lib/waydroid/rootfs/system/usr/keylayout/Workman.kl

as these are also used in the official android open source project I'd assume that adding it there would affect not just waydroid users but a wider array of people.

I might get to it at a later stage myself unless somebody completed the task before me as its not that hard of a task just annoying

@joel0
Copy link
Member

joel0 commented Apr 26, 2023

Have you tried changing the keyboard layout within the Android settings? I have just installed Waydroid with the vanilla image on my computer (Ubuntu 23.04 with Wayland) and confirmed after changing the setting I could type in Workman inside Android. (The on-screen keyboard still shows QWERTY, but that's a different problem: #78 )

Settings -> System -> Language & input -> Physical keyboard -> wayland_keyboard -> Set up keyboard layouts -> English (US), Workman style.

By the way, it looks like the layout is defined in https://android.googlesource.com/platform/frameworks/base.git/+/refs/heads/master/packages/InputDevices/res/raw/keyboard_layout_english_us_workman.kcm . I would guess the directory you linked is the hardware definition of where the physical keys are and what scancode they send; your physical keyboard is almost certainly sending "QWERTY" (generic 104-key PC). My knowledge of low level keyboard protocols is very dated, so take this with a grain of salt.

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

No branches or pull requests

2 participants