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

Entering recorded data regardless of system layout #1197

Open
EugeneRymarev opened this issue Oct 17, 2023 · 7 comments
Open

Entering recorded data regardless of system layout #1197

EugeneRymarev opened this issue Oct 17, 2023 · 7 comments

Comments

@EugeneRymarev
Copy link

Missing feature

mooltipass/minible#413

Justification

This update will help make the device easier to use for those who have more than one layout on their system.

This will also allow you to enter credentials with mixed layouts.

Workarounds

Manual layout switching

@My1
Copy link

My1 commented Oct 17, 2023

The idea is cool, not sure if possible tho for moolticute to grab the current keyboard layout (and let's not get me started with IME states of eg a japanese setup)

Don't forget the system sees the mp device primarily as a keyboard and a keyboard just sends scancodes, which the computer then interprets against the layout table)

@limpkin
Copy link
Collaborator

limpkin commented Oct 25, 2023

for that use case we'd need moolticute to simulate key presses in the currently opened program.

@My1
Copy link

My1 commented Oct 25, 2023

or maybe even better if we have MC anyway, couldnt MC just populate the input field directly (with the added bonus that you wouldnt need to care about the current keymap at all)? otherwise if MC can just read out the current key map and transmit that to the MP the MP would stay doing its keyboarding but with the layout awareness (although obviously no idea if a program can fetch the current keymap)

also an added annoyance of MC-based key input is that elevated windows wouldnt work unless MC itself is also elevated (not sure if that's a good idea in general), if MC can grasp the kb layout and relay that to the MP that wouldnt need to interact with elevated processes

@nekromant
Copy link
Contributor

nekromant commented Jul 27, 2024

I looked a little bit into this issue. Qt has a KeyboardLayoutChanged Event that MC the daemon can catch as well as it can query the system for the keyboard layout. This isn't something you can do via pure HID class.

So as it seems, the logic would be:
Send a request to MC to notify we're about to type something, so that it can switch layouts via simulated keypress or directly (there seems to be the API). Then type it.

Or just inject the text via MC, when it's connected, instead of HID. However this would not work right in cases when you're running multiple VTs on Linux (this case should be handled carefully)

@limpkin
Copy link
Collaborator

limpkin commented Jul 29, 2024

this is news to me... could we actually have moolticute automatically detect a person's layout and configure the mini accordingly?
we would prompt the user if we'd detect a mismatch

@My1
Copy link

My1 commented Jul 29, 2024

Honestly i don't know all oses and what they allow

But windows apparently has this for example.

https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getkeyboardlayout

@limpkin
Copy link
Collaborator

limpkin commented Jul 29, 2024

that could be quite useful.... pinging @deXol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants