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

Plover not working with Dvorak layout on Debian Linux. #788

Closed
tahti opened this issue Jul 14, 2017 · 14 comments
Closed

Plover not working with Dvorak layout on Debian Linux. #788

tahti opened this issue Jul 14, 2017 · 14 comments

Comments

@tahti
Copy link

tahti commented Jul 14, 2017

Classification: Bug

Reproducibility: Always

Summary

When using Plover with Dvorak layout, words are printed as if Plover thought there is Dvorak layout but actually Qwerty was used. For example "g;" is printed instead of "is". Any word is changed in similar way.

Steps to Reproduce

  1. Run plover
  2. Press a key

Expected Results

  1. Word is should be printed.

Actual Results

  1. Word g; is printed.

Version

Plover version 4.0.0.dev1+20.g60a373f

Run via: AppImage.

Notes

The bug seems to be a regression bug as running Plover 3.0.0 on exactly the same configuration works correctly. I also noticed that fbxkb changes flag as if keyboard layout was changed to qwerty (even though I have no qwerty in my configuration files).

I am not sure if it is relevant but xdotool seems to fail in similar way:
xdotool key "i"
produces g

Configuration

OS: Linux, Debian Testing with i3 as window layout manager.
Content of /etc/default/keyboard:

XKBMODEL="pc105"
XKBLAYOUT="pl"
XKBVARIANT="dvp"
XKBOPTIONS="caps:swapescape,group:sclk_toggle"

uname -a output: Linux 4.11.0-1-amd64 #1 SMP Debian 4.11.6-1 (2017-06-19) x86_64 GNU/Linux

@ghost
Copy link

ghost commented Jul 16, 2017

I confirm the bug. It happens with plover-4.0.0.dev1.20.g60a373f-x86_64.AppImage and 3.1.1 , under Manjaro Linux. I did not try further versions.

umane -a output : 4.9.35-1-MANJARO #1 SMP PREEMPT Fri Jun 30 06:42:12 UTC 2017 x86_64 GNU/Linux

@nimble0
Copy link
Contributor

nimble0 commented Jul 18, 2017

This might be the same issue as #650

@benoit-pierre
Copy link
Member

Yes, as noted in #650, xkb groups are not supported.

@benoit-pierre
Copy link
Member

Duplicate of #650.

@benoit-pierre benoit-pierre marked this as a duplicate of #650 Jul 18, 2017
@ghost
Copy link

ghost commented Jul 18, 2017

Ok, so I did some troubleshooting, and figured out that ① Plover always uses the first keyboard layout set with setxkbmap ② at Plovers startup.

Lets take for example this setup:

setxkbmap us,us ,colemak -option -option grp:sclk_toggle (Qwerty first and colemak second, to toggle, use scroll lock key.)

To check the layouts state, I use setxkbmap -print :
xkb_keymap { xkb_keycodes { include "evdev+aliases(qwerty)" }; xkb_types { include "complete" }; xkb_compat { include "complete" }; xkb_symbols { include "pc+us+us(colemak):2+inet(evdev)+group(sclk_toggle)" }; xkb_geometry { include "pc(pc101)" }; };

Once the command's run, open plover.
With this setup, I get (typing the demo sentence http://stenoknight.com/kws.html => SO S TH WOG HF):
so is this working?

By changing the layout to colemak (Scroll lock key), I get (plover still open):
ry ur ghur wypeukd?

So that's one thing.

But when changing the layout to qwerty only (setxkbmap us -option)
and then opening plover, as expected, we get:
so is this working?

Let's change the layout to colemak only (keeping plover open):
setxkbmap us colemak -option

We then get:
ry ur ghur wypeukd?

That's it!
And don't forget to setxkbmap -print to see what plover reads from setxkbmap.

@benoit-pierre
Copy link
Member

I believe both points are already mentioned in #650.

@ghost
Copy link

ghost commented Jul 18, 2017

yes. I was about to update the comment to mention this :·)

And the issue #650 is DE independent. So, everybody using plover under Linux is concerned.

@benoit-pierre
Copy link
Member

Well, not everybody use XKB groups...

@ghost
Copy link

ghost commented Jul 18, 2017

Yes, I meant as soon as you change the layout (while plover runs, with or without groups), you're concerned.

@tahti
Copy link
Author

tahti commented Jul 18, 2017

I do not change layout, I do not use groups, I even deleted group:sclk_toggle from my configuration and I am still affected by the bug. I played a bit and I think that somehow the XTEST keyboard is set to qwerty. But setxkbmap -device 5 -query gives me (device 5 is XTEST keyboard):

rules:      evdev      
model:      pc105
layout:     pl
variant:    dvp
options:    caps:swapescape

When I run setxkbmap -device 5 Plover starts working properly, even though the result of setxkbmap -device 5 -query does not change. I have an impression that it may be bug in XTEST keyboard. Is Plover 3.0.0 working because does not uses XTEST keyboard?

@benoit-pierre
Copy link
Member

Yes, the code was changed to use the XTEST keyboard. What exact command do you use to configure your keyboard layout?

@tahti
Copy link
Author

tahti commented Jul 18, 2017

I use the configuration file /etc/default/keyboard which I believe is more or less equivalent to using setxkbmap but additionally it affects the tty terminals. So I do not use any command, just that configuration file.

@tahti
Copy link
Author

tahti commented Jul 18, 2017

The thing that might have messed up XTEST keyboard is that before I had three layouts in that file (including qwerty), but recently I changed to using only one Dvorak layout.

@benoit-pierre
Copy link
Member

I have this ugly hack in my script to configure X11 input, I wonder if it's the same issue (and if it's still relevant, needs more testing).

jladdjr added a commit to jladdjr/steno-dictionaries that referenced this issue Jul 6, 2024
There are a number of tricky issues with running Plover in this
configuration:

- Plover is not fully compatible with Wayland at this point
- Based on the way Plover works at this time [1], setting
  keyboards to use Dvorak in Wayland (via SwayWM) results in Plover's
  output being filtered through the Dvorak layout, which scrambles the
  letters.

This script attempts to workaround these issues by:

- Referencing a version of Plover that is installed in a virtual environment
- Running a console-based version of Plover [2]
  (that is really wonderful)
- Reloading the SwayWM config which effectively resets the keyboard
  layout used by Plover for unknown reasons. This hack may be
  analagous to [3] (as mentioned in [4]).

[1] openstenoproject/plover#650
[2] https://github.com/psethwick/plover_console_ui
[3] https://github.com/benoit-pierre/config-x11/blob/d9a4be44976a96488a9046f2f6cc91649f35d6f0/bin/setxinput.sh#L171
[4] openstenoproject/plover#788 (comment)
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

3 participants