Comments (2)
Yes, I haven't bothered to implement per window modifier state tracking.
What's the use case for this? Note that even with OS window focus
changes you cannot actually use modifier press/release events to track
modifier state reliably. Because glfw doesn't send synthetic press
events for depressed modifiers when an OS window gains focus. But it
does send synthetic release events. That these events are synthetic from
glfw is easily verified by running kitty with --debug-input.
Don't ask me why it works this way, but it does so on both X11 and
macOS. I am guessing it was some hack put in place a while ago for some
specific use case.
To me it would make more sense to not report the synthetic release
events on focus out at all. In general once focus out is allowed an
application simply cannot track modifier state, since anything could
happen to the modifier state while the application is unfocused and it
will have no way to know that. This applies for both graphical
applications and terminal applications using the keyboard protocol.
One would really need to implement some kind of modifier state update
event on focus in to do this reliably. But I am sceptical that this is
actually needed for a real world use case.
from kitty.
I am using modifier key events to control hover behaviours in my text editor (neurocyte/flow on github). I understand that it is unlikely to be perfect and I will have to use modifier bits from other events to detect unexpected modifier state changes.
That being said, I opened this issue mostly because of the difference in behaviour between kitty's internal windows switching and OS window switching.
- OS window switching sends a release event on focus change. This event zeros the modifier bits unconditionally.
- Kitty window switching there are no events on focus change and the effective modifier state in the application "sticks" until focus returns and some other event with modifier bits is sent.
At very least I'd like this to be consistent. Either leave the state as sticky in both cases or release in both cases. As it is now the modifier state may or may not stick depending on how the focus left the terminal, which is a little confusing.
An ideal solution, as you say, would be to have focus/unfocus events that also report the current modifier state and leave it up to the application to implement sticky or non-sticky behaviour. But I really think that should be a separate discussion. This is just about consistency for me.
from kitty.
Related Issues (20)
- Kitty is submitting trashed / uninitialized buffers via linux-dmabuf when resizing HOT 29
- After installing NVIDIA drivers, kitty won't start from taskbar. HOT 3
- Kitty shows a desktop notification every time a directory is entered HOT 6
- Letters cut HOT 1
- kitty diff jump to next file HOT 1
- Mac OS: Font fallback fails for Fira Code with the hyphen symbol `‐` (U+2010) HOT 4
- Mouse wheel scrolls too fast when using nvim HOT 1
- dot command file fails to execute HOT 4
- border color fails to change when moving focus to different kitty os-window HOT 1
- Feature request: show a border on a kitty window even when the tab contains only one single window HOT 2
- Feature Request: Option to clamp background outside center or scale window logo HOT 2
- test_ssh_leading_data fails with python 3.13 HOT 1
- Unable to paste URL from Google Chrome HOT 1
- Unable to open launch with --cwd=current when using custom session file and launch script is used HOT 1
- Unable to use `remote_control_password` option with empty password HOT 3
- Add a CLI arg to open a new OS window in the CWD HOT 7
- Slow start on labwc HOT 8
- kitten transfer Operation not permitted in macOS HOT 1
- After installing Kitty, it becomes the default opening method for multiple file types HOT 2
- Crash on external monitor plug HOT 1
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 kitty.