0

How do I configure emacs to use IBM CUA keys for mark copy delete and paste?

IBM CUA keys use C-Ins and S-Ins for copy and paste.

I find M-w and C-y difficult to use and would prefer to use what I'm more comfortable with.b

2
  • 1
    C-h f cua-mode. Although I see that it does not follow the IBM convention you mention...
    – NickD
    Commented May 31 at 8:15
  • You mention "CUA keys", but I think this is confusing people, because you aren't talking about "C-x", "C-c" and "C-v", which are what Emacs's cua-mode makes usable for cut, copy and paste. In your question, you mention "C-<insert>" and "S-<insert>". And in one of your comments, you mention shift-selection. But those things are usable in Emacs by default, with no configuration at all. So maybe you have inadvertently disabled them? Commented Jun 30 at 21:14

1 Answer 1

0

You can bind the desired keys using the bind-key function. In your init file :

(use-package bind-key
    :defer t
    :ensure t
    :bind
    (:map global-map
          (("C-<insert>" . kill-ring-save)
           ("S-<insert>"  . yank)
           )))

For more information :

(describe-function 'use-package)
(describe-function 'bind-key)
4
  • That's perfect, now all I need is to mark text using shift and arrow. I assume I can do that by assigning something to set-mark-command but not sure how.
    – balanga
    Commented May 31 at 12:45
  • Try cua-mode for the shift-selection
    – amitp
    Commented Jun 1 at 15:45
  • Thanks for the pointer but how do I go about tryng cua-mode?
    – balanga
    Commented Jun 1 at 23:12
  • I guess you mean this - gnu.org/software/emacs/manual/html_node/emacs/CUA-Bindings.html
    – balanga
    Commented Jun 1 at 23:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.