all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jürgen Sauermann" <juergen.sauermann@t-online.de>
To: help-gnu-emacs@gnu.org
Subject: Re: X keyboard settings (was keyboard macro)
Date: Thu, 24 Oct 2013 12:35:23 +0000 (UTC)	[thread overview]
Message-ID: <loom.20131024T135816-316@post.gmane.org> (raw)
In-Reply-To: 86036a8c-1428-4f8c-9ee8-f7fd811e2c12@googlegroups.com

Rustom Mody <rustompmody <at> gmail.com> writes:

> 
> On Monday, October 21, 2013 11:47:30 PM UTC+5:30, Yuri Khan wrote:
> > On Mon, Oct 21, 2013 at 11:35 PM, Christof Spitz  wrote:
> > 
> > > I have to write special characters for transliteration of a non-european
> > > language (devanagari) in Emacs. 
> 
> > It never ceases to amaze me how far people are willing to go just to
> > avoid using an appropriate OS-level keyboard layout. In your case,
> > probably, the command “setxkbmap -layout "us,in" -variant ",deva"
> > -options "grp:caps_toggle,grp_led:caps"” will help a lot.
> 
> Hey its great to hear of this!
> Ive been trying to put together something for the new gnu apl that has
just been released.
> The author gives an xmodmap that works for apl but makes emacs close to
unusable -- Alt-x becomes an Apl char. 
> However all my attempts at wrapping my head round xmodmap have failed so far.
> Can setxkbmap replace xmodmap?
> 
> So far I found xkeycaps which seems to be such a replacement. When I use
it and try to save the map it segfaults 
> 
> 

Hi,

given Yuri's equivalence of xmodmap and setxkbdmap, and the segfault on
setxkbdmap, the way to go seems to be xmodmap.

xmodmap is actually fairly simple. Every key on your keyboard sends
a keycode between 1 and 255. You can use the program xev to show the
keycodes sent by the different keys.

For each keycode there is a line in the file given to xmodmap that
starts with "keycode = " followed by the keycode in question.

After the keycode come 0 to 8 values that are sent; which one is
determined by the state of the "modifier Keys", typically Shift,
Ctrl, and Alt. If no value is given for a particular state then nothing
is sent (i believe).

If you interpret the values as an 8x255 matrix then the first column is
the number (Unicode if the encoding is set to unicode) sent for each
key without modifier, the second column is the number sent when SHIFT
is down, third column when alt is down, fourth column when SHIFT and ALT
are down. I believe that columns 5 to 8 are the numbers like for 1 to 4
when the CTRL key is also down (have not tried that, though).

In this context, SHIFT, ALT, and CTRL means those keys that you have
decided (in the xmodmap file) to be SHIFT, ALT, and CTRL.

Now suppose you want to move all APL keys from the the ALT plane to the
CTRL plane. There are basically two different ways:

1. You exchange the ALT and CTRL keys in the xmodmap file,
   leaving all other keys intact, or

2. You insert some more columns (by writing NoSymbol entries)
   before the APL chars thius moving them from the ALT plane
   (column) to the CTRL plane.

If emacs uses xmodmap (I dont know that) then method 1. moves the
ALT keys used by emacs to the CTRL plane (which is probably not what
you want); in theat case you are better off moving only those "APL keys"
that conflict with emacs to either SHIFT+ALT or CTRL or whatever.

If emacs uses the keycodes directly (bypassing the xmodmap settings) then
method 1 is less work to do.


⍝ Jürgen










  parent reply	other threads:[~2013-10-24 12:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-21 16:35 keyboard macro Christof Spitz
2013-10-21 17:26 ` Stefan Monnier
     [not found] ` <mailman.4410.1382376390.10748.help-gnu-emacs@gnu.org>
2013-10-21 17:39   ` Rustom Mody
2013-10-21 18:17 ` Yuri Khan
2013-10-21 18:25   ` Yuri Khan
     [not found] ` <mailman.4414.1382379457.10748.help-gnu-emacs@gnu.org>
2013-10-22  3:48   ` X keyboard settings (was keyboard macro) Rustom Mody
2013-10-22  4:11     ` Yuri Khan
2013-10-22  5:58     ` Joost Kremers
2013-10-22 11:59     ` Jürgen Sauermann
2013-10-22 13:02     ` Stefan Monnier
     [not found]     ` <mailman.4532.1382529319.10748.help-gnu-emacs@gnu.org>
2013-10-24  1:02       ` Rustom Mody
2013-10-24 12:35     ` Jürgen Sauermann [this message]
     [not found]     ` <mailman.4607.1382618163.10748.help-gnu-emacs@gnu.org>
2013-10-24 17:36       ` Rustom Mody

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=loom.20131024T135816-316@post.gmane.org \
    --to=juergen.sauermann@t-online.de \
    --cc=help-gnu-emacs@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.