* lisp/bindings.el (global-map): Bind cut, copy and paste.
* src/androidterm.c (JNICALL): Use key.
(define-key global-map [insertchar] 'overwrite-mode)
(define-key global-map [C-insertchar] 'kill-ring-save)
(define-key global-map [S-insertchar] 'yank)
+;; The next three keys are used on MS Windows and Android.
+(define-key global-map [copy] 'kill-ring-save)
+(define-key global-map [paste] 'yank)
+(define-key global-map [cut] 'kill-region)
(define-key global-map [undo] 'undo)
(define-key global-map [redo] 'repeat-complex-command)
(define-key global-map [again] 'repeat-complex-command) ; Sun keyboard
case 0: /* android.R.id.selectAll */
case 1: /* android.R.id.startSelectingText */
case 2: /* android.R.id.stopSelectingText */
+ default:
/* These actions are not implemented. */
return;
case 5: /* android.R.id.paste */
key = 279;
break;
-
- default:
- emacs_abort ();
}
event.xkey.type = ANDROID_KEY_PRESS;
event.xkey.window = window;
event.xkey.time = 0;
event.xkey.state = 0;
- event.xkey.keycode = 66;
+ event.xkey.keycode = key;
event.xkey.unicode_char = 0;
event.xkey.counter = ++edit_counter;