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

keyboard left shift and direction keys don't work #535

Open
zombiehoffa opened this issue Aug 20, 2024 · 1 comment
Open

keyboard left shift and direction keys don't work #535

zombiehoffa opened this issue Aug 20, 2024 · 1 comment

Comments

@zombiehoffa
Copy link

I have a keychron k10 pro keyboard connected via usb and the left shift and arrow keys don't work. I've tried the other ibm keyboard layouts via passing the cli option but it doens't appear to do anything. Any help would be much appreciated. I"m running latest gity code.

@CBenoit
Copy link
Member

CBenoit commented Aug 22, 2024

Hi!

Maybe our input event handling logic is lacking. Since you are building from master, I think you could easily provide us with more troubleshooting information.

At this place:

WindowEvent::KeyboardInput { event, .. } => {
if let Some(scancode) = event.physical_key.to_scancode() {
let scancode = ironrdp::input::Scancode::from_u16(u16::try_from(scancode).unwrap());
let operation = match event.state {
event::ElementState::Pressed => ironrdp::input::Operation::KeyPressed(scancode),
event::ElementState::Released => ironrdp::input::Operation::KeyReleased(scancode),
};
let input_events = self.input_database.apply(std::iter::once(operation));
send_fast_path_events(&self.input_event_sender, input_events);
}
}

Can you modify that in such way?

                if let Some(scancode) = event.physical_key.to_scancode() {
                    let scancode = ironrdp::input::Scancode::from_u16(u16::try_from(scancode).unwrap());

                    let operation = match event.state {
                        event::ElementState::Pressed => ironrdp::input::Operation::KeyPressed(scancode),
                        event::ElementState::Released => ironrdp::input::Operation::KeyReleased(scancode),
                    };

                    let input_events = self.input_database.apply(std::iter::once(operation));

                    send_fast_path_events(&self.input_event_sender, input_events);
                } else {
                    warn!(?event, "Unhandled keyboard event");
                }

And then, let’s see what kind of warnings we get.

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

No branches or pull requests

2 participants