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

fix(linux): Fix reordering of output #7079

Merged
merged 6 commits into from
Oct 11, 2022
Merged

Conversation

ermshiperete
Copy link
Contributor

@ermshiperete ermshiperete commented Aug 17, 2022

Quick link to the test results

This change implements a commit queue which allows to control the order of the output. This ensures that any backspace we generate will be processed before the character we're adding.

Requires changes in ibus (surrounding text fix (see #7072) and prefilter change).

User Testing

Preparations

  • The tests should be run on these Linux platforms:

    • GROUP_BIONIC: Ubuntu 18.04 Bionic with Gnome Shell and X11
    • GROUP_FOCAL: Ubuntu 20.04 Focal with Gnome Shell and X11
    • GROUP_JAMMY_X11: Ubuntu 22.04 Jammy with Gnome Shell and X11
    • GROUP_WASTA: Wasta 20.04 with Cinnamon
  • Add the Keyman Test ppa:

    sudo add-apt-repository ppa:keymanapp/keyman-test
  • Install all updates

    sudo apt update
    sudo apt upgrade
  • Verify that you have the updated ibus version required to test this PR

    • Run the following command
      dpkg -l ibus
    • This shows a table similar to this:
      | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
      |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
      ||/ Name           Version            Architecture Description
      +++-==============-==================-============-===========================>
      ii  ibus           1.5.26-4sil1~jammy amd64        Intelligent Input Bus - core
      
      The exact version depends on the platform. The important part is the sil in the version number - that needs to be
      there, otherwise you don't have updated ibus version.
  • On Ubuntu 22.04 Jammy, install the Firefox .deb package (not snap) - this is not needed for older distributions

    • Run the following commands:
      sudo apt remove firefox
      snap remove firefox
      sudo add-apt-repository ppa:mozillateam/ppa
      echo '
      Package: *
      Pin: release o=LP-PPA-mozillateam
      Pin-Priority: 1001
      ' | sudo tee /etc/apt/preferences.d/mozilla-firefox
      echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:${distro_codename}";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox
      sudo apt install firefox
    • when testing in Firefox, test in the address bar.
  • On Ubuntu 22.04 Jammy, Ubuntu 20.04 Focal and Wasta install the Chromium .deb package (not snap) - this is not needed for Bionic

    • Run the following commands:
      sudo add-apt-repository ppa:saiarcot895/chromium-beta
      sudo apt install chromium-browser
    • when testing in Chromium, open https://keyman.com/keyboards and type in the "Keyboard search" field
  • Install Anki

    • Download Qt5 version of Anki (For Bionic use the "Download Anki for 2016+ Linux" version)
    • Run the following commands
      sudo apt update
      sudo apt install zstd
      tar xaf Downloads/anki-2.*-linux-qt5.tar.zst
      cd anki-2.*-linux
      sudo ./install.sh
      sudo apt install libxcb-xinerama0
      (for Bionic, the first line has to be: tar xfx anki-2.*-linux.tar.bz2)
    • When testing in Anki, select e.g. "Tools"/"Study Deck"
  • Install build artifacts of this PR

  • Reboot

  • Install the following keyboards in Keyman:

SUITE_WRITER: LibreOffice Writer

  • GROUP_BIONIC: Ubuntu 18.04 Bionic with Gnome Shell and X11
  • GROUP_FOCAL: Ubuntu 20.04 Focal with Gnome Shell and X11
  • GROUP_JAMMY_X11: Ubuntu 22.04 Jammy with Gnome Shell and X11
  • GROUP_WASTA: Wasta 20.04 with Cinnamon

Open LibreOffice Writer.

Tests

  • TEST_WRITER_IPA: Switch to "IPA (SIL)" keyboard. Type n>. Verify that the result is "ŋ".
  • TEST_WRITER_KO: Switch to "Korean KORDA Jamo (SIL)" keyboard. Type han<space>geul<space>. Verify that the result is "한글".
  • TEST_WRITER_HI: Switch to "Vedic Sanskrit Devanagari Phonetic (ITRANS)" keyboard. Type shrI. Verify that the result is "श्री". (If the result looks wrong, select all text and change the font to "Siddhanta")
  • TEST_WRITER_KM: Switch to "Khmer Angkor" keyboard. Type xEjmr. Verify that the output is "ខ្មែរ".
  • TEST_WRITER_KM_BS: With the output "ខ្មែរ" still being displayed, press Backspace key 5 times. Verify that after each keystroke a part of the string is removed and after the 5th backspace the entire word is deleted.

SUITE_GEDIT: gedit

  • GROUP_BIONIC: Ubuntu 18.04 Bionic with Gnome Shell and X11
  • GROUP_FOCAL: Ubuntu 20.04 Focal with Gnome Shell and X11
  • GROUP_JAMMY_X11: Ubuntu 22.04 Jammy with Gnome Shell and X11
  • GROUP_WASTA: Wasta 20.04 with Cinnamon

Open gedit.

Tests

  • TEST_GEDIT_IPA: Switch to "IPA (SIL)" keyboard. Type n>. Verify that the result is "ŋ".
  • TEST_GEDIT_KO: Switch to "Korean KORDA Jamo (SIL)" keyboard. Type han<space>geul<space>. Verify that the result is "한글".
  • TEST_GEDIT_HI: Switch to "Vedic Sanskrit Devanagari Phonetic (ITRANS)" keyboard. Type shrI. Verify that the result is "श्री".
  • TEST_GEDIT_KM: Switch to "Khmer Angkor" keyboard. Type xEjmr. Verify that the output is "ខ្មែរ".
  • TEST_GEDIT_KM_BS: With the output "ខ្មែរ" still being displayed, press Backspace key 5 times. Verify that after each keystroke a part of the string is removed and after the 5th backspace the entire word is deleted.

SUITE_FIREFOX: Firefox

  • GROUP_BIONIC: Ubuntu 18.04 Bionic with Gnome Shell and X11
  • GROUP_FOCAL: Ubuntu 20.04 Focal with Gnome Shell and X11
  • GROUP_JAMMY_X11: Ubuntu 22.04 Jammy with Gnome Shell and X11
  • GROUP_WASTA: Wasta 20.04 with Cinnamon

Open https://keyman.com/keyboards in Firefox.

NOTE: If the output looks wrong, copy the text from the browser and paste it into gedit and verify that it there.

Tests

  • TEST_FIREFOX_IPA: Switch to "IPA (SIL)" keyboard. Type n>. Verify that the result is "ŋ".
  • TEST_FIREFOX_KO: Switch to "Korean KORDA Jamo (SIL)" keyboard. Type han<space>geul<space>. Verify that the result is "한글".
  • TEST_FIREFOX_HI: Switch to "Vedic Sanskrit Devanagari Phonetic (ITRANS)" keyboard. Type shrI. Verify that the result is "श्री".
  • TEST_FIREFOX_KM: Switch to "Khmer Angkor" keyboard. Type xEjmr. Verify that the output is "ខ្មែរ".
  • TEST_FIREFOX_KM_BS: With the output "ខ្មែរ" still being displayed, press Backspace key 5 times. Verify that after each keystroke a part of the string is removed and after the 5th backspace the entire word is deleted.

SUITE_CHROMIUM: Chromium

  • GROUP_BIONIC: Ubuntu 18.04 Bionic with Gnome Shell and X11
  • GROUP_FOCAL: Ubuntu 20.04 Focal with Gnome Shell and X11
  • GROUP_JAMMY_X11: Ubuntu 22.04 Jammy with Gnome Shell and X11
  • GROUP_WASTA: Wasta 20.04 with Cinnamon

Open Chromium browser.

NOTE: If the output looks wrong, copy the text from the browser and paste it into gedit and verify that it there.

Tests

  • TEST_CHROMIUM_IPA: Switch to "IPA (SIL)" keyboard. Type n>. Verify that the result is "ŋ".
  • TEST_CHROMIUM_KO: Switch to "Korean KORDA Jamo (SIL)" keyboard. Type han<space>geul<space>. Verify that the result is "한글".
  • TEST_CHROMIUM_HI: Switch to "Vedic Sanskrit Devanagari Phonetic (ITRANS)" keyboard. Type shrI. Verify that the result is "श्री".
  • TEST_CHROMIUM_KM: Switch to "Khmer Angkor" keyboard. Type xEjmr. Verify that the output is "ខ្មែរ".
  • TEST_CHROMIUM_KM_BS: With the output "ខ្មែរ" still being displayed, press Backspace key 5 times. Verify that after each keystroke a part of the string is removed and after the 5th backspace the entire word is deleted.

SUITE_TERMINAL: gnome-terminal

  • GROUP_BIONIC: Ubuntu 18.04 Bionic with Gnome Shell and X11
  • GROUP_FOCAL: Ubuntu 20.04 Focal with Gnome Shell and X11
  • GROUP_JAMMY_X11: Ubuntu 22.04 Jammy with Gnome Shell and X11
  • GROUP_WASTA: Wasta 20.04 with Cinnamon

Open Terminal.

Tests

  • TEST_TERMINAL_IPA: Switch to "IPA (SIL)" keyboard. Type n>. Verify that the result is "ŋ".
  • TEST_TERMINAL_KO: Switch to "Korean KORDA Jamo (SIL)" keyboard. Type han<space>geul<space>. Verify that the result is "한글".
  • TEST_TERMINAL_HI: Switch to "Vedic Sanskrit Devanagari Phonetic (ITRANS)" keyboard. Type shrI. Verify that the result is "श्री".
  • TEST_TERMINAL_KM: Switch to "Khmer Angkor" keyboard. Type xjmEr (Note the different character order!). Copy the output characters from terminal and paste them in gedit. Verify that the pasted text is "ខ្មែរ". (Terminal has a rendering problem with some Khmer characters, so the output in terminal looks wrong, even though Keyman added the correct characters.)
  • TEST_TERMINAL_KM_BS: With the output of the previous test still being displayed, press Backspace key 5 times. Verify that after each keystroke a part of the string is removed and after the 5th backspace the entire word is deleted.

SUITE_ANKI: Anki

  • GROUP_BIONIC: Ubuntu 18.04 Bionic with Gnome Shell and X11
  • GROUP_FOCAL: Ubuntu 20.04 Focal with Gnome Shell and X11
  • GROUP_JAMMY_X11: Ubuntu 22.04 Jammy with Gnome Shell and X11
  • GROUP_WASTA: Wasta 20.04 with Cinnamon

Open Anki.

Tests

  • TEST_ANKI_IPA: Switch to "IPA (SIL)" keyboard. Type n>. Verify that the result is "ŋ".
  • TEST_ANKI_KO: Switch to "Korean KORDA Jamo (SIL)" keyboard. Type han<space>geul<space>. Verify that the result is "한글".
  • TEST_ANKI_HI: Switch to "Vedic Sanskrit Devanagari Phonetic (ITRANS)" keyboard. Type shrI. Verify that the result is "श्री" (If the result looks wrong, copy/paste it in text editor and verify there).
  • TEST_ANKI_KM: Switch to "Khmer Angkor" keyboard. Type xEjmr. Verify that the output is "ខ្មែរ".
  • TEST_ANKI_KM_BS: With the output "ខ្មែរ" still being displayed, press Backspace key 5 times. Verify that after each keystroke a part of the string is removed and after the 5th backspace the entire word is deleted.

SUITE_SEARCHBAR: Searchbar in gnome-shell

  • GROUP_BIONIC: Ubuntu 18.04 Bionic with Gnome Shell and X11
  • GROUP_FOCAL: Ubuntu 20.04 Focal with Gnome Shell and X11
  • GROUP_JAMMY_X11: Ubuntu 22.04 Jammy with Gnome Shell and X11
  • GROUP_WASTA: Wasta 20.04 with Cinnamon

Press Windows key to open searchbar.

Tests

  • TEST_SEARCHBAR_IPA: Switch to "IPA (SIL)" keyboard. Type n>. Verify that the result is "ŋ".
  • TEST_SEARCHBAR_KO: Switch to "Korean KORDA Jamo (SIL)" keyboard. Type han<space>geul<space>. Verify that the result is "한글".
  • TEST_SEARCHBAR_HI: Switch to "Vedic Sanskrit Devanagari Phonetic (ITRANS)" keyboard. Type shrI. Verify that the result is "श्री".
  • TEST_SEARCHBAR_KM: Switch to "Khmer Angkor" keyboard. Type xEjmr. Verify that the output is "ខ្មែរ".
  • TEST_SEARCHBAR_KM_BS: With the output "ខ្មែរ" still being displayed, press Backspace key 5 times. Verify that after each keystroke a part of the string is removed and after the 5th backspace the entire word is deleted.

@keymanapp-test-bot keymanapp-test-bot bot added the user-test-missing User tests have not yet been defined for the PR label Aug 17, 2022
@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented Aug 17, 2022

User Test Results

Test specification and instructions

  • ⬜ GROUP_BIONIC: Ubuntu 18.04 Bionic with Gnome Shell and X11

  • ⬜ GROUP_FOCAL: Ubuntu 20.04 Focal with Gnome Shell and X11

  • ⬜ GROUP_JAMMY_X11: Ubuntu 22.04 Jammy with Gnome Shell and X11

  • ⬜ GROUP_WASTA: Wasta 20.04 with Cinnamon

✅ SUITE_WRITER: LibreOffice Writer

20 tests in 4 groups PASSED
  • ✅ GROUP_BIONIC: Ubuntu 18.04 Bionic with Gnome Shell and X11

    5 tests PASSED
    • TEST_WRITER_IPA (PASSED): Tested this as per the instructions in LibreOffice Writer 7.3 and it is working as expected.
    • TEST_WRITER_KO (PASSED): Tested this as per the instructions in LibreOffice Writer 7.3 and it is working as expected.
    • TEST_WRITER_HI (PASSED): Installed 'Siddhanta' font in LibreOfficer Writer 7.3 and now I am able to see the expected output. (notes)
    • TEST_WRITER_KM (PASSED): Retested this as per Eberhard's instructions and after changing the font, I was able to see the expected output. (notes)
    • TEST_WRITER_KM_BS (PASSED): Tested this as per the instructions in LibreOffice Writer 7.3 and it is working as expected. (notes)
  • ✅ GROUP_FOCAL: Ubuntu 20.04 Focal with Gnome Shell and X11

    5 tests PASSED
    • TEST_WRITER_IPA (PASSED): Tested this as per the instructions in LibreOffice Writer 6.4.7.2 and it is working as expected.
    • TEST_WRITER_KO (PASSED): Tested this as per the instructions in LibreOffice Writer 6.4.7.2 and it is working as expected.
    • TEST_WRITER_HI (PASSED): Tested this as per the instructions in LibreOffice Writer 6.4.7.2 and it is working as expected.
    • TEST_WRITER_KM (PASSED): Tested this as per the instructions in LibreOffice Writer 6.4.7.2 and it is working as expected.
    • TEST_WRITER_KM_BS (PASSED): Tested this as per the instructions in LibreOffice Writer 6.4.7.2 and it is working as expected. (notes)
  • ✅ GROUP_JAMMY_X11: Ubuntu 22.04 Jammy with Gnome Shell and X11

    5 tests PASSED
    • TEST_WRITER_IPA (PASSED): Tested with the attached PR build (Keyman 16.0.59-alpha) as per the instructions in Jammy_X11 and I was able to see the expected output.
    • TEST_WRITER_KO (PASSED): Tested with the attached PR build (Keyman 16.0.59-alpha) as per the instructions and I was able to see the expected output.
    • TEST_WRITER_HI (PASSED): Tested with the attached PR build (Keyman 16.0.59-alpha) as per the instructions and I was able to see the expected output.
    • TEST_WRITER_KM (PASSED): Tested with the attached PR build (Keyman 16.0.59-alpha) as per the instructions and I was able to see the expected output.
    • TEST_WRITER_KM_BS (PASSED): Tested with the attached PR build (Keyman 16.0.59-alpha) as per the instructions and I was able to see the expected output. ie., Pressing the Backspace key would entirely deleted all the characters. (notes)
  • ✅ GROUP_WASTA: Wasta 20.04 with Cinnamon

    5 tests PASSED
    • TEST_WRITER_IPA (PASSED): Tested this as per the instructions in LibreOffice Writer 7.3.6.2 and it is working as expected.
    • TEST_WRITER_KO (PASSED): Tested this as per the instructions in LibreOffice Writer 7.3.6.2 and it is working as expected.
    • TEST_WRITER_HI (PASSED): After installing Siddhanta font, I am not able reproduce the font issue. (notes)
    • TEST_WRITER_KM (PASSED): Tested this as per the instructions in LibreOffice Writer 7.3.6.2 and it is working as expected.
    • TEST_WRITER_KM_BS (PASSED): Tested this as per the instructions in LibreOffice Writer 7.3.6.2 and it is working as expected. (notes)

✅ SUITE_GEDIT: gedit

20 tests in 4 groups PASSED
  • ✅ GROUP_BIONIC: Ubuntu 18.04 Bionic with Gnome Shell and X11

    5 tests PASSED
    • TEST_GEDIT_IPA (PASSED): Tested this as per the instructions in Text Editor and it is working as expected.
    • TEST_GEDIT_KO (PASSED): Tested this as per the instructions in Text Editor and it is working as expected.
    • TEST_GEDIT_HI (PASSED): Tested this as per the instructions in Text Editor and it is working as expected.
    • TEST_GEDIT_KM (PASSED): Tested this as per the instructions in Text Editor and it is working as expected.
    • TEST_GEDIT_KM_BS (PASSED): Tested this as per the instructions in Text Editor and it is working as expected. (notes)
  • ✅ GROUP_FOCAL: Ubuntu 20.04 Focal with Gnome Shell and X11

    5 tests PASSED
    • TEST_GEDIT_IPA (PASSED): Tested this as per the instructions in Text Editor and it is working as expected.
    • TEST_GEDIT_KO (PASSED): Tested this as per the instructions in Text Editor and it is working as expected.
    • TEST_GEDIT_HI (PASSED): Tested this as per the instructions in Text Editor and it is working as expected.
    • TEST_GEDIT_KM (PASSED): Tested this as per the instructions in Text Editor and it is working as expected.
    • TEST_GEDIT_KM_BS (PASSED): Tested this as per the instructions in Text Editor and it is working as expected. (notes)
  • ✅ GROUP_JAMMY_X11: Ubuntu 22.04 Jammy with Gnome Shell and X11

    5 tests PASSED
    • TEST_GEDIT_IPA (PASSED): Tested with the attached PR build (Keyman 16.0.59-alpha) as per the instructions in Jammy_X11 and I was able to see the expected output.
    • TEST_GEDIT_KO (PASSED): Tested with the attached PR build (Keyman 16.0.59-alpha) as per the instructions and I was able to see the expected output.
    • TEST_GEDIT_HI (PASSED): Tested with the attached PR build (Keyman 16.0.59-alpha) as per the instructions and I was able to see the expected output.
    • TEST_GEDIT_KM (PASSED): Tested with the attached PR build (Keyman 16.0.59-alpha) as per the instructions and I was able to see the expected output.
    • TEST_GEDIT_KM_BS (PASSED): Tested with the attached PR build (Keyman 16.0.59-alpha) as per the instructions and I was able to see the expected output. (notes)
  • ✅ GROUP_WASTA: Wasta 20.04 with Cinnamon

    5 tests PASSED
    • TEST_GEDIT_IPA (PASSED): Tested this as per the instructions in Text Editor and it is working as expected.
    • TEST_GEDIT_KO (PASSED): Tested this as per the instructions in Text Editor and it is working as expected.
    • TEST_GEDIT_HI (PASSED): Edited the font in Preferences / Font & Colors tab in Text Editor and now I am able to see the expected output. (notes)
    • TEST_GEDIT_KM (PASSED): Tested this as per the instructions in Text Editor and it is working as expected.
    • TEST_GEDIT_KM_BS (PASSED): Tested this as per the instructions in Text Editor and it is working as expected. (notes)

✅ SUITE_FIREFOX: Firefox

20 tests in 4 groups PASSED
  • ✅ GROUP_BIONIC: Ubuntu 18.04 Bionic with Gnome Shell and X11

    5 tests PASSED
    • TEST_FIREFOX_IPA (PASSED): Tested this in the Keyboard Search filed and it is working as expected.
    • TEST_FIREFOX_KO (PASSED): Tested this in the Keyboard Search filed and it is working as expected.
    • TEST_FIREFOX_HI (PASSED): Tested this in the Keyboard Search filed and it is working as expected.
    • TEST_FIREFOX_KM (PASSED): Tested this in the Keyboard Search filed and it is working as expected.
    • TEST_FIREFOX_KM_BS (PASSED): Tested this in the Keyboard Search filed and it is working as expected.
  • ✅ GROUP_FOCAL: Ubuntu 20.04 Focal with Gnome Shell and X11

    5 tests PASSED
    • TEST_FIREFOX_IPA (PASSED): Retested this as per eberhard's new instructions and here is my observations. Tested IP (SIL) keyboard in Keyboard Search field and it shows the expected output. (notes)
    • TEST_FIREFOX_KO (PASSED): Tested 'Korean KORDA Jamo (SIL)' keyboard and it is showing the correct output. (notes)
    • TEST_FIREFOX_HI (PASSED): Tested 'Vedic Sanskrit Devanagari Phonetic (ITRANS)' keyboard and it is showing the correct output. (notes)
    • TEST_FIREFOX_KM (PASSED): Tested 'Khmer Angkor' keyboard and it is showing the correct output. (notes)
    • TEST_FIREFOX_KM_BS (PASSED): After Pressing Backspace key 5 times, the entire word is deleted.
  • ✅ GROUP_JAMMY_X11: Ubuntu 22.04 Jammy with Gnome Shell and X11

    5 tests PASSED
    • TEST_FIREFOX_IPA (PASSED): Retested this as per the instructions in Ubuntu 22.04 Jammy X11 and it is showing the correct output. (notes)
    • TEST_FIREFOX_KO (PASSED): Retested this as per the instructions in Ubuntu 22.04 Jammy X11 and it is showing the correct output. (notes)
    • TEST_FIREFOX_HI (PASSED): Retested this as per the instructions in Ubuntu 22.04 Jammy X11 and it is showing the correct output. (notes)
    • TEST_FIREFOX_KM (PASSED): Retested this as per the instructions in Ubuntu 22.04 Jammy X11 and it is showing the correct output. (notes)
    • TEST_FIREFOX_KM_BS (PASSED): Retested this as per the instructions in Ubuntu 22.04 Jammy X11, after Pressing Backspace key 5 times, the entire word is deleted.
  • ✅ GROUP_WASTA: Wasta 20.04 with Cinnamon

    5 tests PASSED
    • TEST_FIREFOX_IPA (PASSED): Retested this with Keyman 16.0.74-alpha build as per Ebherhard's suggestion and it is working as expected. (notes)
    • TEST_FIREFOX_KO (PASSED): Retested this and I noticed that after pasting it on the gedit, it is showing the correct output. (notes)
    • TEST_FIREFOX_HI (PASSED): Retested this and I noticed that after pasting it on the gedit, it is showing the correct output. (notes)
    • TEST_FIREFOX_KM (PASSED): Retested this in the Keyman Search bar and it is working as expected. (notes)
    • TEST_FIREFOX_KM_BS (PASSED): After Pressing Backspace key 5 times, the entire word is deleted.

✅ SUITE_CHROMIUM: Chromium

20 tests in 4 groups PASSED
  • ✅ GROUP_BIONIC: Ubuntu 18.04 Bionic with Gnome Shell and X11

    5 tests PASSED
    • TEST_CHROMIUM_IPA (PASSED): Tested this in Chromium browser in Keyboard Search field and it is working as expected.
    • TEST_CHROMIUM_KO (PASSED): Tested this in Chromium browser in Keyboard Search field and it is working as expected.
    • TEST_CHROMIUM_HI (PASSED): Retested this as per Eberhard's suggestion and here is my observation. After pasting the Hindi font into gedit, the font changes and showing the correct output. (notes)
    • TEST_CHROMIUM_KM (PASSED): Tested this in Chromium browser in Keyboard Search field and it is working as expected.
    • TEST_CHROMIUM_KM_BS (PASSED): Tested this in Chromium browser in Keyboard Search field and it is working as expected.
  • ✅ GROUP_FOCAL: Ubuntu 20.04 Focal with Gnome Shell and X11

    5 tests PASSED
    • TEST_CHROMIUM_IPA (PASSED): Retested this as per Eberhard's instructions (ie., following the steps as it mentioned in the Ubuntu 22.04 Jammy Linux)and it showing the correct output. (notes)
    • TEST_CHROMIUM_KO (PASSED): Retested this with Keyman 16.0.76-alpha in Ubuntu Focal Linux and it is showing the correct output. (notes)
    • TEST_CHROMIUM_HI (PASSED): Retested this with Keyman 16.0.76-alpha in Ubuntu Focal Linux and it is showing the correct output. (notes)
    • TEST_CHROMIUM_KM (PASSED): Retested this as per the instructions and it is showing the correct output. (notes)
    • TEST_CHROMIUM_KM_BS (PASSED): Retested this as per the instructions and after pressing the Backspace key 5 times all the characters have been removed.
  • ✅ GROUP_JAMMY_X11: Ubuntu 22.04 Jammy with Gnome Shell and X11

    5 tests PASSED
    • TEST_CHROMIUM_IPA (PASSED): Retested this as per the instructions in (Keyman 16.0.76-alpha) Ubuntu 22.04 Jammy X11 and it is showing the correct output. (notes)
    • TEST_CHROMIUM_KO (PASSED): Retested this as per the instructions in Ubuntu 22.04 Jammy X11 and it is showing the correct output. (notes)
    • TEST_CHROMIUM_HI (PASSED): Retested this as per the instructions in Ubuntu 22.04 Jammy X11 and it is showing the correct output. (notes)
    • TEST_CHROMIUM_KM (PASSED): Retested this as per the instructions in Ubuntu 22.04 Jammy X11 and it is showing the correct output. (notes)
    • TEST_CHROMIUM_KM_BS (PASSED): Retested this as per the instructions in Ubuntu 22.04 Jammy X11, after Pressing Backspace key 5 times, the entire word is deleted.
  • ✅ GROUP_WASTA: Wasta 20.04 with Cinnamon

    5 tests PASSED
    • TEST_CHROMIUM_IPA (PASSED): Retested this as per the instructions in (Keyman 16.0.76-alpha) Wasta 20.04 Linux and it is showing the correct output. (notes)
    • TEST_CHROMIUM_KO (PASSED): Retested this in Wasta Linux and it seems that after pasting the fonts in the text editor it shows the correct the output. (notes)
    • TEST_CHROMIUM_HI (PASSED): Retested this in Wasta Linux and it seems that after pasting the fonts in the text editor it shows the correct the output. (notes)
    • TEST_CHROMIUM_KM (PASSED): Retested this in Wasta Linux and it is showing the correct output. (notes)
    • TEST_CHROMIUM_KM_BS (PASSED): After Pressing Backspace key 5 times, the entire word is deleted.

🟩 SUITE_TERMINAL: gnome-terminal

  • 🟩 GROUP_BIONIC: Ubuntu 18.04 Bionic with Gnome Shell and X11

    • TEST_TERMINAL_IPA (PASSED): Tested this in terminal window and it showing the correct output. (notes)
    • 🟩 TEST_TERMINAL_KO (SKIPPED)
    • 🟩 TEST_TERMINAL_HI (SKIPPED)
    • 🟩 TEST_TERMINAL_KM (SKIPPED)
    • 🟩 TEST_TERMINAL_KM_BS (SKIPPED)
  • 🟩 GROUP_FOCAL: Ubuntu 20.04 Focal with Gnome Shell and X11

    • TEST_TERMINAL_IPA (PASSED): Tested this as per the instructions and it is showing the correct output.
    • 🟩 TEST_TERMINAL_KO (SKIPPED)
    • 🟩 TEST_TERMINAL_HI (SKIPPED)
    • 🟩 TEST_TERMINAL_KM (SKIPPED)
    • 🟩 TEST_TERMINAL_KM_BS (SKIPPED)
  • 🟩 GROUP_JAMMY_X11: Ubuntu 22.04 Jammy with Gnome Shell and X11

    • TEST_TERMINAL_IPA (PASSED): Tested this as per Eberhard's instructions in Jammy (X11) Linux and it is showing the correct output. (notes)
    • 🟩 TEST_TERMINAL_KO (SKIPPED)
    • 🟩 TEST_TERMINAL_HI (SKIPPED)
    • 🟩 TEST_TERMINAL_KM (SKIPPED)
    • 🟩 TEST_TERMINAL_KM_BS (SKIPPED)
  • 🟩 GROUP_WASTA: Wasta 20.04 with Cinnamon

    • TEST_TERMINAL_IPA (PASSED): Tested this as per the instructions and it is showing the correct output. (notes)
    • 🟩 TEST_TERMINAL_KO (SKIPPED)
    • 🟩 TEST_TERMINAL_HI (SKIPPED)
    • 🟩 TEST_TERMINAL_KM (SKIPPED)
    • 🟩 TEST_TERMINAL_KM_BS (SKIPPED)

✅ SUITE_ANKI: Anki

20 tests in 4 groups PASSED
  • ✅ GROUP_BIONIC: Ubuntu 18.04 Bionic with Gnome Shell and X11

    5 tests PASSED
    • TEST_ANKI_IPA (PASSED): Tested this in Anki 2.1.49 (as per Eberhard's suggestion) and it is showing the correct output. (notes)
    • TEST_ANKI_KO (PASSED): Tested this as per the instructions and it is working as expected. (notes)
    • TEST_ANKI_HI (PASSED): Tested this as per the instructions and it is working as expected. (notes)
    • TEST_ANKI_KM (PASSED): Tested this as per the instructions and it is working as expected. (notes)
    • TEST_ANKI_KM_BS (PASSED): After pressing the Backspace key 5 times all the characters have been removed from the Filter box.
  • ✅ GROUP_FOCAL: Ubuntu 20.04 Focal with Gnome Shell and X11

    5 tests PASSED
    • TEST_ANKI_IPA (PASSED): Tested this with Anki 2.1.54 and it is showing the correct output.
    • TEST_ANKI_KO (PASSED): Tested this with Anki 2.1.54 and it is showing the correct output.
    • TEST_ANKI_HI (PASSED): Tested this with Anki 2.1.54 and it is showing the correct output.
    • TEST_ANKI_KM (PASSED): Tested this with Anki 2.1.54 and it is showing the correct output.
    • TEST_ANKI_KM_BS (PASSED): Tested this with Anki 2.1.54 and it is showing the correct output.
  • ✅ GROUP_JAMMY_X11: Ubuntu 22.04 Jammy with Gnome Shell and X11

    5 tests PASSED
    • TEST_ANKI_IPA (PASSED): Tested this in Anki and it is working as expected. (notes)
    • TEST_ANKI_KO (PASSED): Tested this in Anki and it is working as expected. (notes)
    • TEST_ANKI_HI (PASSED): Tested this in Anki and it is working as expected. (notes)
    • TEST_ANKI_KM (PASSED): Tested this in Anki and it is working as expected. (notes)
    • TEST_ANKI_KM_BS (PASSED): Tested this in Anki and pressing Backspace key 5 times remove the entire word from the Filter box.
  • ✅ GROUP_WASTA: Wasta 20.04 with Cinnamon

    5 tests PASSED
    • TEST_ANKI_IPA (PASSED): Tested this in Anki 2.1.54 and it is working as expected. (notes)
    • TEST_ANKI_KO (PASSED): Tested this in Anki 2.1.54 and it is working as expected. (notes)
    • TEST_ANKI_HI (PASSED): Retested this with Keyman 16.0.76-alpha build in Anki application and after pasting the fonts into the text edit, it shows the correct output. (notes)
    • TEST_ANKI_KM (PASSED): Tested this in Anki 2.1.54 and it is working as expected. (notes)
    • TEST_ANKI_KM_BS (PASSED): Tested this in Anki 2.1.54 and after pressing Backspace key 5 times the entire word has been removed from the Filter box.

🟩 SUITE_SEARCHBAR: Searchbar in gnome-shell

  • 🟩 GROUP_BIONIC: Ubuntu 18.04 Bionic with Gnome Shell and X11

  • 🟩 GROUP_FOCAL: Ubuntu 20.04 Focal with Gnome Shell and X11

  • ✅ GROUP_JAMMY_X11: Ubuntu 22.04 Jammy with Gnome Shell and X11

    5 tests PASSED
    • TEST_SEARCHBAR_IPA (PASSED): Tested this in Search bar and it produces the expected output. (notes)
    • TEST_SEARCHBAR_KO (PASSED): Tested this in Search bar and it produces the expected output. (notes)
    • TEST_SEARCHBAR_HI (PASSED): Tested this in Search bar and it produces the expected output. (notes)
    • TEST_SEARCHBAR_KM (PASSED): Tested this in Search bar and it produces the expected output. (notes)
    • TEST_SEARCHBAR_KM_BS (PASSED): After pressing the backspace key 5 times entire word has been removed from the space bar.
  • 🟩 GROUP_WASTA: Wasta 20.04 with Cinnamon

Test Artifacts

@ermshiperete ermshiperete force-pushed the feat/linux/outputOrdering branch from a5e5382 to 70ea643 Compare August 17, 2022 13:48
@mcdurdin
Copy link
Member

Rough diagram of IPC

sequenceDiagram
    Note right of Client: _key_snooper_cb receives new key event
    Client-)IBusDaemon: ProcessKeyEvent
    IBusDaemon-)EngineDBus: ProcessKeyEvent
    EngineDBus-)EngineProcessor: process-key-event
    activate EngineProcessor
    EngineProcessor-)IBusDaemon: ForwardKeyEvent +PREFILTER
    deactivate EngineProcessor
    IBusDaemon-)Client: ForwardKeyEvent +PREFILTER

    Note right of Client: _key_snooper_cb receives forwarded key event.
    Note right of Client: +PREFILTER means we reprocess the key event
    Client-)IBusDaemon: ProcessKeyEvent +PREFILTER
    IBusDaemon-)EngineDBus: ProcessKeyEvent +PREFILTER
    EngineDBus-)EngineProcessor: process-key-event +PREFILTER
    activate EngineProcessor
    EngineProcessor-)IBusDaemon: bksp + text emitted
    deactivate EngineProcessor
    IBusDaemon-)Client: bksp + text emitted
