Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:alarrosa:branches:Base:System
console-setup
0001-Translate-ISO_Left_Tab-to-Meta_Tab.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Translate-ISO_Left_Tab-to-Meta_Tab.patch of Package console-setup
From 564f2dfbe9661df5094a0107568878d405fc2fae Mon Sep 17 00:00:00 2001 From: Antonio Larrosa <antonio.larrosa@gmail.com> Date: Tue, 22 Jan 2019 18:06:28 +0100 Subject: [PATCH] Translate ISO_Left_Tab to Meta_Tab Short description: ISO_Left_Tab shouldn't be translated to Tab (just like regular Tab) otherwise there's no way to differentiate between Tab and Shift-Tab on text mode. This commit changes ckbcomp to translate ISO_Left_Tab to Meta_Tab. Long description: Currently, in most Linux distribution, most keyboard layouts in text mode assign the Tab and Shift-Tab key presses the same code. This can be checked by pressing ctrl-alt-f1, logging in and running: "showkey -a" Pressing Tab and Shift-Tab generate the same code (0x09), so for example, when Yast runs with ncurses, Tab moves the focus to the next focusable item, but Shift-Tab can't be used as it behaves just like Tab and there's no way applications can differentiate both. Changing the keyboard layout with "loadkeys es", "loadkeys de" or "loadkeys fr" doesn't help. I investigated this and found that ckbcomp was translating the ISO_Left_Tab symbol to Tab just like it does with Tab, which doesn't make sense since Shift-Tab should produce a "Left Tab" (in many keyboards it's even printed in the Tab key over the regular Right-Tab drawing). Looking at how the keyboard layouts were defined before xkb layouts were parsed, I noticed legacy layouts were defined like: keycode 15 = Tab shift keycode 15 = Meta_Tab So ISO_Left_Tab is now translated to Meta_Tab to fix this and let it generate the same code it did in the past. Now "showkey -a" shows the (0x09) code for Tab and (0x1b 0x09) for Shift-Tab which can be recognized by text applications as different and automatically fixes Yast. In SUSE/openSUSE distributions, after applying this change and rebuilding the kbd package with the generated console-setup (which regenerates the kbd keymaps with the fixed ckbcomp script) fixes this. I guess other distributions would also need to rebuild kbd after applying this patch. --- Keyboard/ckbcomp | 2 +- Keyboard/compose_translator | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Keyboard/ckbcomp b/Keyboard/ckbcomp index b0df606..47ec922 100755 --- a/Keyboard/ckbcomp +++ b/Keyboard/ckbcomp @@ -2581,7 +2581,7 @@ if ($freebsd) { 'any' => 'NoSymbol', # Is this recognised by X ? 'VoidSymbol' => 'VoidSymbol', 'voidsymbol' => 'VoidSymbol', # Is this recognised by X ? - 'ISO_Left_Tab' => 'Tab', + 'ISO_Left_Tab' => 'Meta_Tab', 'Clear' => 'VoidSymbol', 'Pause' => 'Pause', 'Scroll_Lock' => 'Scroll_Lock', diff --git a/Keyboard/compose_translator b/Keyboard/compose_translator index d478def..3af492f 100755 --- a/Keyboard/compose_translator +++ b/Keyboard/compose_translator @@ -1827,7 +1827,7 @@ my %xkbsym_table = ( 'any' => 'NoSymbol', # Is this recognised by X ? 'VoidSymbol' => 'VoidSymbol', 'voidsymbol' => 'VoidSymbol', # Is this recognised by X ? - 'ISO_Left_Tab' => 'Tab', + 'ISO_Left_Tab' => 'Meta_Tab', 'Clear' => 'VoidSymbol', 'Pause' => 'Pause', 'Scroll_Lock' => 'Scroll_Lock', -- 2.20.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor