Commit 73fe4265 authored by Florian Blasius's avatar Florian Blasius 🤘
Browse files

Merge branch 'text-input' into master

parents 49999a6b 95a20a60
Pipeline #8665 passed with stage
in 1 minute and 36 seconds
This diff is collapsed.
......@@ -18,3 +18,6 @@ toml = "0.3"
[dependencies.orbital-core]
path = "orbital-core"
[patch.crates-io]
orbclient = { git = "https://gitlab.redox-os.org/redox-os/orbclient.git", branch = "text-input" }
use orbclient::{
self, Color, Event, EventOption, KeyEvent, MouseEvent, MouseRelativeEvent, ButtonEvent,
ClipboardEvent, FocusEvent, QuitEvent, MoveEvent, ResizeEvent, ScreenEvent, Renderer
ClipboardEvent, FocusEvent, QuitEvent, MoveEvent, ResizeEvent, ScreenEvent, Renderer,
TextInputEvent,
};
use orbfont;
use syscall;
......@@ -573,6 +574,12 @@ impl<'a> OrbitalSchemeEvent<'a> {
}
} else if let Some(id) = self.scheme.order.front() {
if let Some(window) = self.scheme.windows.get_mut(&id) {
if event.pressed && event.character != '\0' {
let text_input_event = TextInputEvent {
character: event.character,
}.to_event();
window.event(text_input_event);
}
window.event(event.to_event());
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment