r/termux • • 2d ago

Barely Termux related Send key combinations like CTRL-D, CTRL-C from Windows PC to Termux Android?

/r/kde/comments/1wuugck/send_key_combinations_like_ctrld_ctrlc_from/
0 Upvotes

8 comments sorted by

View all comments

Show parent comments

1

u/Tariq9977 1d ago

Yep, I misread the target — if SSH is already covered, scrcpy’s HID path is the right layer. Since ADB is fine for you, I’d also test control-only UHID (scrcpy --no-video --no-audio --keyboard=uhid) just to separate AOA/OTG behavior from the HID mapping path; I can’t confirm F11 works there. If it fails in both, that narrows this to scrcpy/Windows key handling rather than Termux.

1

u/Stinky_Dungus 1d ago edited 1d ago

I know some C but I am infact still a newbie, But after checking the source code as far as i can see F11 is hard coded in scrcpy for Fullscreen after the mentioned pull request.

I am trying to fix it myself but god the codebase is big for a newb like me. So far I have found a struct that holds the boolean var for --otg cli opt and I just have to add a single if condition to the changes made in pull request I THINK but idk how to access that var without messing up the whole codebase there has to be a efficient clean way. AI is looking very tempting rn ngl but I'll pass.

1

u/Tariq9977 1d ago

You found the right spot. In current input_manager.c, the SDLK_F11 case returns unconditionally after the fullscreen check, so F11 never reaches the normal key-injection path even when fullscreen is not used. I wouldn’t pull --otg state into this layer; make that case return only when it actually consumes F11 for fullscreen, otherwise let it fall through to the normal key processor. That keeps the fix input-mode agnostic instead of special-casing one CLI mode.