mirror of
https://github.com/systemd/systemd.git
synced 2024-11-06 08:26:52 +03:00
vconsole-setup: don't set the kbd mode to unicode if is is currently in raw/off mode
Let's not confuse X11
This commit is contained in:
parent
c65eb83653
commit
a25d4d0e3c
@ -68,9 +68,22 @@ static int disable_utf8(int fd) {
|
|||||||
|
|
||||||
static int enable_utf8(int fd) {
|
static int enable_utf8(int fd) {
|
||||||
int r = 0, k;
|
int r = 0, k;
|
||||||
|
long current = 0;
|
||||||
|
|
||||||
|
if (ioctl(fd, KDGKBMODE, ¤t) < 0 || current == K_XLATE) {
|
||||||
|
/*
|
||||||
|
* Change the current keyboard to unicode, unless it
|
||||||
|
* is currently in raw or off mode anyway. We
|
||||||
|
* shouldn't interfere with X11's processing of the
|
||||||
|
* key events.
|
||||||
|
*
|
||||||
|
* http://lists.freedesktop.org/archives/systemd-devel/2013-February/008573.html
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
if (ioctl(fd, KDSKBMODE, K_UNICODE) < 0)
|
if (ioctl(fd, KDSKBMODE, K_UNICODE) < 0)
|
||||||
r = -errno;
|
r = -errno;
|
||||||
|
}
|
||||||
|
|
||||||
if (loop_write(fd, "\033%G", 3, false) < 0)
|
if (loop_write(fd, "\033%G", 3, false) < 0)
|
||||||
r = -errno;
|
r = -errno;
|
||||||
|
Loading…
Reference in New Issue
Block a user