Hacker News new | past | comments | ask | show | jobs | submit login

Bingo. Thanks.

This should do what the original commenter wanted:

    (defun insert-keybinding (k)
      "Insert code for a keybinding."
      (interactive "kKey sequence: ")
      (insert (concat "(global-set-key (kbd \""
    		  (key-description k)
    		  "\") 'function-name)")))



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: