Skip to content

Commit

Permalink
Map Ctrl+Escape to Caps Lock
Browse files Browse the repository at this point in the history
  • Loading branch information
Ambrevar committed May 27, 2017
1 parent 4c00ce9 commit b561cbd
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 19 deletions.
15 changes: 9 additions & 6 deletions .config/fish/fzf.fish
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ fzf_key_bindings
## Emacs bindings
# bind \cT transpose-chars
# bind \e\ct fzf-file-widget
# bind \ec capitalize-word
# bind \eC fzf-cd-widget

bind -M insert \et fzf-file-widget
bind t fzf-file-widget
bind R fzf-history-widget
bind -m insert C fzf-cd-widget
## Emacs binding that is also useful in vi.
bind -M insert \ec capitalize-word
bind -m insert \ec fzf-cd-widget

# bind -M insert \et fzf-file-widget
# Add to normal mode too.
bind \cT fzf-file-widget
# bind R fzf-history-widget
# bind -m insert C fzf-cd-widget

function fzf-select -d 'Eval commandline, fzf result and print out selection'
set -l cmd (commandline -j)
Expand Down
3 changes: 0 additions & 3 deletions .config/qutebrowser/keys.conf
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,9 @@ quit

scroll-page 0 1
<ctrl-f>
<alt-f>

scroll-page 0 -1
<ctrl-b>
<alt-b>

scroll-page 0 0.5
<ctrl-d>
Expand Down Expand Up @@ -472,7 +470,6 @@ run-macro

open-editor
<ctrl-e>
<alt-e>

insert-text {primary}
<ctrl-v>
Expand Down
1 change: 1 addition & 0 deletions .emacs.d/init.el
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ To view where the bindings are set in your config files, lookup
(require 'tool-evil))

;; God mode
;; TODO: Evil largely replaces god-mode. Remove?
;; (add-to-list 'package-selected-packages 'god-mode)
;; (when (require 'god-mode nil t)
;; (require 'tool-god))
Expand Down
1 change: 1 addition & 0 deletions .pkglists/arch-aur
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ sdlmame-wout-toolkits
tespeed-git
texlive-dummy
translate-git
xcape
1 change: 0 additions & 1 deletion .pkglists/arch-official
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,6 @@ xclip
xdg-user-dirs
xdg-utils
xdotool
xf86-input-synaptics
xf86-video-vesa
xfsprogs
xloadimage
Expand Down
18 changes: 9 additions & 9 deletions .xkb/symbols/usim
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
//------------------------------------------------------------------------------
//
// Description: This keyboard layout is based on Xorg's "us" and inspired by
// "us(intl)". We switch Caps Lock and Escape.
// "us(intl)". Caps Lock is Ctrl and LShift+RShift is Caps Lock. For best
// vi-style experience, set the new Ctrl to be Esc when not used as a modifier.
//
// User setup: run
//
Expand All @@ -17,18 +18,18 @@
//
// $ setxkbmap usim
//
// ┏━━━━━━
// ┃Caps
// ┃Lock ⇬
// ┡━━━━━┯━┹───┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┲━━━━━━━━━┓
// ┏━━━━━━┓
// ┃
// ┃Esc
// ┡━━━━━┯┹────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┲━━━━━━━━━┓
// │ ~ ~ │ ! ¡ │ @ ˝ │ # ¯ │ $ ¤ │ % ¢ │ ^ ^ │ & ¼ │ * ¾ │ ( ˘ │ ) ÷ │ _ × │ + ± ┃ ⌫ Back ┃
// │ ` ` │ 1 ¹ │ 2 ² │ 3 ³ │ 4 £ │ 5 € │ 6 ¥ │ 7 ½ │ 8 „ │ 9 “ │ 0 ” │ - ⋅ │ = ≠ ┃ space ┃
// ┢━━━━━┷━┱───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┺━┳━━━━━━━┫
// ┃ ┃ Q À │ W È │ E É │ R ® │ T ™ │ Y Ù │ U Ú │ I Í │ O Ó │ P Å │ { ‘ │ } ’ ┃ Enter ┃
// ┃Tab ↹ ┃ q à │ w è │ e é │ r ® │ t © │ y ù │ u ú │ i í │ o ó │ p å │ [ « │ ] » ┃ ⏎ ┃
// ┣━━━━━━━┻┱────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┺┓ ┃
// ┃ ┃ A Á │ S § │ D  │ F Ê │ G Î │ H Ô │ J Û │ K Œ │ L Æ │ : ° │ " ¨ │ | ¦ ┃ ┃
// ┃Esc ┃ a á │ s ß │ d â │ f ê │ g î │ h ô │ j û │ k œ │ l æ │ ; ° │ ' ´ │ \ ¬ ┃ ┃
// ┃Ctrl ┃ a á │ s ß │ d â │ f ê │ g î │ h ô │ j û │ k œ │ l æ │ ; ° │ ' ´ │ \ ¬ ┃ ┃
// ┣━━━━━━━┳┹────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴────┲┷━━━━━┻━━━━━━┫
// ┃ ┃ > ≥ │ Z Ä │ X Ë │ C Ï │ V Ö │ B Ü │ N Ñ │ M Ø │ < Ç │ > µ │ ? ¿ ┃ ┃
// ┃Shift ⇧┃ < ≤ │ z ä │ x ë │ c ï │ v ö │ b ü │ n ñ │ m ø │ , ç │ . … │ / ¶ ┃Shift ⇧ ┃
Expand Down Expand Up @@ -96,8 +97,7 @@ partial alphanumeric_keys xkb_symbols "usim" {
key <SPCE> { [ space, space, nobreakspace, nobreakspace ] };
key <LSGT> { [ less, greater, lessthanequal, greaterthanequal ] };

key <CAPS> { [ Escape ] };
key <ESC> { [ Caps_Lock ] };

include "level3(ralt_switch)"
include "ctrl(nocaps)"
include "shift(both_capslock)"
};
1 change: 1 addition & 0 deletions .xprofile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ EOF

## Load custom keymap and configure input devices.
xkbcomp -I"$HOME/.xkb" "$HOME/.xkb/usim.xkb" $DISPLAY
xcape -e 'Control_L=Escape'
numlockx on
# xinput disable "SynPS/2 Synaptics TouchPad"

Expand Down

0 comments on commit b561cbd

Please sign in to comment.