mirror of
https://github.com/wez/wezterm.git
synced 2024-11-22 22:42:48 +03:00
keyboard fixup build on x11/wayland
This commit is contained in:
parent
3c40846d95
commit
7ff88280f3
@ -14,6 +14,7 @@ use wayland_protocols::unstable::text_input::v3::client::zwp_text_input_manager_
|
||||
use wayland_protocols::unstable::text_input::v3::client::zwp_text_input_v3::{
|
||||
Event, ZwpTextInputV3,
|
||||
};
|
||||
use wezterm_input_types::KeyboardLedStatus;
|
||||
|
||||
#[derive(Default, Debug)]
|
||||
struct PendingState {
|
||||
@ -60,6 +61,7 @@ impl Inner {
|
||||
conn.dispatch_to_focused_window(WindowEvent::KeyEvent(KeyEvent {
|
||||
key: KeyCode::composed(&text),
|
||||
modifiers: Modifiers::NONE,
|
||||
leds: KeyboardLedStatus::empty(),
|
||||
repeat_count: 1,
|
||||
key_is_down: true,
|
||||
raw: None,
|
||||
|
@ -9,7 +9,7 @@ use std::cell::RefCell;
|
||||
use std::collections::HashMap;
|
||||
use std::ffi::{CStr, OsStr};
|
||||
use std::os::unix::ffi::OsStrExt;
|
||||
use wezterm_input_types::PhysKeyCode;
|
||||
use wezterm_input_types::{KeyboardLedStatus, PhysKeyCode};
|
||||
use xkb::compose::Status as ComposeStatus;
|
||||
use xkbcommon::xkb;
|
||||
|
||||
|
@ -20,7 +20,7 @@ use std::convert::TryInto;
|
||||
use std::rc::{Rc, Weak};
|
||||
use std::sync::{Arc, Mutex};
|
||||
use wezterm_font::FontConfiguration;
|
||||
use wezterm_input_types::{KeyCode, KeyEvent, Modifiers};
|
||||
use wezterm_input_types::{KeyCode, KeyEvent, KeyboardLedStatus, Modifiers};
|
||||
use xcb::x::{Atom, PropMode};
|
||||
use xcb::{Event, Xid};
|
||||
|
||||
@ -633,6 +633,7 @@ impl XWindowInner {
|
||||
pub fn dispatch_ime_text(&mut self, text: &str) {
|
||||
let key_event = KeyEvent {
|
||||
key: KeyCode::Composed(text.into()),
|
||||
leds: KeyboardLedStatus::empty(),
|
||||
modifiers: Modifiers::NONE,
|
||||
repeat_count: 1,
|
||||
key_is_down: true,
|
||||
|
Loading…
Reference in New Issue
Block a user