mirror of https://github.com/wayvr-org/wayvr.git
run swipes on AltGr keycaps
This commit is contained in:
parent
e91b5875f6
commit
7d35789f62
|
|
@ -280,6 +280,7 @@ fn logging_init(args: &mut Args) {
|
|||
.from_env_lossy()
|
||||
.add_directive("symphonia_core::probe=warn".parse().unwrap())
|
||||
.add_directive("symphonia_bundle_mp3=warn".parse().unwrap())
|
||||
.add_directive("ort=warn".parse().unwrap())
|
||||
.add_directive("zbus=warn".parse().unwrap())
|
||||
.add_directive("usvg=error".parse().unwrap())
|
||||
.add_directive("resvg=error".parse().unwrap())
|
||||
|
|
|
|||
|
|
@ -461,7 +461,9 @@ fn handle_mouse_motion(
|
|||
within_key_pos: &Option<Vec2>,
|
||||
device: usize
|
||||
) {
|
||||
if let Some(swipe_manager) = keyboard.swipe_typing_manager.as_mut() && *key_cap_type == KeyCapType::Letter {
|
||||
if let Some(swipe_manager) = keyboard.swipe_typing_manager.as_mut()
|
||||
&& matches!(*key_cap_type, KeyCapType::Letter | KeyCapType::LetterAltGr)
|
||||
{
|
||||
if !swipe_manager.is_current_swipe_empty() {
|
||||
match &key.button_state {
|
||||
KeyButtonData::Key { vk, pressed } => {
|
||||
|
|
@ -493,7 +495,9 @@ fn handle_press(
|
|||
) {
|
||||
match &key.button_state {
|
||||
KeyButtonData::Key { vk, pressed } => {
|
||||
if let Some(swipe_manager) = keyboard.swipe_typing_manager.as_mut() && *key_cap_type == KeyCapType::Letter {
|
||||
if let Some(swipe_manager) = keyboard.swipe_typing_manager.as_mut()
|
||||
&& matches!(*key_cap_type, KeyCapType::Letter | KeyCapType::LetterAltGr)
|
||||
{
|
||||
if let Some(pos) = within_key_pos {
|
||||
if let Some(label) = key_label.first() {
|
||||
swipe_manager.add_swipe(pos, label.chars().next().unwrap_or_default(), device);
|
||||
|
|
@ -545,7 +549,9 @@ fn handle_press(
|
|||
fn handle_release(app: &mut AppState, key: &KeyState, k_cap_type: &KeyCapType, keyboard: &mut KeyboardState) -> bool {
|
||||
match &key.button_state {
|
||||
KeyButtonData::Key { vk, pressed } => {
|
||||
if let Some(swipe_manager) = keyboard.swipe_typing_manager.as_mut() && *k_cap_type == KeyCapType::Letter {
|
||||
if let Some(swipe_manager) = keyboard.swipe_typing_manager.as_mut()
|
||||
&& matches!(*k_cap_type, KeyCapType::Letter | KeyCapType::LetterAltGr)
|
||||
{
|
||||
if swipe_manager.did_swipe_leave_first_key() {
|
||||
match swipe_manager.predict() {
|
||||
Ok(()) => {},
|
||||
|
|
|
|||
Loading…
Reference in New Issue