From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Alternative to arrow keys (more ergonomic)?
Date: Thu, 12 Jun 2014 19:24:33 +0200 [thread overview]
Message-ID: <87oaxy59da.fsf@gmail.com> (raw)
In-Reply-To: 87oaxykvdz.fsf@gmail.com
jorge.a.alfaro@gmail.com (Jorge A. Alfaro-Murillo) writes:
> Thorsten Jolitz <tjolitz@gmail.com> 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 "<f6>") 'hyperify)
> #+END_SRC
sounds interesting ...
--
cheers,
Thorsten
next prev parent reply other threads:[~2014-06-12 17:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-12 14:00 Alternative to arrow keys (more ergonomic)? Martin Beck
2014-06-12 14:41 ` Jorge A. Alfaro-Murillo
2014-06-12 14:45 ` Thorsten Jolitz
2014-06-12 15:19 ` Jorge A. Alfaro-Murillo
2014-06-12 17:24 ` Thorsten Jolitz [this message]
2014-06-13 7:18 ` Martin Beck
2014-06-13 7:33 ` Martin Beck
2014-06-13 14:24 ` Jorge A. Alfaro-Murillo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87oaxy59da.fsf@gmail.com \
--to=tjolitz@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.