Compare commits

...
+5 -6
View File
@@ -422,12 +422,11 @@ fn create_hotkeys(hotkeys: &Option<Vec<String>>) -> HashMap<&str, &str> {
let mut parts = item.split(','); let mut parts = item.split(',');
match (parts.next(), parts.next()) { match (parts.next(), parts.next()) {
(Some(func), Some(key)) => { (Some(func), Some(key)) => {
// 托盘菜单中的 `accelerator` 属性,在 Linux/Windows 中都不支持小键盘按键的解析 // 托盘菜单的 `accelerator` 在 Linux/Windows 下不支持小键盘按键,Windows 下也不支持 Win 键(前端上报为 `CMD`)
if key.to_uppercase().contains("NUMPAD") { let uppercase_key = key.to_uppercase();
None let unsupported =
} else { uppercase_key.contains("NUMPAD") || (cfg!(windows) && uppercase_key.contains("CMD"));
Some((func, key)) if unsupported { None } else { Some((func, key)) }
}
} }
_ => None, _ => None,
} }