input: add iso_level5_shift modifier
Some checks failed
Continuous Integration / format (push) Has been cancelled
Continuous Integration / clippy-check (push) Has been cancelled
Continuous Integration / smithay-check-features (push) Has been cancelled
Continuous Integration / check-msrv (push) Has been cancelled
Continuous Integration / check-minimal (push) Has been cancelled
Continuous Integration / smithay-tests (push) Has been cancelled
Continuous Integration / smallvil-check (push) Has been cancelled
Continuous Integration / anvil-check-features (push) Has been cancelled
Continuous Integration / WLCS: ${{ matrix.job_name }} (buffer, BadBufferTest*, Bad Buffer Test) (push) Has been cancelled
Continuous Integration / WLCS: ${{ matrix.job_name }} (core, SelfTest*:FrameSubmission*, Core tests) (push) Has been cancelled
Continuous Integration / WLCS: ${{ matrix.job_name }} (output, XdgOutputV1Test*, Output tests) (push) Has been cancelled
Continuous Integration / WLCS: ${{ matrix.job_name }} (pointer-input, */SurfacePointerMotionTest*:RelativePointer*, Pointer input tests) (push) Has been cancelled
Continuous Integration / Documentation on Github Pages (push) Has been cancelled

This commit is contained in:
Jeff Peeler 2024-06-20 00:40:14 -04:00 committed by Victoria Brekenfeld
parent 605b34ef53
commit de94e8f59e
3 changed files with 6 additions and 2 deletions

View file

@ -65,7 +65,7 @@ wayland-sys = { version = "0.31", optional = true }
wayland-backend = { version = "0.3.0", optional = true }
winit = { version = "0.30.0", default-features = false, features = ["wayland", "wayland-dlopen", "x11", "rwh_06"], optional = true }
x11rb = { version = "0.13.0", optional = true }
xkbcommon = { version = "0.7.0", features = ["wayland"]}
xkbcommon = { version = "0.8.0", features = ["wayland"]}
scan_fmt = { version = "0.2.3", default-features = false }
encoding_rs = { version = "0.8.33", optional = true }
profiling = "1.0"

View file

@ -15,7 +15,7 @@ tracing = { version = "0.1.37", features = ["max_level_trace", "release_max_leve
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
thiserror = "1"
xcursor = {version = "0.3.3", optional = true}
xkbcommon = "0.7.0"
xkbcommon = "0.8.0"
renderdoc = {version = "0.11.0", optional = true}
smithay-drm-extras = {path = "../smithay-drm-extras", optional = true}
puffin_http = { version = "0.13", optional = true }

View file

@ -27,6 +27,9 @@ pub struct ModifiersState {
/// Also known as the "AltGr" key
pub iso_level3_shift: bool,
/// The "ISO level 5 shift" key
pub iso_level5_shift: bool,
/// Serialized modifier state, as send e.g. by the wl_keyboard protocol
pub serialized: SerializedMods,
}
@ -42,6 +45,7 @@ impl ModifiersState {
self.num_lock = state.mod_name_is_active(&xkb::MOD_NAME_NUM, xkb::STATE_MODS_EFFECTIVE);
self.iso_level3_shift =
state.mod_name_is_active(&xkb::MOD_NAME_ISO_LEVEL3_SHIFT, xkb::STATE_MODS_EFFECTIVE);
self.iso_level5_shift = state.mod_name_is_active(&xkb::MOD_NAME_MOD3, xkb::STATE_MODS_EFFECTIVE);
self.serialized = serialize_modifiers(state);
}
}