keyman icon indicating copy to clipboard operation
keyman copied to clipboard

feat(linux): implement capslock handling with Wayland 🛤️

Open ermshiperete opened this issue 3 years ago • 1 comments

The Wayland support of ibus is currently non-working. AFAICT it only works with XWayland. Also there are still some APIs in Wayland missing that would allow us to toggle capslock etc, so we use XWayland if available. If XWayland is not available I guess things won't completely work, but there's currently not much we can do about that with ibus.

User Testing

Preparations

  • The tests should be run on these Linux platforms:
    • GROUP_JAMMY_WAYLAND: Ubuntu 22.04 Jammy with Gnome Shell and Wayland

NOTE: The capslock LED won't properly update if these tests are run in a VM. If possible test on hardware.

  • Install build artifacts of this PR

  • Reboot

  • Download and unzip these keyboards

  • Install the keyboards by running these commands (in the directory where you unzipped them):

    km-package-install -f k_031___caps_lock.kmp
    km-package-install -f k_032___caps_control.kmp
    km-package-install -f k_033___caps_always_off.kmp
    

Tests

TEST_CAPSLOCK: Caps lock works

  • switch to "031 - caps lock" keyboard
    • verify the capslock LED is on
  • press and release capslock key, then press and release the following keys 1, Shift+2, Shift+3, A and Shift+B
    • verify the output is pass.pass.pass.pass.pass.
    • verify the capslock LED is still on
  • press and release capslock key
    • verify the capslock LED is off

TEST_CAPSCONTROL: Shift releases caps

  • make sure capslock is off
  • switch to "032 - caps control" keyboard
    • verify the capslock LED is off
  • press and release 1 key
    • verify the capslock LED is off
  • press and release capslock key
    • verify the capslock LED is on
  • press and release 2, Shift+3, 4
    • verify the capslock LED is off
  • press and release capslock key
    • verify the capslock LED is on
  • press and release 5 and capslock key
    • verify the capslock LED is still on
  • press and release 6, Shift, 7 (note: press and release Shift on it's own here!)
    • verify the capslock LED is off
    • verify the output is pass.pass.pass.pass.pass.pass.pass.

TEST_CAPSOFF: Caps always off

  • make sure capslock is off
  • switch to "033 - caps always off" keyboard
  • press and release the following keys. After each key verify the capslock LED is still off. 1, capslock, 2, capslock, 3
    • verify the output is pass.pass.pass.

ermshiperete avatar Feb 07 '22 07:02 ermshiperete

User Test Results

Test specification and instructions

  • ⬜ GROUP_JAMMY_WAYLAND: Ubuntu 22.04 Jammy with Gnome Shell and Wayland
    • TEST_CAPSLOCK (OPEN)
    • TEST_CAPSCONTROL (OPEN)
    • TEST_CAPSOFF (OPEN)
Results Template
# Test Results

### GROUP_JAMMY_WAYLAND: Ubuntu 22.04 Jammy with Gnome Shell and Wayland

* **TEST_CAPSLOCK (OPEN):** notes
* **TEST_CAPSCONTROL (OPEN):** notes
* **TEST_CAPSOFF (OPEN):** notes

Test Artifacts

keymanapp-test-bot[bot] avatar Feb 07 '22 07:02 keymanapp-test-bot[bot]

Abandoning for now

ermshiperete avatar Oct 04 '22 08:10 ermshiperete