把 Caps Lock 變成智慧的 Control 以及 Escape :
- 單獨輕按一下就是 Escape 。
- 若按下時同時按著其他鍵,就會是 Control 。
這應該是 Vim 和 Emacs 的最佳解了!(Emacs? Bash 的快捷鍵就是 Emacs 系列的)
- Send Escape if you tap Caps Lock alone.
#!/bin/bash | |
# | |
# This file echoes a bunch of 24-bit color codes | |
# to the terminal to demonstrate its functionality. | |
# The foreground escape sequence is ^[38;2;<r>;<g>;<b>m | |
# The background escape sequence is ^[48;2;<r>;<g>;<b>m | |
# <r> <g> <b> range from 0 to 255 inclusive. | |
# The escape sequence ^[0m returns output to default | |
setBackgroundColor() |
// "License": Public Domain | |
// I, Mathias Panzenböck, place this file hereby into the public domain. Use it at your own risk for whatever you like. | |
// In case there are jurisdictions that don't support putting things in the public domain you can also consider it to | |
// be "dual licensed" under the BSD, MIT and Apache licenses, if you want to. This code is trivial anyway. Consider it | |
// an example on how to get the endian conversion functions on different platforms. | |
#ifndef PORTABLE_ENDIAN_H__ | |
#define PORTABLE_ENDIAN_H__ | |
#if (defined(_WIN16) || defined(_WIN32) || defined(_WIN64)) && !defined(__WINDOWS__) |