Loading

@ermshiperete ermshiperete force-pushed the feat/linux/outputOrdering branch from dedb999 to 95c9c04 Compare August 17, 2022 16:01
// generated will be processed before the character we're adding. We need to send a
// valid keyval/keycode combination so that it doesn't get swallowed by GTK but which
// isn't very likely used in real keyboards. F24 seems to work for that.
ibus_engine_forward_key_event((IBusEngine*)keyman, KEYMAN_NOCHAR_KEYSYM, KEYMAN_F24_KEYCODE_OUTPUT_SENTINEL, IBUS_PREFILTER_MASK);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mcdurdin Do we need to forward the fake key event if the app supports surrounding text?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I don't think so. Order of operations for apps that support surrounding text is:

  1. Delete and commit text via surrounding-text API.
  2. If requested by the keyboard, emit original keystroke.

You are right, and this would be a good optimisation because it removes some of the more 'hacky' compat stuff we'd otherwise be doing here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the prefilter version of ibus we get warnings with gedit:

(gedit:2437): Gdk-WARNING **: 17:52:19.388: Event with type 8 not holding a GdkDevice. It is most likely synthesized outside Gdk/GTK+

(gedit:2437): Gdk-WARNING **: 17:52:19.388: Event with type 9 not holding a GdkDevice. It is most likely synthesized outside Gdk/GTK+

