lua-users home
lua-l archive

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


2017-05-02 0:38 GMT+02:00 Jonathan Goble <jcgoble3@gmail.com>:
> On Mon, May 1, 2017 at 6:30 PM Erik Hougaard <erik@hougaard.com> wrote:
>>
>> On 01-May-17 3:18 PM, Jonathan Goble wrote:
>> >
>> > AltGr? (Looks down at his US keyboard)
>> >
>> > This is my keyboard: http://imgur.com/a/gmCAg I have two Alt keys and
>> > no AltGr key.
>>
>> Alt+Ctrl should give same result.
>>
>> /Erik
>
>
> Exactly how? It does nothing for me except trigger menu shortcuts in some
> programs. I'm confused. Is some sort of configuration required? I'm using
> Ubuntu 17.04.

Excellent. We're on the same wavelength.

<apology> We're off-topic, but it's sort of essential if you actually need
the power of UTF-8 regularly [1], and 99% of non-foreign computer users
don't know this stuff. I only know it because my home language needs
all of áäêëéèïîòóöôüûú. </apology>

Every physical key has a keycap which you can see but your computer
can't. All that the computer knows is what key has been pressed or
released. Your two Alt keys may have identical keycaps but your
computer knows they are different because they send different keycodes.

Each keycode (physical key) is associated with a keysym (what the system
thinks is on the keycap) and a function name (what you would like the key
to do). [2] It's a little like the White Knight's song in "Alice in Wonderland",
making nice distinctions in several steps from "the name of the song is
called" right down to "the song is".

When you installed the system, you were asked what keyboard you
have. You may even have been asked to press the key marked 'Y'.
That determined the keycode-keysym association. But you can easily
change that even now [3].

There probably [4] is a tiny white box near the date on your screen
that says "En" for "English". Click on that and experiment. Look for
"Input". You should be able to add several other keyboards. That
box will then allow you to switch between them right in the middle
of typing something.

Similar things happen on other systems too.

[1] I.e. you don't want to open a character map pop-up, remember
which is Alt-137, or enter the symbol out in hex, all the time.

[2] To know what is currently in effect, from a terminal start a nifty
little utility called "xev". A white box will appear. Now move your
mouse in there. The terminal will go mad with so many mouse
movements to report, so let go of the mouse while you press a few
keys. There will be KeyPress and KeyRelease events, and somewhere
in the middle of each, it reports how the computer currently treats the
key. On mine, for Alt and AltGr it says respectively:
 keycode 64 (keysym 0xfe03, ISO_Level3_Shift)
 keycode 108 (keysym 0xff20, Multi_key)

[3] You can also do it the hard way with a tricky utility called 'xmodmap'.

[4] I'm on 16.04 (I hop from LTS to LTS) so I can only presume
things have not changed too much.