Skip to content

Commit

Permalink
xkeyboard-config-chromebook remove altgr+arrow mapping and bump pkgrel
Browse files Browse the repository at this point in the history
  • Loading branch information
dhead666 committed Jan 23, 2015
1 parent 217d004 commit 99ac930
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 24 deletions.
@@ -1,16 +1,15 @@
From 20d0335269fe80c47952b740f6c28144b257e98f Mon Sep 17 00:00:00 2001
From dcdb4f5f02a868a113b8b715f68aca79fb0c4bcf Mon Sep 17 00:00:00 2001
From: dhead666 <myfoolishgames@gmail.com>
Date: Fri, 5 Dec 2014 17:07:07 +0200
Subject: [PATCH 3/6] [chromebook] set altgr+arrows and alt+shift+arrows as
pgup,pgdown,home,end
Subject: [PATCH 3/6] [chromebook] set alt+shift+arrows as pgup,pgdown,home,end

---
symbols/pc | 20 ++++++++++++++++----
types/basic | 9 +++++++++
2 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/symbols/pc b/symbols/pc
index 9a2ad57..77e4928 100644
index 9a2ad57..7f7d3eb 100644
--- a/symbols/pc
+++ b/symbols/pc
@@ -80,8 +80,20 @@ xkb_symbols "editing" {
Expand All @@ -23,23 +22,23 @@ index 9a2ad57..77e4928 100644
- key <RGHT> { [ Right ] };
+ key <UP> {
+ type= "CHROMEBOOK",
+ [ Up, Up, Prior, Prior ]
+ [ Up, Up, Prior, Up ]
+ };
+ key <LEFT> {
+ type= "CHROMEBOOK",
+ [ Left, Left, Home, Home ]
+ [ Left, Left, Home, Left ]
+ };
+ key <DOWN> {
+ type= "CHROMEBOOK",
+ [ Down, Down, Next, Next ]
+ [ Down, Down, Next, Down ]
+ };
+ key <RGHT> {
+ type= "CHROMEBOOK",
+ [ Right, Right, End, End ]
+ [ Right, Right, End, Right ]
+ };
};
diff --git a/types/basic b/types/basic
index fff06be..f993e30 100644
index fff06be..0a27ef9 100644
--- a/types/basic
+++ b/types/basic
@@ -5,6 +5,7 @@ default xkb_types "basic" {
Expand All @@ -57,13 +56,13 @@ index fff06be..f993e30 100644
+ type "CHROMEBOOK" {
+ modifiers = Shift+Alt;
+ map[Shift] = Level2;
+ map[Alt+Shift] = Level4;
+ map[Alt+Shift] = Level3;
+ level_name[Level1] = "Base";
+ level_name[Level2] = "Caps";
+ level_name[Level4] = "ShiftAlt";
+ level_name[Level3] = "ShiftAlt";
+ };

};
--
2.1.3
2.2.2

16 changes: 8 additions & 8 deletions xkeyboard-config-chromebook/PKGBUILD
Expand Up @@ -6,7 +6,7 @@
pkgname=xkeyboard-config-chromebook
_pkgname=xkeyboard-config
pkgver=2.13
pkgrel=6
pkgrel=7
pkgdesc="X keyboard configuration files"
arch=(any)
license=('custom')
Expand All @@ -19,7 +19,7 @@ source=(http://xorg.freedesktop.org/archive/individual/data/${_pkgname}/${_pkgna
xkeyboard-config-chromebook.install
0001-chromebook-add-function-keys.patch
0002-chromebook-set-altgr-backspace-as-delete.patch
0003-chromebook-set-altgr-arrows-and-alt-shift-arrows-as-.patch
0003-chromebook-set-alt-shift-arrows-as-pgup-pgdown-home-.patch
0004-chromebook-add-English-US-Chromebook-layout-with-alt.patch
0005-chromebook-set-f3-key-as-reload.patch
0006-chromebook-set-f5-key-chrome-os-overview-as-printscr.patch)
Expand All @@ -38,22 +38,22 @@ build() {
cd "${srcdir}/${_pkgname}-${pkgver}"

echo 'Adding Chromebook function keys...'
patch -p1 -i ${srcdir}/0001-chromebook-add-function-keys.patch
patch -p1 -i "${srcdir}/0001-chromebook-add-function-keys.patch"

echo 'Setting AltGR+Backspace as Delete...'
patch -p1 -i ${srcdir}/0002-chromebook-set-altgr-backspace-as-delete.patch
patch -p1 -i "${srcdir}/0002-chromebook-set-altgr-backspace-as-delete.patch"

echo 'Setting up AltGr+Arrows and Alt+Shift+Arrows as PgUp, PgDown, Home and End'
patch -p1 -i ${srcdir}/0003-chromebook-set-altgr-arrows-and-alt-shift-arrows-as-.patch
patch -p1 -i "${srcdir}/0003-chromebook-set-alt-shift-arrows-as-pgup-pgdown-home-.patch"

echo 'Adding new layout: English (US, Chromebook)...'
patch -p1 -i ${srcdir}/0004-chromebook-add-English-US-Chromebook-layout-with-alt.patch
patch -p1 -i "${srcdir}/0004-chromebook-add-English-US-Chromebook-layout-with-alt.patch"

echo 'Setting up F3 as XF86Reload...'
patch -p1 -i ${srcdir}/0005-chromebook-set-f3-key-as-reload.patch
patch -p1 -i "${srcdir}/0005-chromebook-set-f3-key-as-reload.patch"

echo 'Setting up F5 as PrintScr...'
patch -p1 -i ${srcdir}/0006-chromebook-set-f5-key-chrome-os-overview-as-printscr.patch
patch -p1 -i "${srcdir}/0006-chromebook-set-f5-key-chrome-os-overview-as-printscr.patch"

./configure --prefix=/usr \
--with-xkb-base=/usr/share/X11/xkb \
Expand Down
28 changes: 24 additions & 4 deletions xkeyboard-config-chromebook/xkeyboard-config-chromebook.install
@@ -1,7 +1,27 @@
post_install(){
echo 'For detailed info about xkeyboard-config-chromebook please visit'
echo 'https://github.com/dhead666/archlinux-pkgbuilds/tree/master/xkeyboard-config-chromebook'
echo ''
request_message
}

post_upgrade() {
echo 'AltGR patch was removed from the English(US) layout,'
echo 'instead English(US, Chromebook) layout was added.'
echo 'AltGR+Arrows mapping have been removed, instead use Alt+Shift+Arrows'
echo ''
request_message
}

request_message(){
echo 'If you use this package then please support my feature request for libxkbcommon.'
echo 'Adding RedirectKey action to libxkbcommon will make sure the mapping will work'
echo 'for Chromium, Firefox and LibreOffice in a Wayland session.'
echo 'We need to show the developers that this feature is wanted as ATM their current'
echo 'view is that this feature is big, will complicate things and no one ask for it yet.'
echo ''
echo 'In short please post on the bug report at'
echo 'https://github.com/xkbcommon/libxkbcommon/issues/18'
echo ''
echo 'Alt+Shift+Arrows set as PgUp, PgDown, Home and End,'
echo 'If no one will speak up then the AltGR+Arrows mapping will be removed soon.'
echo 'You are welcome to try the RedirectKey solution with X session by compiling the package'
echo 'from the link, let me know how it works for you by mail or by a bug report on Github.'
echo 'https://github.com/dhead666/archlinux-pkgbuilds/tree/chromebook_redirect_key/xkeyboard-config-chromebook'
}

0 comments on commit 99ac930

Please sign in to comment.