temp commit
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
cea123c79f
commit
50f751c215
@ -759,12 +759,14 @@ pub fn map_keyboard_mode(event: &Event, mut key_event: KeyEvent) -> Option<KeyEv
|
|||||||
fn try_fill_unicode(event: &Event, key_event: &KeyEvent, events: &mut Vec<KeyEvent>) {
|
fn try_fill_unicode(event: &Event, key_event: &KeyEvent, events: &mut Vec<KeyEvent>) {
|
||||||
match &event.unicode {
|
match &event.unicode {
|
||||||
Some(unicode_info) => {
|
Some(unicode_info) => {
|
||||||
for code in &unicode_info.unicode {
|
if let Some(name) = unicode_info.name {
|
||||||
|
if name.len() > 0 {
|
||||||
let mut evt = key_event.clone();
|
let mut evt = key_event.clone();
|
||||||
evt.set_unicode(*code as _);
|
evt.set_seq(name);
|
||||||
events.push(evt);
|
events.push(evt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
None => {}
|
None => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1093,6 +1093,9 @@ fn translate_keyboard_mode(evt: &KeyEvent) {
|
|||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
allow_err!(rdev::simulate_unicode(_unicode as _));
|
allow_err!(rdev::simulate_unicode(_unicode as _));
|
||||||
}
|
}
|
||||||
|
Some(key_event::Union::Seq(seq)) => {
|
||||||
|
ENIGO.lock().unwrap().key_sequence(&seq);
|
||||||
|
}
|
||||||
Some(key_event::Union::Chr(..)) =>
|
Some(key_event::Union::Chr(..)) =>
|
||||||
{
|
{
|
||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user