fix: allow no modifier for function keys
This commit is contained in:
parent
b6fc00972d
commit
c2fa21debc
4 changed files with 12 additions and 4 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
|
@ -1756,7 +1756,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-settings-config"
|
name = "cosmic-settings-config"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/pop-os/cosmic-settings-daemon#8616c40d235164779cd3f2ceec1fe9b2b4aceb40"
|
source = "git+https://github.com/pop-os/cosmic-settings-daemon?branch=lowercase#e76a492d37d10da380f7054c2c30fc3f2528c532"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cosmic-config",
|
"cosmic-config",
|
||||||
"ron 0.11.0",
|
"ron 0.11.0",
|
||||||
|
|
@ -1777,7 +1777,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-settings-daemon-config"
|
name = "cosmic-settings-daemon-config"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/pop-os/cosmic-settings-daemon#8616c40d235164779cd3f2ceec1fe9b2b4aceb40"
|
source = "git+https://github.com/pop-os/cosmic-settings-daemon?branch=lowercase#e76a492d37d10da380f7054c2c30fc3f2528c532"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cosmic-config",
|
"cosmic-config",
|
||||||
"serde",
|
"serde",
|
||||||
|
|
|
||||||
|
|
@ -22,13 +22,14 @@ cosmic-panel-config = { workspace = true, optional = true }
|
||||||
cosmic-protocols = { git = "https://github.com/pop-os/cosmic-protocols", optional = true }
|
cosmic-protocols = { git = "https://github.com/pop-os/cosmic-protocols", optional = true }
|
||||||
cosmic-randr-shell.workspace = true
|
cosmic-randr-shell.workspace = true
|
||||||
cosmic-randr = { workspace = true, optional = true }
|
cosmic-randr = { workspace = true, optional = true }
|
||||||
cosmic-settings-config = { git = "https://github.com/pop-os/cosmic-settings-daemon", optional = true }
|
cosmic-settings-config = { git = "https://github.com/pop-os/cosmic-settings-daemon", optional = true, branch = "lowercase" }
|
||||||
# cosmic-settings-config = { path = "../../cosmic-settings-daemon/config", optional = true }
|
# cosmic-settings-config = { path = "../../cosmic-settings-daemon/config", optional = true }
|
||||||
cosmic-settings-page = { path = "../page" }
|
cosmic-settings-page = { path = "../page" }
|
||||||
cosmic-settings-subscriptions = { workspace = true, optional = true }
|
cosmic-settings-subscriptions = { workspace = true, optional = true }
|
||||||
cosmic-settings-system = { path = "../pages/system", optional = true }
|
cosmic-settings-system = { path = "../pages/system", optional = true }
|
||||||
cosmic-settings-wallpaper = { path = "../pages/wallpapers" }
|
cosmic-settings-wallpaper = { path = "../pages/wallpapers" }
|
||||||
cosmic-settings-daemon-config = { git = "https://github.com/pop-os/cosmic-settings-daemon", optional = true }
|
cosmic-settings-daemon-config = { git = "https://github.com/pop-os/cosmic-settings-daemon", optional = true, branch = "lowercase" }
|
||||||
|
# cosmic-settings-daemon-config = { path = "../../cosmic-settings-daemon/cosmic-settings-daemon-config", optional = true }
|
||||||
derive_setters = "0.1.8"
|
derive_setters = "0.1.8"
|
||||||
dirs = "6.0.0"
|
dirs = "6.0.0"
|
||||||
eyre = "0.6.12"
|
eyre = "0.6.12"
|
||||||
|
|
|
||||||
|
|
@ -564,6 +564,10 @@ impl Model {
|
||||||
{
|
{
|
||||||
if shortcut.pending.modifiers
|
if shortcut.pending.modifiers
|
||||||
!= cosmic_settings_config::shortcuts::Modifiers::new()
|
!= cosmic_settings_config::shortcuts::Modifiers::new()
|
||||||
|
|| shortcut.pending.key.is_some_and(|key| {
|
||||||
|
key.is_misc_function_key()
|
||||||
|
|| matches!(key.raw(), 0x10080001..=0x1008FFFF)
|
||||||
|
})
|
||||||
{
|
{
|
||||||
shortcut.input = shortcut.pending.to_string();
|
shortcut.input = shortcut.pending.to_string();
|
||||||
// XX for now avoid applying the keycode
|
// XX for now avoid applying the keycode
|
||||||
|
|
|
||||||
|
|
@ -311,6 +311,9 @@ impl Page {
|
||||||
.is_some_and(|k| k == keycode)
|
.is_some_and(|k| k == keycode)
|
||||||
&& self.add_shortcut.binding.modifiers
|
&& self.add_shortcut.binding.modifiers
|
||||||
!= cosmic_settings_config::shortcuts::Modifiers::new()
|
!= cosmic_settings_config::shortcuts::Modifiers::new()
|
||||||
|
|| self.add_shortcut.binding.key.is_some_and(|key| {
|
||||||
|
key.is_misc_function_key() || matches!(key.raw(), 0x10080001..=0x1008FFFF)
|
||||||
|
})
|
||||||
{
|
{
|
||||||
// XX for now avoid applying the keycode
|
// XX for now avoid applying the keycode
|
||||||
let binding = Binding {
|
let binding = Binding {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue