Comments (2)
The problem with this is that some platforms (Windows and macOS) don't seem to allow applications to suppress media keys. The normal keyboard capture mechanisms that apply to other keyboard shortcuts don't work on media keys, so we might be able to send them to the remote PC but they would also act on the local PC too.
I am mostly interested in the source code that is used to capture keys on the host, and how it does filtering (if any) for which keys to send through and which to not.
Moonlight itself doesn't filter the keys. We use SDL2's SDL_SetWindowKeyboardGrab()
API which uses per-platform backends to handle capture. For example, it uses aWH_KEYBOARD_LL hook on Windows and the keyboard-shortcuts-inhibit-unstable-v1
Wayland protocol on Linux.
from moonlight-qt.
It seems like it would potentially be a worse user experience to send the key press to both the client and host system, right? At least without explicit consent from the user. And even then, I'm not sure something like having a program on the client "eat" the key press would work (as perhaps this would also prevent it from being registered by the client at all), but I would need to experiment with it.
I figured an easier approach, especially since I imagine I am in the minority as far as desiring this behavior goes, might be to just use something like AHK and ControlSend
(which allows sending keys to a specific application) to "only" send the key press to Moonlight. It seems it gets ignored (host system sees no key press come through) presumably because SDL2 standing somewhere in between the emulated key press on the client and the host system.
Of course I can take things like F13-F24 and map those to deliver the correct key presses to the host system as well so it is not out of reach by any means. Do you think this is something even worth pursuing a "fix" for (as you noted, sending them to the host/remote PC)?
from moonlight-qt.
Related Issues (20)
- 我使用双屏显示器,我主屏幕是moon副屏幕是其他,我设置好双屏后鼠标无法移动到另一个屏幕,被锁定在主屏上 HOT 1
- Mouse freezes and is unusable for some games (Valorant) HOT 1
- Support ECDSA certificates HOT 1
- dxva2 decode error HOT 2
- Moonlight uses an old VA-API HOT 3
- Add support for full E2E stream encryption HOT 1
- Can't close the stream when running full desktop stream
- 我希望软件上(增加一个失败自动重连不提示!号内容,)的功能。 HOT 1
- 希望 可以支持取消pin 验证码 HOT 1
- Bugged input sticking after using Moonlight
- Send WOL packet on the Broadcast IP (255.255.255.255) as well HOT 5
- [Ubuntu] Hardware Decoding Crashes "after a while"
- Bind to a specific network interface
- Setting to always only show client's cursor in remote desktop mode
- Reconnect button in the error dialog
- StandardOutput handling issues (Moonlight-Qt CLI)
- [Feature Request] In video codec options, add a "not encoded" option like rawvideo in FFmpeg HOT 1
- moonlight-qt unable to launch on Raspberry Pi 5 HOT 1
- [Feature Request] Hide server mouse cursor, and show client mouse cursor instead HOT 2
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 moonlight-qt.