mirror of
https://github.com/rbreaves/kinto.git
synced 2025-08-06 10:58:26 +02:00
- Updated xkb files to include multiple levels to enable delete key support on Ctrl/Cmd + Backspace
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
default partial xkb_symbols "mac_onelvlsym" {
|
default partial xkb_symbols "mac_levelssym" {
|
||||||
// LEFT to Begin Line
|
// LEFT to Begin Line
|
||||||
replace key <LEFT> {
|
replace key <LEFT> {
|
||||||
type[Group1]= "ONE_LEVEL_CTRL",
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
@@ -14,13 +14,19 @@ default partial xkb_symbols "mac_onelvlsym" {
|
|||||||
// Up to Mac Home
|
// Up to Mac Home
|
||||||
replace key <UP> {
|
replace key <UP> {
|
||||||
type[Group1]= "ONE_LEVEL_CTRL",
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
symbols[Group1]= [ Up, NoSymbol ],
|
symbols[Group1]= [ Up, Up, NoSymbol ],
|
||||||
actions[Group1]= [ NoAction(), NoAction(), RedirectKey(key=<HOME>)]
|
actions[Group1]= [ NoAction(), NoAction(), RedirectKey(key=<HOME>)]
|
||||||
};
|
};
|
||||||
// Down to Mac End
|
// Down to Mac End
|
||||||
replace key <DOWN> {
|
replace key <DOWN> {
|
||||||
type[Group1]= "ONE_LEVEL_CTRL",
|
type[Group1]= "ONE_LEVEL_CTRL",
|
||||||
symbols[Group1]= [ Down, NoSymbol ],
|
symbols[Group1]= [ Down, Down, NoSymbol ],
|
||||||
actions[Group1]= [ NoAction(), NoAction(), RedirectKey(key=<END>)]
|
actions[Group1]= [ NoAction(), NoAction(), RedirectKey(key=<END>)]
|
||||||
};
|
};
|
||||||
|
// CTRL BKSP to DELETE
|
||||||
|
replace key <BKSP> {
|
||||||
|
type[Group1]= "TWO_LEVEL_CTRL",
|
||||||
|
symbols[Group1]= [ BackSpace, BackSpace, NoSymbol ],
|
||||||
|
actions[Group1]= [ NoAction(), NoAction(), RedirectKey(key=<DELE>,clearmods=Control)]
|
||||||
|
};
|
||||||
};
|
};
|
20
.xkb/types/mac_levels
Normal file
20
.xkb/types/mac_levels
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
default partial xkb_types "addmac_levels" {
|
||||||
|
type "ONE_LEVEL_CTRL" {
|
||||||
|
modifiers= Shift+Control;
|
||||||
|
map[Shift]= Level2;
|
||||||
|
map[Control]= Level3;
|
||||||
|
map[Shift+Control]= Level3;
|
||||||
|
level_name[Level1]= "Base";
|
||||||
|
level_name[Level2]= "Caps";
|
||||||
|
level_name[Level3]= "With Control";
|
||||||
|
};
|
||||||
|
type "TWO_LEVEL_CTRL" {
|
||||||
|
modifiers= Shift+Control;
|
||||||
|
map[Shift]= Level2;
|
||||||
|
map[Control]= Level3;
|
||||||
|
map[Shift+Control]= Level3;
|
||||||
|
level_name[Level1]= "Base";
|
||||||
|
level_name[Level2]= "Caps";
|
||||||
|
level_name[Level3]= "With Control";
|
||||||
|
};
|
||||||
|
};
|
@@ -1,11 +0,0 @@
|
|||||||
default partial xkb_types "addmac_onelvl" {
|
|
||||||
type "ONE_LEVEL_CTRL" {
|
|
||||||
modifiers= Shift+Control;
|
|
||||||
map[Shift]= Level2;
|
|
||||||
map[Control]= Level3;
|
|
||||||
map[Shift+Control]= Level3;
|
|
||||||
level_name[Level1]= "Base";
|
|
||||||
level_name[Level2]= "Caps";
|
|
||||||
level_name[Level3]= "With Control";
|
|
||||||
};
|
|
||||||
};
|
|
@@ -1,8 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
mkdir -p ~/.xkb/{keymap,symbols,types}
|
mkdir -p ~/.xkb/{keymap,symbols,types}
|
||||||
cp ./.xkb/symbols/mac_onelvl ~/.xkb/symbols/mac_onelvl
|
cp ./.xkb/symbols/mac_levels ~/.xkb/symbols/mac_levels
|
||||||
cp ./.xkb/types/mac_onelvl ~/.xkb/types/mac_onelvl
|
cp ./.xkb/types/mac_levels ~/.xkb/types/mac_levels
|
||||||
setxkbmap -option
|
setxkbmap -option
|
||||||
setxkbmap -print > ~/.xkb/keymap/kbd.mac.onelvl
|
setxkbmap -print > ~/.xkb/keymap/kbd.mac.gui
|
||||||
line=$(cat ~/.xkb/keymap/kbd.mac.onelvl | grep -n 'xkb_symbols' | cut -f1 -d:)
|
line=$(cat ~/.xkb/keymap/kbd.mac.gui | grep -n 'xkb_symbols' | cut -f1 -d:)
|
||||||
sed -ie "${line}s/)\"/)+altwin(ctrl_alt_win)+mac_onelvl(mac_onelvlsym)\"/g" ~/.xkb/keymap/kbd.mac.onelvl
|
sed -ie "${line}s/)\"/)+altwin(ctrl_alt_win)+mac_levels(mac_levelssym)\"/g" ~/.xkb/keymap/kbd.mac.gui
|
||||||
|
@@ -15,7 +15,7 @@ swapbehavior=$4
|
|||||||
swapcmd_term="setxkbmap -option;setxkbmap -option altwin:swap_alt_win"
|
swapcmd_term="setxkbmap -option;setxkbmap -option altwin:swap_alt_win"
|
||||||
fallbackcmd_gui=""
|
fallbackcmd_gui=""
|
||||||
if [[ "$systemtype" == "windows" || "$systemtype" == "mac" ]]; then
|
if [[ "$systemtype" == "windows" || "$systemtype" == "mac" ]]; then
|
||||||
swapcmd_gui="setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.onelvl $DISPLAY"
|
swapcmd_gui="setxkbmap -option;xkbcomp -w0 -I$HOME/.xkb ~/.xkb/keymap/kbd.mac.gui $DISPLAY"
|
||||||
check_gt="setxkbmap -query | grep -v 'swap_alt_win' 1>/dev/null"
|
check_gt="setxkbmap -query | grep -v 'swap_alt_win' 1>/dev/null"
|
||||||
check_tg="setxkbmap -query | grep -q 'swap_alt_win'"
|
check_tg="setxkbmap -query | grep -q 'swap_alt_win'"
|
||||||
elif [[ "$swapbehavior" == "both_mac" ]]; then
|
elif [[ "$swapbehavior" == "both_mac" ]]; then
|
||||||
|
Reference in New Issue
Block a user