mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2025-08-18 08:20:34 +02:00
Add the capslock key
The key enable caps lock immediately. It does nothing if caps lock is already enabled. It is not present on the keyboard by default but a place is defined on every layout, top-right of the shift key. It can be enabled in the settings. The icon is from materialdesignicons.com.
This commit is contained in:
@@ -100,12 +100,12 @@ public class Keyboard2View extends View
|
||||
}
|
||||
|
||||
/** Called by auto-capitalisation. */
|
||||
public void set_shift_state(boolean state)
|
||||
public void set_shift_state(boolean state, boolean lock)
|
||||
{
|
||||
if (_keyboard == null || _shift_key == null)
|
||||
return;
|
||||
if (state)
|
||||
_pointers.add_fake_pointer(_shift_kv, _shift_key);
|
||||
_pointers.add_fake_pointer(_shift_kv, _shift_key, lock);
|
||||
else
|
||||
_pointers.remove_fake_pointer(_shift_kv, _shift_key);
|
||||
invalidate();
|
||||
|
Reference in New Issue
Block a user