i know i can use key-translation-map or function-key-map, something like
(define-key key-translation-map (kbd "
but i also want it so that if cua-mode is on, it unconditionally do emacs's C-x, not cut.
i thought it's something like this
(defun f5-Cx ()
(let (cuaModeState cua-mode)
;; type C-x here
(if cuaModeState (cua-mode 1) (cua-mode 0))
but not sure how to do the “type C-x” there. Even so, not sure the whole would work.