Comments (6)
keynames(control)=['Control_L', 'Control_R'], keycodes=[37, 109], nuisance=False, nuisance keys={'lock', 'mod2'}
add control with keycode 37 did not work
The keymap that xpra is working with has Control_L = 37
, Control_R = 109
but somehow this is not correct?
Perhaps vmware modified the keymap?
xmodmap
doesn't show any bindings
Yes, so something is definitely messed up. It should match the values above.
I'm going to close this as not-an-xpra-bug.
from xpra.
Yeah, lobotomizing the change_mask
logic by unconditionally accepting the keycode (by setting modkeycode = keycode
and breaking out of the loop, instead of un-pressing it) does get this working. (And thank you, your response was critical!)
If I can figure out a reasonable way to express the particular pathological behavior of this program and handle it gracefully, I'll submit a PR. But I too am pessimistic.
from xpra.
@aerusso how about the commit above?
Run with XPRA_VERIFY_MODIFIERS=0 xpra ...
from xpra.
Thanks! I'm trying to get at a more general solution (but I'm failing). What I was hoping to do was basically this, but contingent on the modmap being empty (rather than checking a switch). After looking at the code, though, it appears that it should already be doing (something very close to) that! I.e., it should bail out of doing any of this careful mask-adjusting logic if the modmap is empty.
So, I investigated further: in _keys_changed
in xpra/server/mixins/input.py
, the call to ss.keys_changed()
is guarded by a keymap_changing_timer
. On my system, that is always an integer. And it's only ever zero on the first call to it. (Maybe there's an expectation it's one of the other timer implementations?) So, I think that may be a bug. It consequently is never calling the keymap-changing code (i.e., compute_modifier_map
) . Bingo, I though!
Notwithstanding that, I went ahead and removed the if not self.keymap_changing_timer
(since I only ever saw that function being called once per layout change, anyway). I also added in a sleep(0.02)
to sweep race conditions under the rug for debugging. The keymap is empty (confirmed via xmodmap
), but grok_modifier_map
was showing up with all the modifier keys in it. So, either there's a race, and I need a longer sleep()
there, or GDK is maybe lying to us about the keymap?
With this, I'm unfortunately out of time to look into this right now. And I'm not sure I'm willing to trace into GDK to figure out what exactly is going on there. I'll look into this more later, but it will unfortunately have to wait at least a ~week.
from xpra.
since I only ever saw that function being called once per layout change, anyway
Lucky you!
(this function can fire many times on some platforms..)
The keymap_changing_timer
value is used as a guard to prevent running the same do_keys_changed
function multiple times in quick succession:
xpra/xpra/server/gtk_server.py
Lines 73 to 75 in 72c2632
Its value should be set when
keys_changed
is called for the first time in a while:xpra/xpra/server/gtk_server.py
Line 77 in 72c2632
And it will be reset to zero on exit, allowing more
keys_changed
events to trigger it again.
The only slight issue that I can see is that we may miss a change event if it somehow fires whilst we're processing do_keys_changed
.
This should not be possible as the events and the timers run in the same thread... but whatever, I've changed the order in 375c8f4
from xpra.
@aerusso how about the commit above? Run with
XPRA_VERIFY_MODIFIERS=0 xpra ...
I just tested this. Indeed, these two commits do fix the issue (I had to backporting 374175e to 5.0).
(I still want to see if I can figure out a more general solution, but it will obviously take some time.)
from xpra.
Related Issues (20)
- Paramiko broken on Mac M1 (using x86_64 dmg) with ssh key password HOT 6
- No 5.0.5 release for macOS HOT 1
- xpra gets confused when a python virtual environment is active HOT 7
- Installation of xpra-x11 fails on Debian 10 HOT 2
- Commit 4993839d11735e6e ("use shlex for quoting") breaks nontrivial start commands HOT 2
- Cannot start xpra server on Debian 12 HOT 3
- Cannot log in to Xpra via a Web browser after xpra and xpra-html5 upgrade HOT 9
- Missing 5.0.7 debian package files from distro? HOT 1
- no video pipeline options found for BGRX at 300x300 HOT 3
- Windows SSH connections fail. HOT 1
- conflict with builtin types HOT 1
- AttributeError: 'NoneType' object has no attribute 'ssl_cert' on session start HOT 4
- Can't attach session when Cisco AnyConnect VPN is enabled with openconnect HOT 2
- Python3 Installation on RHEL HOT 2
- Problems with 4k screen HOT 28
- invalid compressor(s) specified: lzo HOT 6
- Debian Buster: Repository metadata mismatch HOT 1
- Client-initiated `shadow` fails with `ModuleNotFoundError: No module named 'xpra.gtk'` HOT 4
- setup.py cannot find nvcc or nvjpeg HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xpra.