From mboxrd@z Thu Jan 1 00:00:00 1970 From: jorge.a.alfaro@gmail.com (Jorge A. Alfaro-Murillo) Subject: Re: Alternative to arrow keys (more ergonomic)? Date: Fri, 13 Jun 2014 10:24:15 -0400 Message-ID: <87d2eckhv4.fsf@gmail.com> References: <87y4x2kx5g.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WvSPJ-0003qE-KE for emacs-orgmode@gnu.org; Fri, 13 Jun 2014 10:24:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WvSPD-0000jl-5K for emacs-orgmode@gnu.org; Fri, 13 Jun 2014 10:24:41 -0400 Received: from plane.gmane.org ([80.91.229.3]:44979) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WvSPC-0000jg-Uv for emacs-orgmode@gnu.org; Fri, 13 Jun 2014 10:24:35 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WvSP4-0003DM-6u for emacs-orgmode@gnu.org; Fri, 13 Jun 2014 16:24:26 +0200 Received: from nat-130-132-173-153.central.yale.edu ([130.132.173.153]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 13 Jun 2014 16:24:26 +0200 Received: from jorge.a.alfaro by nat-130-132-173-153.central.yale.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 13 Jun 2014 16:24:26 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Martin Beck writes: >> Sorry, if it may be obvious, but how do I remap CapsLock to H >> (Hyper)? >> > > p.s. I tried ;; remap CapsLock Key to Hyper Key ;;source: > http://ergoemacs.org/emacs/emacs_hyper_super_keys.html , > http://emacs-fu.blogspot.de/2008/12/remapping-caps-lock.html (setq > w32-enable-caps-lock nil) (global-set-key [capslock] 'hyper) Dear Martin, I think you should try to do that outside of emacs, in the configuration of your system. I use Linux so I only have an answer for that. I think the easiest way is to create a configuration file for xmodmap, the common location and name is "~/.Xmodmap". My file looks like this: #+BEGIN_EXAMPLE clear control clear lock clear mod1 clear mod3 clear mod4 keycode 66 = Hyper_L keycode 37 = Super_L keycode 133 = Alt_L Meta_L keycode 64 = Control_L keycode 108 = Control_R keycode 135 = Alt_R Meta_R keycode 105 = Menu add mod1 = Alt_R Alt_L Meta_R Meta_L add mod3 = Hyper_L add mod4 = Super_L add control = Control_R Control_L #+END_EXAMPLE In this case I have Hyper where the CapsLock key is, and the final row which in the keyboard is: "Control Super Alt Space Alt MenuKey Control" gets mapped to: "Super Alt/Meta Control Space Control Alt/Meta MenuKey" (which drives anyone that tries my computer nuts, but it is very comfortable for emacs.) The keycodes with numbers in the example are the positions of the keys in my keyboard. This is different depending on your keyboard, so you have to figure out yours. For that, use the program xev (in a terminal type xev) and press the keys that you are interested to map. Between many information it will give you the keycode for each key you press. Once you finish with the .Xmodmap file, you can load the configuration by typing in a terminal 'xmodmap .Xmodmap' (without the single quotes). If you are using GDM, XDM or KDM, in particular under Gnome or KDE, the .Xmodmap file is loaded automatically every time you start a session. If you are not using any of those, you can modify the file ~/.xinitrc (or ~/.config/openbox/autostart in Openbox): #+BEGIN_EXAMPLE if [ -s ~/.Xmodmap ]; then xmodmap ~/.Xmodmap fi #+END_EXAMPLE I hope it helps. Best, Jorge PS: For linux check also XKB.