emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Alternative to arrow keys (more ergonomic)?


From: Jorge A. Alfaro-Murillo
Subject: Re: [O] Alternative to arrow keys (more ergonomic)?
Date: Thu, 12 Jun 2014 11:19:52 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Thorsten Jolitz <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]