Skip to content

Commit

Permalink
Avoid showing passwords in OSK buttons by disabling typing-booster in…
Browse files Browse the repository at this point in the history
… terminals when the on-screen-keyboard (OSK) is shown

Resolves: #393

Requires: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2511
  • Loading branch information
mike-fabian committed Oct 15, 2022
1 parent 8164e57 commit eddf25f
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions engine/hunspell_table.py
Expand Up @@ -5732,10 +5732,27 @@ def do_process_key_event(
if match:
return return_value

if (not self._input_mode
or (self._input_purpose
in [itb_util.InputPurpose.PASSWORD.value,
itb_util.InputPurpose.PIN.value])):
if not self._input_mode:
if DEBUG_LEVEL > 0:
LOGGER.debug('Direct input mode')
return self._return_false(keyval, keycode, state)
if (hasattr(IBus.Capabilite, 'OSK')
and
self.client_capabilities & IBus.Capabilite.OSK
and
(self._input_purpose in [itb_util.InputPurpose.TERMINAL.value])):
if DEBUG_LEVEL > 0:
LOGGER.debug(
'OSK is visible and input purpose is TERMINAL, '
'disable to avoid showing passwords in the '
'OSK completion buttons.')
return self._return_false(keyval, keycode, state)
if (self._input_purpose
in [itb_util.InputPurpose.PASSWORD.value,
itb_util.InputPurpose.PIN.value]):
if DEBUG_LEVEL > 0:
LOGGER.debug(
'Disable because of input purpose PASSWORD or PIN')
return self._return_false(keyval, keycode, state)

(match, return_value) = self._handle_hotkeys(key)
Expand Down

0 comments on commit eddf25f

Please sign in to comment.