unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* read-char doesn't use input-decode-map
@ 2009-12-30 17:44 Rob Giardina
  2009-12-30 18:34 ` Stefan Monnier
  0 siblings, 1 reply; 7+ messages in thread
From: Rob Giardina @ 2009-12-30 17:44 UTC (permalink / raw)
  To: emacs-devel

Hi,

I've noticed that read-char doesn't use input-decode-map. I'm
doing some fun things with input-decode-map (code attached) to
convert all the right-side keys to the left using a super prefix
on OSX (allows one hand kdb, one hand mouse). It works nicely in
most cases except for the read-char family of functions. Is this
a bug or the expected behavior?

Thanks,
Rob

;;crazy experiment to mirror right characters onto left hand
(let ((from   "`12345qwertasdfgzxcvb~!@#$%QWERTASDFGZXCVB")
      (to     "-09876poiuy:lkjh/.,mn_)(*&^POIUY;LKJH/<>MN")
      (from-v (vconcat ["right" "left"] (mapcar 'char-to-string from)))
      (to-v   (vconcat [" "     " "]    (mapcar 'char-to-string to))))
  (map 'list
       #'(lambda(k to)
           (let* ((base-k (list 'super (intern k)))
                  (base-to (list (intern to))))
             (mapc
              #'(lambda(pre)
                  (define-key input-decode-map
                    (vector (append pre base-k))
                    (vector (append pre base-to))))
              '(() (control) (meta) (control meta)))))
       from-v
       to-v)






^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-01-04  2:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-30 17:44 read-char doesn't use input-decode-map Rob Giardina
2009-12-30 18:34 ` Stefan Monnier
2009-12-30 19:56   ` Rob Giardina
2009-12-31  2:51     ` Stefan Monnier
2010-01-03  1:59       ` Lennart Borgman
2010-01-04  2:18         ` Stefan Monnier
2010-01-04  2:31           ` Lennart Borgman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).