|
|
@ -1126,19 +1126,20 @@ class ComposeActivity : BaseActivity(), |
|
|
|
|
|
|
|
|
|
|
|
override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean { |
|
|
|
override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean { |
|
|
|
Log.d(TAG, event.toString()) |
|
|
|
Log.d(TAG, event.toString()) |
|
|
|
if (event.isCtrlPressed) { |
|
|
|
if(event.action == KeyEvent.ACTION_DOWN) { |
|
|
|
if (keyCode == KeyEvent.KEYCODE_ENTER) { |
|
|
|
if (event.isCtrlPressed) { |
|
|
|
// send toot by pressing CTRL + ENTER |
|
|
|
if (keyCode == KeyEvent.KEYCODE_ENTER) { |
|
|
|
this.onSendClicked() |
|
|
|
// send toot by pressing CTRL + ENTER |
|
|
|
return true |
|
|
|
this.onSendClicked() |
|
|
|
|
|
|
|
return true |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (keyCode == KeyEvent.KEYCODE_BACK) { |
|
|
|
if (keyCode == KeyEvent.KEYCODE_BACK) { |
|
|
|
onBackPressed() |
|
|
|
onBackPressed() |
|
|
|
return true |
|
|
|
return true |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return super.onKeyDown(keyCode, event) |
|
|
|
return super.onKeyDown(keyCode, event) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|