19

^c is a common notation for Ctrl+c where c is a (uppercase) letter or one of @[\]^_. It designates the corresponding control character. The correspondence is that the numeric code of the control character is the numeric code of the printable character (letter or punctuation symbol) minus 64, which corresponds to setting a bit to 0 in base 2. In addition, ^? ...


3

To extend on Gilles' mention of the correspondence: The correspondence is that the numeric code of the control character is the numeric code of the printable character (letter or punctuation symbol) minus 64, which corresponds to setting a bit to 0 in base 2. You can see it in ascii(7). Look at the octal numbers: Oct Dec Hex Char ...


1

The ^ character stands for the control key. ^[ produces ESCAPE, or ASCII 27. Capitalization in this context is normally not significant, and ^A means the same as ^a, namely the control key pressed at the same time as the "a" key. ^[^@ means ESCAPE followed by control-@ (depending on the keyboard layout, you may have to press Shift or Alt-Gr at the ...


1

Below gives me the current keyboard layout, setxkbmap -query | awk '/layout/ {print $2}'. Following script toggles the keyboard layout. I personally prefer this to grp:alt_shift_toggle and similar options. LAYOUT=$(setxkbmap -query | awk '/layout/ {print $2}') if [[ "$LAYOUT" == "ir" ]]; then setxkbmap us else setxkbmap ir fi


Only top voted, non community-wiki answers of a minimum length are eligible