mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2025-06-27 13:12:02 +02:00
Autocapitalisation: Avoid trigerring when Ctrl+Del
Autocapitalisation could trigger while repeatedly typing Ctrl+Del to remove several words.
This commit is contained in:
parent
75df3afda6
commit
f56b926857
@ -65,8 +65,14 @@ final class Autocapitalisation
|
|||||||
callback(false);
|
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)
|
switch (code)
|
||||||
{
|
{
|
||||||
case KeyEvent.KEYCODE_DEL:
|
case KeyEvent.KEYCODE_DEL:
|
||||||
|
@ -353,7 +353,7 @@ public class Keyboard2 extends InputMethodService
|
|||||||
return;
|
return;
|
||||||
conn.sendKeyEvent(new KeyEvent(1, 1, eventAction, eventCode, 0, meta));
|
conn.sendKeyEvent(new KeyEvent(1, 1, eventAction, eventCode, 0, meta));
|
||||||
if (eventAction == KeyEvent.ACTION_UP)
|
if (eventAction == KeyEvent.ACTION_UP)
|
||||||
_autocap.event_sent(eventCode);
|
_autocap.event_sent(eventCode, meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showKeyboardConfig()
|
public void showKeyboardConfig()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user