Skip to content
Snippets Groups Projects

Make keyboard more accessible

Merged Imported Administrator requested to merge feature/colors into master
1 unresolved thread

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:

colors

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
    • Author Owner
      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 :smile:

      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! :tada:

      Photo:

      osk-sdl

      (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
  • Administrator added 1 commit · Imported

    added 1 commit

    • a10d8566 - Make keyboard more accessible

    Compare with previous version

    By Johannes Marbach on 2020-12-04T19:41:10

  • Administrator added 6 commits · Imported

    added 6 commits

    Compare with previous version

    By Johannes Marbach on 2020-12-04T19:43:24

  • Administrator
  • Administrator resolved all threads · Imported

    resolved all threads

    By Johannes Marbach on 2020-12-04T20:08:02

    • Author Owner
      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
  • Administrator resolved all threads · Imported

    resolved all threads

    By clayton craft on 2020-12-07T19:30:39

  • Author Owner

    image

    Works on PineTab

    By Alexey Min on 2020-12-07T19:49:42

  • Administrator approved this merge request · Imported

    approved this merge request

    By Alexey Min on 2020-12-07T19:50:08

  • Administrator added 2 commits · Imported

    added 2 commits

    Compare with previous version

    By clayton craft on 2020-12-08T00:48:41

  • Administrator approved this merge request · Imported

    approved this merge request

    By clayton craft on 2020-12-08T00:49:57

  • Administrator merged · Imported

    merged

  • Author Owner

    @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

    • Author Owner
      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. :sweat_smile:

      Will try and dig a little deeper tomorrow.

      By Johannes Marbach on 2020-12-18T13:23:02

      Edited by Ghost User
  • Administrator mentioned in merge request !109 (merged) · Imported

    mentioned in merge request !109 (merged)

    By Johannes Marbach on 2021-01-01T19:44:32

  • Please register or sign in to reply
    Loading