1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-25 01:06:04 +00:00

Added Ctrl+S for send

This commit is contained in:
M66B 2020-10-15 14:38:49 +02:00
parent 68ca65a33b
commit e5b419a1e3

View file

@ -5229,10 +5229,11 @@ public class FragmentCompose extends FragmentBase {
private ActivityBase.IKeyPressedListener onKeyPressedListener = new ActivityBase.IKeyPressedListener() { private ActivityBase.IKeyPressedListener onKeyPressedListener = new ActivityBase.IKeyPressedListener() {
@Override @Override
public boolean onKeyPressed(KeyEvent event) { public boolean onKeyPressed(KeyEvent event) {
if (event.isCtrlPressed() && event.getAction() == KeyEvent.ACTION_DOWN) { if (event.isCtrlPressed() && event.getAction() == KeyEvent.ACTION_UP) {
switch (event.getKeyCode()) { switch (event.getKeyCode()) {
case KeyEvent.KEYCODE_S:
case KeyEvent.KEYCODE_ENTER: case KeyEvent.KEYCODE_ENTER:
onAction(R.id.action_check, "enter"); onAction(R.id.action_check, "key");
return true; return true;
case KeyEvent.KEYCODE_B: case KeyEvent.KEYCODE_B:
if (etBody.hasSelection()) if (etBody.hasSelection())