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

Re: x : keyboard not working



On Sat 07 Oct 2017 at 22:14:41 (+1100), Zenaan Harkness wrote:
> On Fri, Oct 06, 2017 at 08:37:16PM -0500, David Wright wrote:
> > On Fri 06 Oct 2017 at 23:54:36 (+0100), Brian wrote:
> > > On Sat 07 Oct 2017 at 09:24:01 +1100, Zenaan Harkness wrote:
> > > 
> > > > On Fri, Oct 06, 2017 at 11:11:52PM +0100, Brian wrote:
> > > > > On Sat 07 Oct 2017 at 08:30:09 +1100, Zenaan Harkness wrote:
> > > > > 
> > > > > > On Fri, Oct 06, 2017 at 08:37:44PM +0100, Brian wrote:
> > > > > > > On Fri 06 Oct 2017 at 21:19:28 +0530, Mayuresh Kathe wrote:
> > > > > > > 
> > > > > > > > for that matter, even "ctrl+alt+backspace" doesn't work to shutdown the
> > > > > > > > x server. :(
> > > > > > > 
> > > > > > > This disappeared from xorg many, many years ago. But it can be re-enabled
> > > > > > > in Debian. An XKBOPTIONS options is what you look for if you really want
> > > > > > > it.
> > > > > > 
> > > > > > I edit /etc/default/keyboard to read as follows (also, lv3 level 3
> > > > > > (& 4) shift rocks!):
> > > > > > 
> > > > > > XKBMODEL="microsoft4000"
> > > > > > XKBLAYOUT="libsh"
> > > > > > XKBVARIANT="basic"
> > > > > > XKBOPTIONS="lv3:lwin_switch,terminate:ctrl_alt_bksp"
> > > > > > BACKSPACE="guess"
> > > > > 
> > > > > A neat, simple edit of a basic file. But, by itself, insufficient to
> > > > > resurrect ctrl+alt+backspace.
> > > > 
> > > > Oh¡ Well that's good to know. I must have the required change (I'm
> > > > guessing your xorg.conf.d suggestion) somewhere else in that case,
> > 
> > That's possible, but unlikely because you seem to be aware that
> > /etc/default/keyboard is the best location to set these parameters.
> > Let's hope the OP, a VC user, picks up on this.
> 
> Yes I too like to have console work as well as x/gui terms (which I
> mostly live in TBH).
> 
> I've now done this over a dozen times in the last month, and
> consistently, this works, to get the extra symbols I'm after - and
> yes, the Ctrl-Alt-Bksp to terminate X, but, running this afterwards:
> 
>   sudo dpkg-reconfigure xkb-data keyboard-configuration
> 
> Perhaps this is the bit that some folks might have missed...
> 
> And finally, from a straight Linux console, I also run this:
> 
>   sudo setupcon
> 
> Voi la.

My own experience is that for immediate effect of changes in
/etc/default/keyboard, ctrl_alt_bksp needs you to type

# udevadm trigger --subsystem-match=input --action=change

but for the other options, like caps:none and all that gumph
in /usr/share/X11/xkb/rules/xorg.lst,

# setupcon [-k]

will do the trick. However, neither is necessary after a reboot.

> Now the funky bit is the line you see above in my
> /etc/default/keyboard as follows:
> 
>   XKBLAYOUT="libsh"
> 
> which means “use custom keyboard layout file named as follows:
>   /usr/share/X11/xkb/symbols/libsh
> ”
> 
> which file is a file I created by copying
> /usr/share/X11/xkb/symbols/us
> 
> and modifying to taste - taste some juicy Unicode characters not
> otherwise readily accessible, like love hearts ♥ for example :)

I avoid having to copy those files by appending my changes to
/etc/console-setup/remap.inc and then running
dpkg-reconfigure keyboard-configuration.
But I'm not making major changes like you, just some modifications
to make the VCs behave like X, and eliminating the annoyance when
you catch your finger or thumb on Alt as you hit the space bar.

# Ctrl-arrow keys need to send the same codes as in X/xterm.
Control keycode 105 = F51
string F51 = "\033[1;5D"
Control keycode 106 = F52
string F52 = "\033[1;5C"
Control keycode 108 = F53
string F53 = "\033[1;5B"
Control keycode 103 = F54
string F54 = "\033[1;5A"

# Alt-space may as well produce a space rather than
# nul Meta_nul or Meta_space
alt keycode 57 = F41
string F41 = " "

Most of the other changes I make are actually additions to
the   Ctrl-X 8   mechanism in emacs, like  ^X 8 ~ q   for ♪
and so on, just the ones I need; and I don't usually need
those sorts of chars on the command line, only when editing.

Cheers,
David.


Reply to: