* how to map F5 to emacs's C-x and ignore cua-mode?
@ 2011-04-17 20:37 Xah Lee
0 siblings, 0 replies; only message in thread
From: Xah Lee @ 2011-04-17 20:37 UTC (permalink / raw)
To: help-gnu-emacs
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-04-17 20:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-17 20:37 how to map F5 to emacs's C-x and ignore cua-mode? Xah Lee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).