LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-14-2012, 06:38 PM   #1
1337snake
LQ Newbie
 
Registered: Dec 2012
Distribution: Funtoo
Posts: 5

Rep: Reputation: Disabled
Bind hotkey to character in Emacs?


I would like to set C-/ to \ in GNU Emacs. Is there anyway to do this, and if so, how?
Using Kubuntu by the way.
 
Old 12-15-2012, 08:29 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
In your ~/.emacs file you can add definitions. Usually you only want to add a new definition in a specific mode, but you can do it in the global map if you want.

Code:
(global-set-key  [?\C-/] "\\")
 
Old 12-15-2012, 11:05 AM   #3
1337snake
LQ Newbie
 
Registered: Dec 2012
Distribution: Funtoo
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by smallpond View Post
In your ~/.emacs file you can add definitions. Usually you only want to add a new definition in a specific mode, but you can do it in the global map if you want.

Code:
(global-set-key  [?\C-/] "\\")
Thanks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing a file character by character with a bash builtin command (script). stf92 Linux - Newbie 4 06-30-2012 08:41 PM
How can I get emacs -nw when I call emacs from a terminal but GUI emacs elsewhere? Blackened Justice Linux - Newbie 4 09-08-2011 07:57 AM
javascript have hotkey activate function but not print character secretlydead Programming 0 11-11-2010 11:44 AM
Bind/map Character to alt+[some key]? paul_l Linux - Newbie 2 12-23-2009 07:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration