From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: Alternative to arrow keys (more ergonomic)? Date: Thu, 12 Jun 2014 19:24:33 +0200 Message-ID: <87oaxy59da.fsf@gmail.com> References: <87y4x2kx5g.fsf@gmail.com> <8738fa6vag.fsf@gmail.com> <87oaxykvdz.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wv8kF-0000Fc-Qd for emacs-orgmode@gnu.org; Thu, 12 Jun 2014 13:25:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wv8k5-0002fK-Dq for emacs-orgmode@gnu.org; Thu, 12 Jun 2014 13:24:59 -0400 Received: from plane.gmane.org ([80.91.229.3]:41176) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wv8k5-0002ea-6j for emacs-orgmode@gnu.org; Thu, 12 Jun 2014 13:24:49 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Wv8k3-0001FS-Vb for emacs-orgmode@gnu.org; Thu, 12 Jun 2014 19:24:47 +0200 Received: from e178191110.adsl.alicedsl.de ([85.178.191.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 Jun 2014 19:24:47 +0200 Received: from tjolitz by e178191110.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 Jun 2014 19:24:47 +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 jorge.a.alfaro@gmail.com (Jorge A. Alfaro-Murillo) writes: > Thorsten Jolitz writes: > >> Just out of curiosity - did you try this on the console (without X) too? > > Xmodmap does not work without X, at least I suppose that is what the X > stands for =) I know, thats why I asked. > If someone knows how to remap outside of X please let me know. In Archlinux, I copied console keymap ,--------------------- | de-latin1-nodeadkeys `--------------------- adapted it to my emacs needs, saved it and put ,---------------------------------- | KEYMAP=de-latin1-nodeadkeys-emacs `---------------------------------- in my /etc/vconsole.conf. It looks somehow like this: ,-------------------------------------------------------------------------------------- | # de-latin1-nodeadkeys-emacs.map: German keymap with special keybindings for Emacs | | include "de-latin1.map" | | # control keycode 7 = Control_asciicircum | keycode 13 = apostrophe grave | keycode 27 = plus asterisk asciitilde | # keycode 41 = asciicircum degree | | # corresponding keys in de-latin1.map: | # keycode 13 = dead_acute dead_grave | # keycode 27 = plus asterisk dead_tilde | # keycode 41 = dead_circumflex degree | | # unterste Zeile: | keycode 29 = AltGr AltGr AltGr AltGr | [...] | etc etc `-------------------------------------------------------------------------------------- Would be interesting if (and how) it works to actually define and use a hyper-key on the console, because even the standard modifiers like C-, M- and don't always work, especially when combined (see 'org on a tty' in the manual) or in combination with S-. > Since I use emacs not in X in my phone, my workaround is to create a > hyper key in another place (F6 is a good place for the keyboard of > JuiceSSH in Android). It is not really a modifier, so to press 'H-j', > you actually do 'F6 j', that is 'F6' followed by 'j', but I guess that > is as good as you can get with a keyboard onscreen without installing a > super tiny keyboard (e.g. Hacker's Keyboard). > > #+BEGIN_SRC emacs-lisp > (defun hyperify (prompt) > (let ((e (read-event))) > (vector (if (numberp e) > (logior (lsh 1 24) e) > (if (memq 'hyper (event-modifiers e)) > e > (add-event-modifier "H-" e)))))) > > (defun add-event-modifier (string e) > (let ((symbol (if (symbolp e) e (car e)))) > (setq symbol (intern (concat string > (symbol-name symbol)))) > (if (symbolp e) > symbol > (cons symbol (cdr e))))) > > (define-key key-translation-map (kbd "") 'hyperify) > #+END_SRC sounds interesting ... -- cheers, Thorsten