emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: jorge.a.alfaro@gmail.com (Jorge A. Alfaro-Murillo)
To: emacs-orgmode@gnu.org
Subject: Re: Alternative to arrow keys (more ergonomic)?
Date: Thu, 12 Jun 2014 11:19:52 -0400	[thread overview]
Message-ID: <87oaxykvdz.fsf@gmail.com> (raw)
In-Reply-To: 8738fa6vag.fsf@gmail.com

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 =)

If someone knows how to remap outside of X please let me know.

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

Best,

Jorge.

  reply	other threads:[~2014-06-12 15:20 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 [this message]
2014-06-12 17:24       ` Thorsten Jolitz
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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87oaxykvdz.fsf@gmail.com \
    --to=jorge.a.alfaro@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).