* Re: X keyboard settings (was keyboard macro)
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
` (5 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: Yuri Khan @ 2013-10-22 4:11 UTC (permalink / raw)
To: Rustom Mody; +Cc: help-gnu-emacs@gnu.org
On Tue, Oct 22, 2013 at 10:48 AM, Rustom Mody <rustompmody@gmail.com> wrote:
> On Monday, October 21, 2013 11:47:30 PM UTC+5:30, Yuri Khan wrote:
>> 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?
As far as I understand, xmodmap and setxkbmap are equivalent in power.
They both are ways to feed your settings to the XKB extension, just
use different input formats.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: X keyboard settings (was keyboard macro)
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
` (4 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: Joost Kremers @ 2013-10-22 5:58 UTC (permalink / raw)
To: help-gnu-emacs
Rustom Mody wrote:
> 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.
Most desktop environments and window managers provide some graphical
front end to set up xkb options. Makes the whole thing a point-and-click
fest. :-)
> Can setxkbmap replace xmodmap?
AFAIK the two do basically the same thing, the difference being that
xmodmap reads a script while setxkbmap takes command line arguments.
--
Joost Kremers joostkremers@fastmail.fm
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: X keyboard settings (was keyboard macro)
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
` (3 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: Jürgen Sauermann @ 2013-10-22 11:59 UTC (permalink / raw)
To: help-gnu-emacs
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,
I have seen this segfault with setxkbmap happening when the keycodes are
do not fit in one byte (which is the case for all Unicode APL characters).
⍝ Jürgen
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: X keyboard settings (was keyboard macro)
2013-10-22 3:48 ` X keyboard settings (was keyboard macro) Rustom Mody
` (2 preceding siblings ...)
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>
` (2 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: Stefan Monnier @ 2013-10-22 13:02 UTC (permalink / raw)
To: help-gnu-emacs
> 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?
Note that while I agree with Yuri (it's generally better to use an
OS-wide keyboard setting that gives you the same key-strokes in all
applications), in the case of apl-mode, you probably want to use
a different keyboard setting. So for apl-mode, it makes a lot of sense
to use an Emacs input method rather than an X11 input method.
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <mailman.4532.1382529319.10748.help-gnu-emacs@gnu.org>]
* Re: X keyboard settings (was keyboard macro)
[not found] ` <mailman.4532.1382529319.10748.help-gnu-emacs@gnu.org>
@ 2013-10-24 1:02 ` Rustom Mody
0 siblings, 0 replies; 13+ messages in thread
From: Rustom Mody @ 2013-10-24 1:02 UTC (permalink / raw)
To: help-gnu-emacs
On Tuesday, October 22, 2013 5:29:45 PM UTC+5:30, Jürgen Sauermann wrote:
> I have seen this segfault with setxkbmap happening when the keycodes are
> do not fit in one byte (which is the case for all Unicode APL characters).
>
> ⍝ Jürgen
Great to see the author of gnu apl out here!
My question is really quite simple and someone familiar with xmodmap (or moral equivalents) should be able to solve it very easily:
1. X seems to have 8 modifiers which are mappable
2. Most keyboards have a large number of keys used typically as modifiers
eg AltGr (right alt) right-win; also 'menu' which can be used as a dead key
[Yeah this is not very portable as the laptop on which I am writing this does not have the usual scroll lock and numlock etc. I dont think portability of keyboard usage is the issue right now.
3. I believe though not sure that emacs has the capability to deal with 'hyper' 'super' etc.
So its only a question of taking one of these unused modifer keysyms and doing some xmodmap or setxkbmap magic to send these.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: X keyboard settings (was keyboard macro)
2013-10-22 3:48 ` X keyboard settings (was keyboard macro) Rustom Mody
` (4 preceding siblings ...)
[not found] ` <mailman.4532.1382529319.10748.help-gnu-emacs@gnu.org>
@ 2013-10-24 12:35 ` Jürgen Sauermann
[not found] ` <mailman.4607.1382618163.10748.help-gnu-emacs@gnu.org>
6 siblings, 0 replies; 13+ messages in thread
From: Jürgen Sauermann @ 2013-10-24 12:35 UTC (permalink / raw)
To: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <mailman.4607.1382618163.10748.help-gnu-emacs@gnu.org>]