Re: NetBSD Localization

2024-02-27 Thread Valery Ushakov
On Mon, Feb 26, 2024 at 11:06:09 -0500, Ivan "Rambius" Ivanov wrote:

> On Sat, Feb 24, 2024 at 9:20 PM Valery Ushakov  wrote:
> >
> > On Sat, Feb 24, 2024 at 13:42:55 +0100, Martin Neitzel wrote:
> >
> > > > I can use setxkbmap in X to change the input language. If I am in text
> > > > mode and not in X how can I switch the input language?
> > >
> > > See wsconsctl(8), in particular the first example there.
> >
> > I guess the question is not about setting the layout, but switching
> > between say latin and cyrillic within one layout.
> 
> This is exactly what I was looking for - switching from latin
> cyrillic. Is it possible to do that outside of X11?

As I said, it doesn't look like there's a locking version of mode
switch.  Obviously, typing the other alphabet while constantly holding
mode switch is not practical :)

I haven't touched this in ages, so my memory is _very_ hazy (serial
consoles ftw!).  It should be relatively trivial to add to wskbd.c a
locking mode switch (like caps lock for caps) along the current
non-locking (like shift for caps).

I think the next stumbling block will be the adding the keysym mappings.

I never was too motiviated to look at this b/c wscons can only do
8-bit encodings (koi8, 8859-5) and with the shift to unicode they are
not very useful in the console.  Also, have I already mentioned serial
consoles? :)

So while the problem of switching to the other group within the same
layout is simple in isolation, it's the other surrounding issues that
conspire to make it a bit of a drag.

-uwe


Re: NetBSD Localization

2024-02-26 Thread Ivan "Rambius" Ivanov
Hello uwe,

On Sat, Feb 24, 2024 at 9:20 PM Valery Ushakov  wrote:
>
> On Sat, Feb 24, 2024 at 13:42:55 +0100, Martin Neitzel wrote:
>
> > > I can use setxkbmap in X to change the input language. If I am in text
> > > mode and not in X how can I switch the input language?
> >
> > See wsconsctl(8), in particular the first example there.
>
> I guess the question is not about setting the layout, but switching
> between say latin and cyrillic within one layout.

This is exactly what I was looking for - switching from latin
cyrillic. Is it possible to do that outside of X11?

Regards
rambius



-- 
Tangra Mega Rock: http://www.radiotangra.com


Re: NetBSD Localization

2024-02-25 Thread adr

On Sun, 25 Feb 2024, Valery Ushakov wrote:


Date: Sun, 25 Feb 2024 05:19:50 +0300
From: Valery Ushakov 
To: netbsd-users@netbsd.org
Subject: Re: NetBSD Localization

On Sat, Feb 24, 2024 at 13:42:55 +0100, Martin Neitzel wrote:


I can use setxkbmap in X to change the input language. If I am in text
mode and not in X how can I switch the input language?


See wsconsctl(8), in particular the first example there.


I guess the question is not about setting the layout, but switching
between say latin and cyrillic within one layout.


Hi, If you don't want to change the keyboard layout then you need
an input system capable of typing the language you are interested
in. And a font with those characters. And a character encoding
compatible with wscons. If I remember correctly mlterm has wscons
support, you could use that with emacs and get unicode support plus
several input systems. Remember to configure a suitable font for
mlterm. I haven't tryed that though, ask for advise in the list.

adr


Re: NetBSD Localization

2024-02-24 Thread Valery Ushakov
On Sat, Feb 24, 2024 at 13:42:55 +0100, Martin Neitzel wrote:

> > I can use setxkbmap in X to change the input language. If I am in text
> > mode and not in X how can I switch the input language?
> 
> See wsconsctl(8), in particular the first example there.

I guess the question is not about setting the layout, but switching
between say latin and cyrillic within one layout.  KS_Mode_switch only
shifts to the last two columns while pressed, there seems to be no way
to toggle it (there's only update_modifier(id, type, 0, MOD_MODESHIFT)
call with "toggle" set to false).

-uwe


Re: NetBSD Localization

2024-02-24 Thread Martin Neitzel
> I can use setxkbmap in X to change the input language. If I am in text
> mode and not in X how can I switch the input language?

See wsconsctl(8), in particular the first example there.


NetBSD's apropos(1) command is full-text and phrase-based and can
help you to find the proper commands/man-pages yourself.

In this case,

apropos -1 -8 -5 -7 keyboard layout

works pretty nicely.  "man -k ..." does just the same kind of search.
The result order is based on "relevance" of the search words as a phrase
in the man-page.  Be imaginative about the search words.

apropos -1 -8 -5 -7 input language

would direct you to NLS(7), describing the POSIX "locale" system.

Because apropos(1) standard search/result ouput is often voluminous,
I usually prefer "apropos -l" legacy searches.  These just cover the
one-line "NAME" entry of any man-page, such as

NAME
   ls – list directory contents

The phrases here, just single search words.  Results in this case:

% apropos -l -1 -8 -5 -7 keyboard
x68k/loadkmap(1) - load and set the x68k console keyboard map

% apropos -l -1 -8 -5 -7 console
wscons.conf(5) - workstation console config file
i386/console(4) - i386 console interface
amiga/console(4) - amiga console interface
iteconfig(8) - modify console attributes at run time
x86/boot_console(8) - selection of a console device in the x86 bootloader
x68k/loadkmap(1) - load and set the x68k console keyboard map
x68k/loadfont(1) - load and set font for the NetBSD /x68k console

That is, no reference to wsconsctl(1) here, a misleading entry for
iteconfig(8) (Amiga/Atari only), but the wscons.conf(5) is a proper
hit here.

Martin Neitzel