mirror of
https://github.com/wayvr-org/wayvr.git
synced 2026-11-30 22:02:44 -08:00
release super virtually when entering aim mode
This commit is contained in:
1 parent
d7fcaf94bd
commit
fad0cbb2b7
2 files changed
+12
No files matched your search
@@ -693,6 +693,10 @@ fn process_libinput_event(par: ProcessLibinputEventParams) -> ProcessResult {
|
||||
{
|
||||
return ProcessResult::ReceiverGone;
|
||||
}
|
||||
|
||||
if matches!(combo, KeyCombo::SwitchApp) && !combo_pressed {
|
||||
return ProcessResult::Continue;
|
||||
}
|
||||
}
|
||||
|
||||
if par
|
||||
|
||||
@@ -17,6 +17,7 @@ use session::{SessionRegistry, app_key, tag_key};
|
||||
use slotmap::{DenseSlotMap, SecondaryMap};
|
||||
use smallvec::SmallVec;
|
||||
use smithay::{
|
||||
backend::input::Keycode,
|
||||
desktop::PopupManager,
|
||||
input::{SeatState, keyboard::XkbConfig, pointer::CursorImageStatus},
|
||||
output::{Mode, Output},
|
||||
@@ -1366,6 +1367,13 @@ impl WvrServerState {
|
||||
}
|
||||
input_capture::KeyCombo::SwitchApp => {
|
||||
if pressed {
|
||||
let pressed_keys = self.manager.seat_keyboard.pressed_keys();
|
||||
for vk in [hid::VirtualKey::LSuper, hid::VirtualKey::RSuper] {
|
||||
hid_wrapper.inner.send_key(vk, false);
|
||||
if pressed_keys.contains(&Keycode::new(vk as u32)) {
|
||||
self.manager.send_key(vk as u32, false);
|
||||
}
|
||||
}
|
||||
input_state.picking_focus = super::input::FocusPickState::Aiming;
|
||||
tasks.enqueue(TaskType::Overlay(OverlayTask::Modify(
|
||||
OverlaySelector::Name(ALTTAB_HELP_NAME.clone()),
|
||||
|
||||
Reference in new issue
Block a user