2024-03-12 10:21:56 +00:00
|
|
|
From 9ae92d7b8085e869d37a068a1a94815c78de6110 Mon Sep 17 00:00:00 2001
|
|
|
|
From: fujiwarat <takao.fujiwara1@gmail.com>
|
|
|
|
Date: Tue, 12 Mar 2024 18:25:39 +0900
|
|
|
|
Subject: [PATCH] engine: Ignore Super modifier key
|
|
|
|
|
|
|
|
Super-l is a shortcut key to launch a lock screen in GNOME desktop
|
|
|
|
session and now it can be sent to the engine prior to the window
|
|
|
|
manager.
|
|
|
|
---
|
|
|
|
engine/python2/engine.py | 6 ++++--
|
|
|
|
engine/python3/engine.py | 6 ++++--
|
|
|
|
2 files changed, 8 insertions(+), 4 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/engine/python2/engine.py b/engine/python2/engine.py
|
|
|
|
index 42d4dc1..c7ccd3f 100644
|
|
|
|
--- a/engine/python2/engine.py
|
|
|
|
+++ b/engine/python2/engine.py
|
|
|
|
@@ -4,7 +4,7 @@
|
|
|
|
# ibus-anthy - The Anthy engine for IBus
|
|
|
|
#
|
|
|
|
# Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@gmail.com>
|
|
|
|
-# Copyright (c) 2010-2023 Takao Fujiwara <takao.fujiwara1@gmail.com>
|
|
|
|
+# Copyright (c) 2010-2024 Takao Fujiwara <takao.fujiwara1@gmail.com>
|
|
|
|
# Copyright (c) 2007-2018 Red Hat, Inc.
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
@@ -1976,7 +1976,9 @@ class Engine(IBus.EngineSimple):
|
|
|
|
state & hex_mod_mask == hex_mod_mask:
|
|
|
|
return True
|
|
|
|
|
|
|
|
- if state & (IBus.ModifierType.CONTROL_MASK | IBus.ModifierType.MOD1_MASK):
|
|
|
|
+ if state & (IBus.ModifierType.CONTROL_MASK | \
|
|
|
|
+ IBus.ModifierType.MOD1_MASK | \
|
|
|
|
+ IBus.ModifierType.MOD4_MASK):
|
|
|
|
return False
|
|
|
|
|
|
|
|
if (IBus.KEY_exclam <= keyval <= IBus.KEY_asciitilde or
|
|
|
|
diff --git a/engine/python3/engine.py b/engine/python3/engine.py
|
|
|
|
index 4b50a01..0858614 100644
|
|
|
|
--- a/engine/python3/engine.py
|
|
|
|
+++ b/engine/python3/engine.py
|
|
|
|
@@ -4,7 +4,7 @@
|
|
|
|
# ibus-anthy - The Anthy engine for IBus
|
|
|
|
#
|
|
|
|
# Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@gmail.com>
|
|
|
|
-# Copyright (c) 2010-2023 Takao Fujiwara <takao.fujiwara1@gmail.com>
|
|
|
|
+# Copyright (c) 2010-2024 Takao Fujiwara <takao.fujiwara1@gmail.com>
|
|
|
|
# Copyright (c) 2007-2018 Red Hat, Inc.
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
@@ -1971,7 +1971,9 @@ class Engine(IBus.EngineSimple):
|
|
|
|
state & hex_mod_mask == hex_mod_mask:
|
|
|
|
return True
|
|
|
|
|
|
|
|
- if state & (IBus.ModifierType.CONTROL_MASK | IBus.ModifierType.MOD1_MASK):
|
|
|
|
+ if state & (IBus.ModifierType.CONTROL_MASK | \
|
|
|
|
+ IBus.ModifierType.MOD1_MASK | \
|
|
|
|
+ IBus.ModifierType.MOD4_MASK):
|
|
|
|
return False
|
|
|
|
|
|
|
|
if (IBus.KEY_exclam <= keyval <= IBus.KEY_asciitilde or
|
|
|
|
--
|
|
|
|
2.43.0
|
|
|
|
|