0

How do I rebind

1 as 4 and 4 as 6 without 1 becoming 6?

lost
  • 81
  • 1
  • 2
  • 8
  • What did you try so far ? And what do you want to do ? – Ehvince Sep 26 '14 at 12:02
  • Can you give us a working example that exhibits the undesired behavior? In Emacs you bind keys to functions, *not* to other keys, so the 'transitive' binding that make `noremap` necessary in Vimscript doesn't exist. – Gordon Gustafson Sep 27 '14 at 16:49

1 Answers1

0

Your question isn't clear at all. What do you want to achieve ?

If you want to insert "4" when you press 1:

(global-set-key (kbd "1") (lambda () (interactive) (insert "4")))
(global-set-key (kbd "4") (lambda () (interactive) (insert "6")))
Ehvince
  • 17,274
  • 7
  • 58
  • 79