[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
how to map F5 to emacs's C-x and ignore cua-mode?
From: |
Xah Lee |
Subject: |
how to map F5 to emacs's C-x and ignore cua-mode? |
Date: |
Tue, 24 May 2011 20:01:02 -0000 |
User-agent: |
G2/1.0 |
if i want to set F5 to emacs's C-x and F6 to emacs's C-c, how to do
that?
i know i can use key-translation-map or function-key-map, something
like
(define-key key-translation-map (kbd "<f5>") "<C-x>")
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 ()
"DOCSTRING"
(interactive)
(let (cuaModeState cua-mode)
(cua-mode 0)
;; 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.
Thanks.
Xah
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- how to map F5 to emacs's C-x and ignore cua-mode?,
Xah Lee <=