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
Compose/dead keys break on MacOS in version 0.25 #2040
Comments
Doing a |
Hmm, after reading the thread, it seems like the indented behaviour is:
However, what seems to happen is:
|
Also, I guess I should give some more exact instructions to reproduce: use winit::{
event::{Event, WindowEvent},
event_loop::{ControlFlow, EventLoop},
window::WindowBuilder,
};
fn main() {
let event_loop = EventLoop::new();
let window = WindowBuilder::new()
.with_inner_size(winit::dpi::LogicalSize::new(128.0, 128.0))
.build(&event_loop)
.unwrap();
event_loop.run(move |event, _, control_flow| {
*control_flow = ControlFlow::Wait;
match event {
Event::WindowEvent {
event: WindowEvent::CloseRequested,
window_id,
} if window_id == window.id() => *control_flow = ControlFlow::Exit,
Event::WindowEvent {
event: WindowEvent::ReceivedCharacter(c),
..
} => {
println!("Pressed {:?}", c);
}
Event::WindowEvent {
event: e@WindowEvent::KeyboardInput { .. },
..
} => {
// println!("KeyboardInputted {:?}", e);
}
_ => (),
}
});
} is a simple program that simply Using the Swedish Pro layout (or any other layout with a dead key), press the |
Hello. When compiling a custom fork of alacritty, I tried upgrading winit to 0.25 from version 0.24. While everything seemed to have worked fine, an issue arose when I tried to use a dead key.
The behaviour in 0.25 seems to be that when the compose key is pressed, a ReceivedCharacter event is produced with the terminator char for the dead key, and when another character is pressed (which should normally be turned into the corresponding char from the dead key state), it does not trigger a ReceivedCharacter event. The correct behaviour would be to not produce a ReceivedCharacter event when the dead key is pressed, and produce a ReceivedCharacter event for the key pressed after the dead key is pressed, which is what version 0.24 does.
I will try to produce an explicit minimal reproducible example of the problem when I have time, but the instructions above should be enough to reproduce the behaviour in any application that responds to characters typed by the user.
The text was updated successfully, but these errors were encountered: