Open TanguyHerbron opened 3 years ago
This would reset any customization made using xmodmap
, among others, as the keyboard would be reset back to an initial layout.
NOTE: I'm not the maintainer, just a contributor. This is just my own personal opinion and does not necessarily reflect the maintainer's wishes.
I would consider this to be part of your particular setup and is probably something you should wrap this script in before you call it, rather than adding it upstream. I think more users will have their setups broken by this than fixed by this.
Problem encountered
A user with multiple keyboard layouts may encounter an error when auto typing its password depending on the layouts.
On my machine, I have two layouts set at the same time, and I switch between them using the Caps lock key.
It seems like xdotool has an issue when picking its typing layout, it takes the last layout instead of the currently active one (problem with xdotool and Xorg as I read on other forums).
An easy way to fix it would be to reverse the layout order as follows :
It would fix the problem for me but I guess it might not be the case for everyone.
Solution
The fix I currently suggest is as follows :
us
xdotool type
On the second step, the layout can be anything as long as it is a single layout. Xdotool 'misstypes' the string only when two conflicting layouts are set at the same time.