1 Star 0 Fork 17

meizhigang/kiran-cc-daemon_src

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-fix-media-keys-Fix-use-shortcut-key-with-shift.patch 1.82 KB
一键复制 编辑 原始数据 按行查看 历史
From b7495f653007f54a306eecd8b033c857359cee4a Mon Sep 17 00:00:00 2001
From: meizhigang <meizhigang@kylinsec.com.cn>
Date: Fri, 5 Jan 2024 09:25:02 +0800
Subject: [PATCH] fix(media-keys):Fix use shortcut key with shift
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
-兼容快捷键按键shift
Related #25039
---
plugins/keybinding/shortcut-helper.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/plugins/keybinding/shortcut-helper.cpp b/plugins/keybinding/shortcut-helper.cpp
index c459b53..a9dd62c 100644
--- a/plugins/keybinding/shortcut-helper.cpp
+++ b/plugins/keybinding/shortcut-helper.cpp
@@ -134,6 +134,7 @@ KeyState ShortCutHelper::get_keystate(XEvent *event)
gdk_keyval_convert_case(keyval, &lower, &upper);
key_state.key_symbol = lower;
+ consumed = (GdkModifierType)(consumed & (~GDK_SHIFT_MASK));
KLOG_DEBUG_KEYBINDING("The keystate is %0x and consumed is %0x.", event->xkey.state, consumed);
key_state.mods = event->xkey.state & ~consumed & GDK_MODIFIER_MASK;
return key_state;
@@ -213,7 +214,7 @@ bool ShortCutHelper::grab_keystate_change(Glib::RefPtr<Gdk::Window> root_window,
const KeyState &keystate,
bool is_grab)
{
- KLOG_PROFILE("symbol: %0x mods: %0x", keystate.key_symbol, keystate.mods);
+ KLOG_DEBUG_KEYBINDING("Grab key symbol: %0x mods: %0x", keystate.key_symbol, keystate.mods);
RETURN_VAL_IF_TRUE(keystate == NULL_KEYSTATE, true);
RETURN_VAL_IF_FALSE(keystate != INVALID_KEYSTATE, false);
@@ -287,4 +288,4 @@ bool ShortCutHelper::key_uses_keycode(const KeyState &key_state, uint32_t keycod
return false;
}
-} // namespace Kiran
\ No newline at end of file
+} // namespace Kiran
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/meizhigang/kiran-cc-daemon_src.git
git@gitee.com:meizhigang/kiran-cc-daemon_src.git
meizhigang
kiran-cc-daemon_src
kiran-cc-daemon_src
master

搜索帮助