From 48996d6babbd5fede568555e76eef01ce69ab9ba Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Tue, 12 Mar 2024 19:21:56 +0900 Subject: [PATCH] Disable Super-l in Hiragana mode --- ibus-anthy-HEAD.patch | 64 +++++++++++++++++++++++++++++++++++++++++++ ibus-anthy.spec | 6 +++- 2 files changed, 69 insertions(+), 1 deletion(-) diff --git a/ibus-anthy-HEAD.patch b/ibus-anthy-HEAD.patch index e69de29..e33d0c9 100644 --- a/ibus-anthy-HEAD.patch +++ b/ibus-anthy-HEAD.patch @@ -0,0 +1,64 @@ +From 9ae92d7b8085e869d37a068a1a94815c78de6110 Mon Sep 17 00:00:00 2001 +From: fujiwarat +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 +-# Copyright (c) 2010-2023 Takao Fujiwara ++# Copyright (c) 2010-2024 Takao Fujiwara + # 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 +-# Copyright (c) 2010-2023 Takao Fujiwara ++# Copyright (c) 2010-2024 Takao Fujiwara + # 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 + diff --git a/ibus-anthy.spec b/ibus-anthy.spec index 3ee8e31..1a28874 100644 --- a/ibus-anthy.spec +++ b/ibus-anthy.spec @@ -18,7 +18,7 @@ Name: ibus-anthy Version: 1.5.16 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Anthy engine for IBus input platform License: GPL-2.0-or-later URL: https://github.com/ibus/ibus/wiki @@ -26,6 +26,7 @@ Source0: https://github.com/ibus/ibus-anthy/releases/download/%{version}/ # Upstreamed patches. # Patch0: %%{name}-HEAD.patch +Patch0: %{name}-HEAD.patch Patch1: %{name}-1938129-default-hiragana.patch BuildRequires: anthy-unicode-devel @@ -156,6 +157,9 @@ make -C data check %{_datadir}/installed-tests/%{name} %changelog +* Tue Mar 12 2024 Takao Fujiwara - 1.5.16-2 +- Disable Super-l in Hiragana mode + * Wed Feb 28 2024 Takao Fujiwara - 1.5.16-1 - Bump to 1.5.16