Make keyboard more accessible
This makes the following things configurable via the config:
- keyboard background
- keyboard font size
- keycap text color
- keycap background (letters, return, other)
- text input background
Color selections were tweaked from the previous defaults to offer more contrast, taking inspiration from common color patterns on iOS and Android keyboards.
Hex string parsing was moved into the config class since it is now required in a lot more places.
Closes: #96 (closed)
This is how it currently looks with the changes from the MR:
Note that the colors are a bit different than in the screenshots in #96 (closed) since I confused [0-100]
and [0-255]
ranges when creating the former screenshots. Current values are color-picked from here with the return button color taken from here.
Happy to tweak the colors further.
Merge request reports
Activity
This is really great, thank you! I tested locally and it works well. Changes also lgtm.
@ollieparanoid you made changes a while back to tone down the themes/colors for the keyboard, I think you should approve this (the new default theme, that is..) before it is merged. It's also easy to change the theme now with this MR (e.g. for pmos we can have a new subpackage that installs the config with our own theme/colors).
By clayton craft on 2020-12-03T21:48:08
added 5 commits
-
09f331ba...0f7feecb - 4 commits from branch
postmarketOS:master
- 091239a6 - Make keyboard more accessible (MR 105)
By clayton craft on 2020-12-03T21:48:38
-
09f331ba...0f7feecb - 4 commits from branch
- Resolved by Administrator
- Resolved by Administrator
(
postmarketos-mkinitfs
code needs to be adjusted for this: pmaports!1782)As for the MR itself, great work! I like the new colors, and after reading the design considerations leading up to this in #96 (closed), I appreciate it even more
The font issue pointed out above needs to be fixed though.
@cherrypicker, @minlexx and @craftyguy: how did you all test osk-sdl (qemu or natively or ...?) maybe the font looked so differently because of DPI settings (and maybe we can ignore that in osk-sdl or make it consistent for all?)?
I ran it on the pinephone and it probably looks like intended. When comparing to squeekboard and an android keyboard, I think the font size could be a tiny bit smaller... or maybe the "123" button should simply be made as big as the OK button, so the text isn't squeezed into it as much. All in all a great improvement over the previous version!
Photo:
(Didn't review the code yet.)
EDIT: @cherrypicker btw, we hang out in #postmarketos-devel and other pmOS chats almost every day, in case you're interested in joining the irc/matrix chat :)
By Oliver Smith on 2020-12-04T00:50:32
Edited by Administrator
added 6 commits
-
a10d8566...fb8dd4bc - 5 commits from branch
postmarketOS:master
- 6582da27 - Make keyboard more accessible
By Johannes Marbach on 2020-12-04T19:43:24
-
a10d8566...fb8dd4bc - 5 commits from branch
- Resolved by Administrator
- Resolved by Administrator
Small tangential idea: Now that the config is getting more options and we do have a man page with !99 (merged), maybe we should also explain the options on the man page? I mean they should be relatively self explanatory so it's maybe just about know what options exist.
By Johannes Marbach on 2020-12-07T19:30:37
Edited by Ghost User
added 2 commits
-
7941343c - 1 commit from branch
postmarketOS:master
- f595754f - Make keyboard more accessible (MR #105 (closed))
By clayton craft on 2020-12-08T00:48:41
-
7941343c - 1 commit from branch
@cherrypicker thanks again! I went ahead and rebased it, and replaced the lone fprintf with SDL_LogError now that !108 (merged) is merged
By clayton craft on 2020-12-08T18:03:29
Edited by Ghost User
@cherrypicker wrote:
For my own future knowledge, is there documentation anywhere on how to run this in qemu? I mean I could clone the repo from inside of the guest but I was wondering if there's an easier way maybe?
I just added this to answer your question: https://wiki.postmarketos.org/wiki/Osk-sdl#Testing_with_QEMU
This will give you a pretty short test cycle, once you run the second block for the second time :)
By Oliver Smith on 2020-12-17T11:14:57
- Resolved by Administrator
Oh wow, that's great. Thanks a lot!
I tried it out locally but for some reason it's failing on the install step.
(023859) [20:51:13] WARNING: package osk-sdl: aport version 0.60-r0 is lower than 0.60_p20201217205057-r0 from the binary repository. 0.60_p20201217205057-r0 will be used when installing osk-sdl. See also: <https://postmarketos.org/warning-repo2> (023859) [20:51:13] (rootfs_qemu-amd64) calculate depends of postmarketos-base, device-qemu-amd64, device-qemu-amd64-kernel-virt (pmbootstrap -v for details) (023859) [20:51:13] libmm-glib: found pmaport (9999-r2) and binary package (1.14.8-r0, from postmarketOS or Alpine), but pmaport can't be built for x86_64 -> using binary package (023859) [20:51:13] (rootfs_qemu-amd64) install (023859) [20:51:13] % sudo rm -f /home/jm/.local/var/pmbootstrap/chroot_rootfs_qemu-amd64/tmp/apk_progress_fifo (023859) [20:51:13] % sudo mkfifo /home/jm/.local/var/pmbootstrap/chroot_rootfs_qemu-amd64/tmp/apk_progress_fifo (023859) [20:51:13] (rootfs_qemu-amd64) % cat /tmp/apk_progress_fifo (023859) [20:51:13] (rootfs_qemu-amd64) % sh -c exec 3>/tmp/apk_progress_fifo; apk --no-progress --progress-fd 3 add -u --virtual .pmbootstrap /mnt/pmbootstrap-packages/x86_64/osk-sdl-0.60_p20201217205057-r0.apk mkinitfs (023859) [20:51:13] New background process: pid=23872, output=background (1/2) Upgrading osk-sdl (0.60_p20201217204912-r0 -> 0.60_p20201217205057-r0) (2/2) Upgrading .pmbootstrap (20201217.194939 -> 20201217.195114) Executing busybox-1.32.0-r8.trigger Executing postmarketos-mkinitfs-0.18-r0.trigger ==> initramfs: creating /boot/initramfs-virt Scanning kernel module dependencies... NOTE: ** modprobe warnings below can be ignored ** if your device does not run the mainline kernel yet (most devices!) or if the related kernel options are enabled with 'y' instead of 'm' (module). - deviceinfo: virtio_pci virtio_blk virtio-gpu virtio_input - 00-default.modules: dm_crypt ext4 usb_f_rndis modprobe: WARNING: Module usb_f_rndis not found in directory /lib/modules/5.10.1-0-virt ==> initramfs: creating /boot/initramfs-virt-extra Executing postmarketos-base-5-r3.trigger Configuring a getty on port ttyS0 with baud rate 115200 1 error; 261 MiB in 170 packages (023859) [20:51:17] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (023859) [20:51:17] NOTE: The failed command's output is above the ^^^ line in the log file: /home/jm/.local/var/pmbootstrap/log.txt (023859) [20:51:17] ERROR: Command failed: apk add -u --virtual .pmbootstrap /mnt/pmbootstrap-packages/x86_64/osk-sdl-0.60_p20201217205057-r0.apk mkinitfs (023859) [20:51:17] See also: <https://postmarketos.org/troubleshooting> (023859) [20:51:17] Traceback (most recent call last): File "/home/jm/.local/lib/python3.8/site-packages/pmb/__init__.py", line 49, in main getattr(frontend, args.action)(args) File "/home/jm/.local/lib/python3.8/site-packages/pmb/helpers/frontend.py", line 279, in install pmb.install.install(args) File "/home/jm/.local/lib/python3.8/site-packages/pmb/install/_install.py", line 745, in install create_device_rootfs(args, step, steps) File "/home/jm/.local/lib/python3.8/site-packages/pmb/install/_install.py", line 702, in create_device_rootfs pmb.chroot.apk.install(args, install_packages, suffix) File "/home/jm/.local/lib/python3.8/site-packages/pmb/chroot/apk.py", line 239, in install pmb.helpers.apk.apk_with_progress(args, ["apk"] + command, File "/home/jm/.local/lib/python3.8/site-packages/pmb/helpers/apk.py", line 107, in apk_with_progress pmb.helpers.run_core.check_return_code(args, p_apk.returncode, File "/home/jm/.local/lib/python3.8/site-packages/pmb/helpers/run_core.py", line 218, in check_return_code raise RuntimeError("Command failed: " + log_message) RuntimeError: Command failed: apk add -u --virtual .pmbootstrap /mnt/pmbootstrap-packages/x86_64/osk-sdl-0.60_p20201217205057-r0.apk mkinitfs
I'm not seeing any actual error messages from
apk
in the log though. Kind of worried that maybe my progress bar change messes something up here.Will try and dig a little deeper tomorrow.
By Johannes Marbach on 2020-12-18T13:23:02
Edited by Ghost User
mentioned in merge request !109 (merged)
By Johannes Marbach on 2021-01-01T19:44:32