setting: Middle-click modifier grabs individual overlays

This commit is contained in:
galister committed 2026-09-19 11:54:07 +09:00
1 parent c284162068
commit 329a89ca08
13 files changed
+40 -11

No files matched your search

+3 -1
View File
@@ -247,7 +247,9 @@
"STATISTICS": "Statistiken",
"ROTATIONS": "HMD-Rotationen",
"SESSION_TIME": "Sitzungszeit",
"LENS_SEPARATION_MM": "Linsenabstand (mm)"
"LENS_SEPARATION_MM": "Linsenabstand (mm)",
"MIDDLE_GRABS_SINGLE": "Mittelklick-Modifier greift einzeln",
"MIDDLE_GRABS_SINGLE_HELP": "Greifen mit dem Mittelklick-Modifier (lila Laser) \ngreift einzelne Overlays statt des gesamten Sets"
},
"APPLICATION_LAUNCHER": "Programmstarter",
"APPLICATION_STARTED": "Anwendung gestartet",
+3
View File
@@ -143,6 +143,9 @@ APP_SETTINGS.LEFT_HANDED_MOUSE_HELP,Use this if mouse buttons are swapped,Toolti
APP_SETTINGS.LONG_PRESS_DURATION,Long press duration,Setting in Settings > Features tab. Controls how long a press must be held to register as a long press.
APP_SETTINGS.LOOK_AND_FEEL,Look & Feel,"Category header in Settings. Groups visual/customization settings like language, opacity, animation speed, color palettes."
APP_SETTINGS.MISC,Miscellaneous,"Category header in Settings. Groups troubleshooting and system-level settings like capture method, input emulation, xwayland."
APP_SETTINGS.MIDDLE_GRABS_SINGLE,"Middle-click modifier grabs individual","Checkbox label in Settings > Controls tab. When enabled, grabbing with the middle modifier will always grab individual objects, never the entire set of objects. ""Middle-click modifier"" was previously translated as ""${APP_SETTINGS.BINDINGS.ACTION.CLICK_MODIFIER_MIDDLE}"""
APP_SETTINGS.MIDDLE_GRABS_SINGLE_HELP,"Grabbing with the middle-click modifier (purple laser)
will grab individual overlays, not the entire set","Tooltip for the middle modifier grabs single overlays checkbox. ""Middle-click modifier"" was previously translated as ""${APP_SETTINGS.BINDINGS.ACTION.CLICK_MODIFIER_MIDDLE}"""
APP_SETTINGS.NOTIFICATIONS_ENABLED,Enable notifications,Checkbox label in Settings > Features tab. Enables or disables system notifications within WayVR.
APP_SETTINGS.NOTIFICATIONS_SOUND_ENABLED,Notification sounds,Checkbox label in Settings > Features tab. Enables or disables sound effects for notifications.
APP_SETTINGS.NOT_SUPPORTED,Not supported,Label shown in the space drag/physics settings when a feature (like gravity) is not supported by the current backend.
1 DEFINITIONS.ANCHORED Anchored A movement option that makes this window move together with the rest of the workspace. Emphasize the "moving together" part as opposed to "not moving at all".
143 APP_SETTINGS.OPTION.FLOATING_HELP APP_SETTINGS.OPAQUE_BACKGROUND Moves independently, recenters. Easy to misplace; not recommended. Opaque background Tooltip for the Floating positioning option. Checkbox label in Settings > Look & Feel tab. Makes overlay backgrounds fully opaque (no transparency).
144 APP_SETTINGS.OPTION.STATIC_HELP APP_SETTINGS.OPTION.ANCHORED_HELP Stays in place relative to world. Moves with center marker. Recommended. Tooltip for the Static positioning option. Tooltip for the Anchored positioning option.
145 APP_SETTINGS.OPTION.AUTO APP_SETTINGS.OPTION.FLOATING_HELP Automatic Moves independently, recenters. Easy to misplace; not recommended. Dropdown option for screen capture method. Uses ScreenCopy GPU if supported, otherwise PipeWire GPU. Tooltip for the Floating positioning option.
146 APP_SETTINGS.OPTION.STATIC_HELP Stays in place relative to world. Tooltip for the Static positioning option.
147 APP_SETTINGS.OPTION.AUTO Automatic Dropdown option for screen capture method. Uses ScreenCopy GPU if supported, otherwise PipeWire GPU.
148 APP_SETTINGS.OPTION.AUTO_HELP ScreenCopy GPU if supported, otherwise PipeWire GPU. Tooltip for the Automatic capture method option.
149 APP_SETTINGS.OPTION.AUTO_HELP APP_SETTINGS.OPTION.EYE_ONLY ScreenCopy GPU if supported, otherwise PipeWire GPU. Eye laser Tooltip for the Automatic capture method option. Dropdown option for handsfree pointer mode. Uses only eye-tracking laser (no pinch).
150 APP_SETTINGS.OPTION.EYE_ONLY APP_SETTINGS.OPTION.EYE_PINCH Eye laser Eye + pinch Dropdown option for handsfree pointer mode. Uses only eye-tracking laser (no pinch). Dropdown option for handsfree pointer mode. Uses eye-tracking for aiming and pinch for click.
151 APP_SETTINGS.OPTION.EYE_PINCH APP_SETTINGS.OPTION.HMD_ONLY Eye + pinch HMD laser Dropdown option for handsfree pointer mode. Uses eye-tracking for aiming and pinch for click. Dropdown option for handsfree pointer/alt-tab mode. Uses only the HMD forward laser.
+2
View File
@@ -156,6 +156,8 @@
"LONG_PRESS_DURATION": "Long press duration",
"LOOK_AND_FEEL": "Look & Feel",
"MISC": "Miscellaneous",
"MIDDLE_GRABS_SINGLE": "Middle-click modifier grabs individual",
"MIDDLE_GRABS_SINGLE_HELP": "Grabbing with the middle-click modifier (purple laser)\nwill grab individual overlays, not the entire set",
"NOTIFICATIONS_ENABLED": "Enable notifications",
"NOTIFICATIONS_SOUND_ENABLED": "Notification sounds",
"NOT_SUPPORTED": "Not supported",
+3 -1
View File
@@ -247,7 +247,9 @@
"STATISTICS": "Estadísticas",
"ROTATIONS": "Rotaciones del HMD",
"SESSION_TIME": "Tiempo de sesión",
"LENS_SEPARATION_MM": "Separación de lentes (mm)"
"LENS_SEPARATION_MM": "Separación de lentes (mm)",
"MIDDLE_GRABS_SINGLE": "El modificador de clic central agarra objetos individuales",
"MIDDLE_GRABS_SINGLE_HELP": "Al agarrar con el modificador de clic central (láser púrpura),\nse agarrarán overlays individuales y no el set completo"
},
"APPLICATION_LAUNCHER": "Lanzador de aplicaciones",
"APPLICATION_STARTED": "Aplicación iniciada",
+3 -1
View File
@@ -247,7 +247,9 @@
"STATISTICS": "Statistiche",
"ROTATIONS": "Rotazioni HMD",
"SESSION_TIME": "Tempo sessione",
"LENS_SEPARATION_MM": "Distanza lenti (mm)"
"LENS_SEPARATION_MM": "Distanza lenti (mm)",
"MIDDLE_GRABS_SINGLE": "Il modificatore click centrale afferra singoli oggetti",
"MIDDLE_GRABS_SINGLE_HELP": "Afferrando con il modificatore click centrale (laser viola),\nsi afferrano i singoli overlay e non l'intero set"
},
"APPLICATION_LAUNCHER": "Avvio applicazioni",
"APPLICATION_STARTED": "Applicazione avviata",
+3 -1
View File
@@ -247,7 +247,9 @@
"STATISTICS": "統計",
"ROTATIONS": "HMD回転数",
"SESSION_TIME": "セッション時間",
"LENS_SEPARATION_MM": "レンズ間隔 (mm)"
"LENS_SEPARATION_MM": "レンズ間隔 (mm)",
"MIDDLE_GRABS_SINGLE": "中クリック修飾キーで個別に掴む",
"MIDDLE_GRABS_SINGLE_HELP": "中クリック修飾キー(紫色のレーザー)で掴むと、\nセット全体ではなく個別のオーバーレイを掴むことができる"
},
"APPLICATION_LAUNCHER": "アプリランチャー",
"APPLICATION_STARTED": "アプリが起動しました",
+3 -1
View File
@@ -247,7 +247,9 @@
"STATISTICS": "Statystyki",
"ROTATIONS": "Obroty HMD",
"SESSION_TIME": "Czas sesji",
"LENS_SEPARATION_MM": "Rozstaw soczewek (mm)"
"LENS_SEPARATION_MM": "Rozstaw soczewek (mm)",
"MIDDLE_GRABS_SINGLE": "Modyfikator środkowego przycisku chwyta pojedyncze obiekty",
"MIDDLE_GRABS_SINGLE_HELP": "Chwytanie z modyfikatorem środkowego przycisku myszy (fioletowy laser)\npochwyci pojedyncze nakładki, a nie cały zestaw"
},
"APPLICATION_LAUNCHER": "Launcher aplikacji",
"APPLICATION_STARTED": "Uruchomiono aplikację",
+3 -1
View File
@@ -247,7 +247,9 @@
"STATISTICS": "统计数据",
"ROTATIONS": "HMD 旋转次数",
"SESSION_TIME": "会话时间",
"LENS_SEPARATION_MM": "瞳距 (mm)"
"LENS_SEPARATION_MM": "瞳距 (mm)",
"MIDDLE_GRABS_SINGLE": "中键点击修饰键抓取单个对象",
"MIDDLE_GRABS_SINGLE_HELP": "使用中键点击修饰键(紫色激光)抓取时\n将抓取单个叠加层,而非整个集合"
},
"APPLICATION_LAUNCHER": "应用启动器",
"APPLICATION_STARTED": "应用程序已启动",
+4
View File
@@ -347,6 +347,7 @@ pub(crate) enum SettingType {
NotificationsEnabled,
NotificationsSoundEnabled,
OpaqueBackground,
MiddleGrabsSingle,
MouseAcceleration,
PointerLerpFactor,
MouseSpeed,
@@ -403,6 +404,7 @@ impl SettingType {
Self::NotificationsEnabled => &mut config.notifications_enabled,
Self::NotificationsSoundEnabled => &mut config.notifications_sound_enabled,
Self::OpaqueBackground => &mut config.opaque_background,
Self::MiddleGrabsSingle => &mut config.middle_grabs_single,
Self::MouseAcceleration => &mut config.wvr_mouse_acceleration,
Self::ScreenRenderDown => &mut config.screen_render_down,
Self::SetsOnWatch => &mut config.sets_on_watch,
@@ -553,6 +555,7 @@ impl SettingType {
Self::NotificationsEnabled => Ok("APP_SETTINGS.NOTIFICATIONS_ENABLED"),
Self::NotificationsSoundEnabled => Ok("APP_SETTINGS.NOTIFICATIONS_SOUND_ENABLED"),
Self::OpaqueBackground => Ok("APP_SETTINGS.OPAQUE_BACKGROUND"),
Self::MiddleGrabsSingle => Ok("APP_SETTINGS.MIDDLE_GRABS_SINGLE"),
Self::MouseSpeed => Ok("APP_SETTINGS.POINTER_SPEED"),
Self::MouseAcceleration => Ok("APP_SETTINGS.POINTER_ACCELERATION"),
Self::PointerLerpFactor => Ok("APP_SETTINGS.POINTER_LERP_FACTOR"),
@@ -602,6 +605,7 @@ impl SettingType {
Self::InputEmulationMethod => Some("APP_SETTINGS.INPUT_EMULATION_METHOD_HELP"),
Self::KeyboardMiddleClick => Some("APP_SETTINGS.KEYBOARD_MIDDLE_CLICK_HELP"),
Self::LeftHandedMouse => Some("APP_SETTINGS.LEFT_HANDED_MOUSE_HELP"),
Self::MiddleGrabsSingle => Some("APP_SETTINGS.MIDDLE_GRABS_SINGLE_HELP"),
Self::MouseAcceleration => Some("APP_SETTINGS.POINTER_ACCELERATION_HELP"),
Self::ScreenRenderDown => Some("APP_SETTINGS.SCREEN_RENDER_DOWN_HELP"),
Self::SnapAngleDeg => Some("APP_SETTINGS.SNAP_ANGLE_DEG_HELP"),
@@ -4,16 +4,16 @@ use wgui::{
components::button::ComponentButton, globals::WguiGlobals, layout::WidgetID, parser::Fetchable, task::Tasks,
};
use crate::tab::settings::{UpdateExtra, horiz_cell, mount_requires_restart};
use crate::tab::settings::{horiz_cell, mount_requires_restart, UpdateExtra};
use crate::util::popup_manager::PopupHolder;
use crate::{
frontend::FrontendTasks,
tab::settings::{
SettingType, SettingsMountParams, SettingsTab,
macros::{options_category, options_checkbox, options_dropdown, options_slider_f32, options_slider_i32},
SettingType, SettingsMountParams, SettingsTab,
},
views::{ViewUpdateParams, input_profiles},
views::{input_profiles, ViewUpdateParams},
};
#[derive(Clone)]
@@ -100,6 +100,7 @@ impl State {
options_dropdown::<wlx_common::config::HandsfreeAltTab>(par.mp, c, &SettingType::HandsfreeAltTab)?;
options_checkbox(par.mp, c, SettingType::FocusFollowsMouseMode)?;
options_checkbox(par.mp, c, SettingType::LeftHandedMouse)?;
options_checkbox(par.mp, c, SettingType::MiddleGrabsSingle)?;
options_checkbox(par.mp, c, SettingType::AllowSliding)?;
options_checkbox(par.mp, c, SettingType::InvertScrollDirectionX)?;
options_checkbox(par.mp, c, SettingType::InvertScrollDirectionY)?;
+4 -2
View File
@@ -426,7 +426,7 @@ pub struct GrabData {
}
#[repr(u8)]
#[derive(Debug, Clone, Copy, Default)]
#[derive(Debug, Clone, Copy, Default, PartialEq)]
pub enum PointerMode {
#[default]
Left,
@@ -857,7 +857,9 @@ fn start_grab(par: StartGrabParams) {
let grab_anchor = !par.edit_mode
&& !par.grab_float
&& !app.anchor_grabbed
&& matches!(state.positioning, Positioning::Anchored);
&& matches!(state.positioning, Positioning::Anchored)
&& !(app.session.config.middle_grabs_single
&& pointer.interaction.mode == PointerMode::Middle);
let relative_grab_transform = if grab_anchor {
app.anchor
+2
View File
@@ -198,6 +198,7 @@ pub struct AutoSettings {
pub default_curvature: f32,
pub default_opacity: f32,
pub default_positioning: DefaultPositioning,
pub middle_grabs_single: bool,
}
fn get_settings_path() -> PathBuf {
@@ -273,6 +274,7 @@ pub fn save_settings(config: &GeneralConfig) -> anyhow::Result<()> {
default_curvature: config.default_curvature,
default_opacity: config.default_opacity,
default_positioning: config.default_positioning,
middle_grabs_single: config.middle_grabs_single,
};
let json = serde_json::to_string_pretty(&conf).unwrap(); // want panic
+3
View File
@@ -556,4 +556,7 @@ pub struct GeneralConfig {
#[serde(default = "def_point15")]
pub default_curvature: f32,
#[serde(default)]
pub middle_grabs_single: bool,
}