Autocapitalisation: Avoid trigerring when Ctrl+Del

Autocapitalisation could trigger while repeatedly typing Ctrl+Del to
remove several words.
This commit is contained in:
Jules Aguillon 2022-10-16 22:34:21 +02:00
parent 75df3afda6
commit f56b926857
2 changed files with 8 additions and 2 deletions

View File

@ -65,8 +65,14 @@ final class Autocapitalisation
callback(false);
}
public void event_sent(int code)
public void event_sent(int code, int meta)
{
if (meta != 0)
{
_should_enable_shift = false;
_should_update_caps_mode = false;
return;
}
switch (code)
{
case KeyEvent.KEYCODE_DEL:

View File

@ -353,7 +353,7 @@ public class Keyboard2 extends InputMethodService
return;
conn.sendKeyEvent(new KeyEvent(1, 1, eventAction, eventCode, 0, meta));
if (eventAction == KeyEvent.ACTION_UP)
_autocap.event_sent(eventCode);
_autocap.event_sent(eventCode, meta);
}
public void showKeyboardConfig()