Strangely enough we don't get these warnings with Chromium.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we extend the comment above to reference the issue with Chromium doing its 'rate limiting' of hotkey-type keystrokes?

@ermshiperete ermshiperete added this to the A16S8 milestone Aug 18, 2022
@ermshiperete ermshiperete force-pushed the feat/linux/outputOrdering branch from 95c9c04 to 134188d Compare August 19, 2022 14:21
@mcdurdin mcdurdin modified the milestones: A16S8, A16S9 Aug 19, 2022

// This keycode is a fake keycode that we send when it's time to commit the text, ensuring the
// correct output order of backspace and text.
if ((engine->client_capabilities & IBUS_CAP_PREFILTER) && keycode == KEYMAN_F24_KEYCODE_OUTPUT_SENTINEL &&
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good thing we check keycode and not keyval since Chromium sends us a different value than what we used in the forward key event (from Chromium: 0x1008ff43, we sent: 0x100fdd0). Other apps send us the same value back.

@keymanapp-test-bot keymanapp-test-bot bot added has-user-test user-test-required User tests have not been completed and removed user-test-missing User tests have not yet been defined for the PR labels Aug 25, 2022
@ermshiperete ermshiperete force-pushed the feat/linux/outputOrdering branch 3 times, most recently from 085be9a to 85e3c10 Compare September 2, 2022 15:27
@mcdurdin mcdurdin modified the milestones: A16S9, A16S10 Sep 5, 2022
@ermshiperete ermshiperete marked this pull request as ready for review September 7, 2022 14:06
@ermshiperete ermshiperete marked this pull request as draft September 7, 2022 16:25
@ermshiperete ermshiperete marked this pull request as ready for review September 8, 2022 18:00
Copy link
Member

@mcdurdin mcdurdin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks good. I have a bunch of minor quality requests.

linux/ibus-keyman/src/engine.c Outdated Show resolved Hide resolved
linux/ibus-keyman/src/engine.c Outdated Show resolved Hide resolved
linux/ibus-keyman/src/engine.c Outdated Show resolved Hide resolved
linux/ibus-keyman/src/engine.c Show resolved Hide resolved
linux/ibus-keyman/src/engine.c Outdated Show resolved Hide resolved
linux/ibus-keyman/src/engine.c Outdated Show resolved Hide resolved
linux/ibus-keyman/src/engine.c Show resolved Hide resolved
@ermshiperete
Copy link
Contributor Author

ermshiperete commented Oct 10, 2022

@bharanidharanj Please retest TEST_TERMINAL_IPA in Jammy with a slight variation: after you opened gnome-terminal, press the Enter key first, then start with the test (cf #7428).

@keymanapp-test-bot retest SUITE_TERMINAL GROUP_JAMMY_X11 TEST_TERMINAL_IPA

@ermshiperete
Copy link
Contributor Author

The following failing tests in Jammy are caused by gnome-terminal not supporting surrounding text and deleting clusters instead of single code points (see #7130), so we skip these tests.

SUITE_TERMINAL
GROUP_JAMMY_X11

  • TEST_TERMINAL_KO skipped
  • TEST_TERMINAL_HI skipped
  • TEST_TERMINAL_KM skipped
  • TEST_TERMINAL_KM_BS skipped

@bharanidharanj
Copy link

SUITE_TERMINAL: gnome-terminal

GROUP_JAMMY_X11: Ubuntu 22.04 Jammy with Gnome Shell and X11

  • TEST_TERMINAL_IPA (PASSED): Tested this as per Eberhard's instructions in Jammy (X11) Linux and it is showing the correct output.

@bharanidharanj
Copy link

SUITE_FIREFOX: Firefox

GROUP_JAMMY_X11: Ubuntu 22.04 Jammy with Gnome Shell and X11

  • TEST_FIREFOX_IPA (PASSED): Retested this as per the instructions in Ubuntu 22.04 Jammy X11 and it is showing the correct output.

  • **TEST_FIREFOX_KO (PASSED):**Retested this as per the instructions in Ubuntu 22.04 Jammy X11 and it is showing the correct output.

  • TEST_FIREFOX_HI (PASSED): Retested this as per the instructions in Ubuntu 22.04 Jammy X11 and it is showing the correct output.

  • TEST_FIREFOX_KM (PASSED): Retested this as per the instructions in Ubuntu 22.04 Jammy X11 and it is showing the correct output.

  • TEST_FIREFOX_KM_BS (PASSED): Retested this as per the instructions in Ubuntu 22.04 Jammy X11, after Pressing Backspace key 5 times, the entire word is deleted.

@bharanidharanj
Copy link

SUITE_CHROMIUM: Chromium

GROUP_JAMMY_X11: Ubuntu 22.04 Jammy with Gnome Shell and X11

  • TEST_CHROMIUM_IPA (PASSED): Retested this as per the instructions in (Keyman 16.0.76-alpha) Ubuntu 22.04 Jammy X11 and it is showing the correct output.

  • TEST_CHROMIUM_KO (PASSED): Retested this as per the instructions in Ubuntu 22.04 Jammy X11 and it is showing the correct output.

  • TEST_CHROMIUM_HI (PASSED): Retested this as per the instructions in Ubuntu 22.04 Jammy X11 and it is showing the correct output.

  • TEST_CHROMIUM_KM (PASSED): Retested this as per the instructions in Ubuntu 22.04 Jammy X11 and it is showing the correct output.

  • TEST_CHROMIUM_KM_BS (PASSED): Retested this as per the instructions in Ubuntu 22.04 Jammy X11, after Pressing Backspace key 5 times, the entire word is deleted.

@bharanidharanj
Copy link

SUITE_CHROMIUM: Chromium

GROUP_WASTA: Wasta 20.04 with Cinnamon

  • TEST_CHROMIUM_IPA (PASSED): Retested this as per the instructions in (Keyman 16.0.76-alpha) Wasta 20.04 Linux and it is showing the correct output.

  • TEST_CHROMIUM_KO (PASSED): Retested this in Wasta Linux and it seems that after pasting the fonts in the text editor it shows the correct the output.

  • TEST_CHROMIUM_HI (PASSED): Retested this in Wasta Linux and it seems that after pasting the fonts in the text editor it shows the correct the output.

  • TEST_CHROMIUM_KM (PASSED): Retested this in Wasta Linux and it is showing the correct output.

  • TEST_CHROMIUM_KM_BS (PASSED): After Pressing Backspace key 5 times, the entire word is deleted.

@bharanidharanj
Copy link

SUITE_ANKI: Anki

GROUP_WASTA: Wasta 20.04 with Cinnamon

  • TEST_ANKI_HI (PASSED): Retested this with Keyman 16.0.76-alpha build in Anki application and after pasting the fonts into the text edit, it shows the correct output.

@bharanidharanj
Copy link

SUITE_CHROMIUM: Chromium

GROUP_FOCAL: Ubuntu 20.04 Focal with Gnome Shell and X11

  • TEST_CHROMIUM_KO (PASSED): Retested this with Keyman 16.0.76-alpha in Ubuntu Focal Linux and it is showing the correct output.

  • TEST_CHROMIUM_HI (PASSED): Retested this with Keyman 16.0.76-alpha in Ubuntu Focal Linux and it is showing the correct output.

@keymanapp-test-bot keymanapp-test-bot bot removed the user-test-required User tests have not been completed label Oct 11, 2022
ermshiperete and others added 6 commits October 11, 2022 18:44
This change implements a commit queue which allows to control the
order of the output. This ensures that any backspace we generate
will be processed before the character we're adding.

Requires changes in ibus (surrounding text fix (see #7072) and
prefilter change)

Fixes #1489, #4028, #4029, #4030, #4505, #5510, #6639
If we're dealing with an older ibus version that doesn't have the
necessary patches we fall back to the old behaviour. Otherwise
we use the new output reordering.
We forward a fake event for both keydown and keyup. This change
will set the flag on the fake event so that we get keydown and keyup.
This is probably not technically necessary, but it helps in
debugging because you can then see that both fake events still
belong to the same keypress.
Only send fake event if client does not support surrounding text.
@ermshiperete ermshiperete force-pushed the feat/linux/outputOrdering branch from a0cf9c6 to bcd2963 Compare October 11, 2022 16:45
@ermshiperete ermshiperete merged commit 3053ebf into master Oct 11, 2022
@ermshiperete ermshiperete deleted the feat/linux/outputOrdering branch October 11, 2022 18:09
@keyman-server
Copy link
Collaborator

Changes in this pull request will be available for download in Keyman version 16.0.78-alpha

ermshiperete added a commit that referenced this pull request May 24, 2024
…ervice

This change allows to press F24 as ordered output sentinel from
keyman-system-service.

This is part of implementing serialized output with keyman-system-service
instead of requiring a patched ibus.

The problem both approaches try to solve is that with non-compliant apps
it is not possible to directly delete characters from the context. Instead
we have to emit a backspace key before we can commit the new
characters. However, the backspace key press goes through a different
code path in ibus and so it can happen that the commit gets processed
before the backspace which then deletes from the characters we just
added instead of from the old content.

The previous implementation solved this by forwarding a F24 ordered output
sentinel key to ibus and relying on the patched ibus to send that back to
us. When we received the F24 key we committed the characters that we
queued when we forwarded the F24 key (implemented in #7079).

The new approach implemented in this change instead sends the F24 ordered
output sentinel key through keyman-system-service and so follows the
regular key processing without requiring a patched ibus to send the key
back to us. The rest of the algorithm stays the same: when we receive the
F24 key we commit the characters previously queued.

Part of #10799.
ermshiperete added a commit that referenced this pull request May 24, 2024
…ervice

This change allows to press F24 as ordered output sentinel from
keyman-system-service.

This is part of implementing serialized output with keyman-system-service
instead of requiring a patched ibus.

The problem both approaches try to solve is that with non-compliant apps
it is not possible to directly delete characters from the context. Instead
we have to emit a backspace key before we can commit the new
characters. However, the backspace key press goes through a different
code path in ibus and so it can happen that the commit gets processed
before the backspace which then deletes from the characters we just
added instead of from the old content.

The previous implementation solved this by forwarding a F24 ordered output
sentinel key to ibus and relying on the patched ibus to send that back to
us. When we received the F24 key we committed the characters that we
queued when we forwarded the F24 key (implemented in #7079).

The new approach implemented in this change instead sends the F24 ordered
output sentinel key through keyman-system-service and so follows the
regular key processing without requiring a patched ibus to send the key
back to us. The rest of the algorithm stays the same: when we receive the
F24 key we commit the characters previously queued.

Part of #10799.
ermshiperete added a commit that referenced this pull request May 28, 2024
…vice

This change allows to press F24 as ordered output sentinel from
keyman-system-service.

This is part of implementing serialized output with keyman-system-service
instead of requiring a patched ibus.

The problem both approaches try to solve is that with non-compliant apps
it is not possible to directly delete characters from the context. Instead
we have to emit a backspace key before we can commit the new
characters. However, the backspace key press goes through a different
code path in ibus and so it can happen that the commit gets processed
before the backspace which then deletes from the characters we just
added instead of from the old content.

The previous implementation solved this by forwarding a F24 ordered output
sentinel key to ibus and relying on the patched ibus to send that back to
us. When we received the F24 key we committed the characters that we
queued when we forwarded the F24 key (implemented in #7079).

The new approach implemented in this change instead sends the F24 ordered
output sentinel key through keyman-system-service and so follows the
regular key processing without requiring a patched ibus to send the key
back to us. The rest of the algorithm stays the same: when we receive the
F24 key we commit the characters previously queued.

Fixes: #10799
ermshiperete added a commit that referenced this pull request Jun 13, 2024
…ervice

This change allows to press F24 as ordered output sentinel from
keyman-system-service.

This is part of implementing serialized output with keyman-system-service
instead of requiring a patched ibus.

The problem both approaches try to solve is that with non-compliant apps
it is not possible to directly delete characters from the context. Instead
we have to emit a backspace key before we can commit the new
characters. However, the backspace key press goes through a different
code path in ibus and so it can happen that the commit gets processed
before the backspace which then deletes from the characters we just
added instead of from the old content.

The previous implementation solved this by forwarding a F24 ordered output
sentinel key to ibus and relying on the patched ibus to send that back to
us. When we received the F24 key we committed the characters that we
queued when we forwarded the F24 key (implemented in #7079).

The new approach implemented in this change instead sends the F24 ordered
output sentinel key through keyman-system-service and so follows the
regular key processing without requiring a patched ibus to send the key
back to us. The rest of the algorithm stays the same: when we receive the
F24 key we commit the characters previously queued.

Part of #10799.
ermshiperete added a commit that referenced this pull request Aug 21, 2024
…ervice

This change allows to press F24 as ordered output sentinel from
keyman-system-service.

This is part of implementing serialized output with keyman-system-service
instead of requiring a patched ibus.

The problem both approaches try to solve is that with non-compliant apps
it is not possible to directly delete characters from the context. Instead
we have to emit a backspace key before we can commit the new
characters. However, the backspace key press goes through a different
code path in ibus and so it can happen that the commit gets processed
before the backspace which then deletes from the characters we just
added instead of from the old content.

The previous implementation solved this by forwarding a F24 ordered output
sentinel key to ibus and relying on the patched ibus to send that back to
us. When we received the F24 key we committed the characters that we
queued when we forwarded the F24 key (implemented in #7079).

The new approach implemented in this change instead sends the F24 ordered
output sentinel key through keyman-system-service and so follows the
regular key processing without requiring a patched ibus to send the key
back to us. The rest of the algorithm stays mostly the same: when we receive
the F24 key we commit the characters previously queued. The difference to
the previous implementation is that we now also queue the backspace keys
that we generate.

Part-of: #10799
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment