├── LICENSE ├── README_zh.md └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 shortcutui 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README_zh.md: -------------------------------------------------------------------------------- 1 | # SUI 2 | 3 | 控制电脑和网页app的快捷键用户接口. 4 | 5 | [English Version](./README.md) 6 | 7 | ## 简介 8 | 9 | SUI全称(Shortcut User Interface)是一个快捷键用户接口, 它吸收了emacs和vim的快捷键设计思想, 10 | 提取出一些在日常使用软件中各个软件常用且共有的操作, 并给这些操作设计了一个易于学习,易于理解, 易于按下的快捷键. 11 | 12 | SUI目前在三大主流操作系统和各主流浏览器上都易于实现. 能够实现SUI的软件和网站称为SUI兼容的. 13 | 14 | ## 动机 15 | 16 | 我之前是一个GUI用户, 在某一天发现右手摸鼠标的时候手指有点发麻, 同时左手的小拇指也感觉按ctrl有些发麻,因此不得不想办法使用 17 | 全键盘来操作电脑, 现有的按键规范有3种主流的, 一种是emacs的ctrl+x开头跟一系列按键, 一种是vim的模式按键, 还有一种是有些软件 18 | 自带的菜单按键, 是alt+一个字母开头, 再跟一系列按键, 或者上下左右来浏览菜单. 19 | 20 | 这些按键都有些各自的缺点, emacs按键太过长, 稍微多一点操作都要3个按键, vim的模式编译很难应用在gui的软件, 软件带的菜单在各 21 | 软件不通用, 并无法方便的应用在窗口管理器和浏览器中. 22 | 23 | 通过一些研究和思考, 在日常使用软件的过程中, 不管是gui的还是tui的, 或者是网站, 我发现绝大多数情况, 24 | 不得不用鼠标的原因都是由于没有办法通过键盘去定位到某个窗口或者某个菜单. 如果能够通过快捷键方便的切换窗口, 那么app的其它大部分功能都能通过上下左右或者一些其他的按键来完成. 25 | 26 | ## SUI相关的仓库(TODO) 27 | 28 | 下面的仓库是实现了sui的操作系统或者应用软件, 或者是web应用. 能够实现sui基本接口的应用叫做sui兼容的. 29 | 30 | 这些应用有些是我日常重度使用的, 例如wezterm,browser,yazi还有neovim, 这些我后面会陆续脱敏放出来. 31 | 32 | 33 | - [shortcutui/windows](https://github.com/shortcutui/windows) 34 | - [shortcutui/macos](https://github.com/shortcutui/macos) 35 | - [shortcutui/wezterm](https://github.com/shortcutui/wezterm) 36 | - [shortcutui/browser](https://github.com/shortcutui/browser) 37 | - [shortcutui/yazi](https://github.com/shortcutui/yazi) 38 | - [shortcutui/neovim](https://github.com/shortcutui/neovim) 39 | - [shortcutui/vscode](https://github.com/shortcutui/vscode) 40 | - [shortcutui/idea](https://github.com/shortcutui/idea) 41 | - [shortcutui/lazygit](https://github.com/shortcutui/lazygit) 42 | - [shortcutui/lazydocker](https://github.com/shortcutui/lazygit) 43 | - [shortcutui/tmux](https://github.com/shortcutui/tmux) 44 | 45 | ## 名词解释和按键约定 46 | 47 | 在本文中, 在圆括号中括起来的代表一个按键序列, 例如(a)代表按下了键盘上的a键, (a b)代表先按下a键, 并在较短的时间内按下b键. 48 | 加号代表同时按下, 比如(ctrl+a)代表同时按下ctrl键和a键, (ctrl+alt+a)代表同时按下ctrl键和alt键和a键. 除了在vim这种模式编辑 49 | 的场景, 这时的(leader+a)可能代表先按下leader键, 然后短时间内按下a键. 50 | 51 | leader键在不同的应用中代表不同的按键, SUI根据应用的特性将其分成几类, 不同类型的应用使用不同的按键作为leader键. 52 | 下面是一个leader设置的例子. 后面括号中代表它们所使用的leader键 53 | 54 | - 窗口管理器(ctrl) 55 | - 普通GUI的app(alt) 56 | - 浏览器或者其它可以远程连接ssh的终端app(ctrl+alt或者无) 57 | - 远程终端上的窗口管理器(alt) 58 | - 普通TUI的app(无, 或者vim模式中的leader) 59 | 60 | SUI推荐通过用左右手的手掌来按ctrl和ctrl+alt, 把右ctrl映射给ctrl+alt, 并且Capslock如果和其它按键一起按的时候也推荐将其映射为某一个组合键. 这个依据您的键盘布局和手掌分布, 您可以自由选择leader是什么以及怎么按leader. 61 | 62 | SUI所有的快捷键都是(leader+字符 字符 字符)这种按键形式, 如果leader键是ctrl或者alt这种按键, 那么按后面的字符时,leader有 63 | 没有松开都应该映射为同一个操作. 并且除了leader键以外, SUI应该只使用0-9的数字和a-z的字母加上少量的其它字符, 并应尽量避免 64 | 使用大写字母, 如果需要使用大写字母, 那么必须保证大写字母和小写字母的功能类似或者相关, 是其中的一个很自然的变体. 65 | 66 | 目前SUI除了编辑器接口以外只使用了3个非英文字母的符号, 分别为逗号代表最近的, 句号代表任意的, 斜杆代表搜索. 67 | 68 | ? 代表所有sui中该章节未定义的字符, 比如在[space接口](#space-interface)中, (space+?)代表所有未在SUI的space接口中定义的字符. 一般这些字符是留给用户自定义的. 69 | 70 | SUI的按键定义是用qwerty的键盘布局来定义的, 其中有几个按键比较特殊, 它们是根据位置来定义的,分别是jlik(左右上下) 71 | 和sfed(home,end,pageup,pagedown). 其它的字母, 会努力找到对应的英文单词来帮助记忆. 并且同一个字母在不同的应用中应该代表相近的意思. 72 | 73 | 没有特殊说明, SUI按下第一个组合按键以后, 会短暂或者永久的进入到一个组合按键的模式, 按esc或者q可以退出该模式, 74 | 如果按下sui中定义的按键, 都会退出该组合模式, 如果该模式是永久的, 那么({x mode} a)代表在x模式下按下按键a, 并且无说明的 75 | 情况下, 按下a会执行对应操作并不会退出x模式. 76 | 77 | SUI可以很好的在标准的qwerty布局和我正在使用的norman布局上工作, 其它布局可能需要稍微修改一下. 78 | 79 | ## 视频演示 80 | 81 | 我在bilibili录制了一个[视频](https://www.bilibili.com/video/BV14w4m1q7YQ/)来说明一些sui现在在我电脑上的使用情况. 82 | 83 | ## SUI接口 84 | 85 | SUI根据接口的作用不同将其分为不同的接口, 并使用不同的按键作为第一个按键.相同类型的接口往往有相同的作用. 86 | 87 | 所有的接口表示为(key) = value, 其中 (key) 代表在键盘按下的按键序列, value表示实际输出的按键或者某一个操作. 88 | 89 | - [space interface](#space-interface) 90 | - [backup interface](#backup-interface) 91 | - [mouse interface](#mouse-interface) 92 | - [editline interface](#editline-interface) 93 | - [zxcva interface](#zxcva-interface) 94 | - [uniq interface](#uniq-interface) 95 | - [fallthrough interface](#fallthrough-interface) 96 | - [open interface](#open-interface) 97 | - [quit interface](#quit-interface) 98 | - [focus interface](#focus-interface) 99 | - [goto interface](#goto-interface) 100 | - [move interface](#move-interface) 101 | - [size interface](#size-interface) 102 | - [copy&paste interface](#copy&paste-interface) 103 | - [eidtor interface](#editor-interface) 104 | - [browser interface](#browser-interface) 105 | 106 | ### space interface 107 | 108 | space接口主要用于把常用的上下左右键和功能键映射到主键盘区域. 109 | 110 | ```clojure 111 | (space+j) = (left) 112 | (space+l) = (right) 113 | (space+i) = (up) 114 | (space+k) = (down) 115 | (space+s) = (home) 116 | (space+f) = (end) 117 | (space+e) = (pageup) 118 | (space+d) = (pagedown) 119 | 120 | (space+h) = (enter) 121 | (space+o) = (backspace) 122 | (space+.) = (delete) 123 | 124 | (space+?) = 任意你自定义的按键或者操作 125 | ``` 126 | 127 | ### backup interface 128 | 129 | backup接口主要用于那些能够在大部分情况下用sui来操作的app, 小部分情况下无法使用sui, 此时确又不希望用fallthrough接口时使用. 130 | 131 | ```clojure 132 | (ctrl+b j) = 移动到左边的窗口或者tab 133 | (ctrl+b l) = 移动到右边的窗口或者tab 134 | (ctrl+b i) = 移动到上边的窗口或者tab 135 | (ctrl+b k) = 移动到下边的窗口或者tab 136 | (ctrl+b .) = 打开应用自身的快捷命令窗口 137 | (ctrl+b q) = 退出当前窗口 138 | (ctrl+b r) = 重新加载当前窗口 139 | 140 | (ctrl+b ?) = 任意你自定义的按键或者操作 141 | ``` 142 | 143 | ### mouse interface 144 | 145 | 这个接口模拟鼠标操作, 用在特殊的没适配sui的app. 146 | 147 | ```clojure 148 | (ctrl+n) = 进入 mouse mode 149 | ({mouse mode} q) = 离开 mouse mode 150 | ({mouse mode} esc) = 离开 mouse mode 151 | 152 | ({mouse mode} j) = 鼠标左移(按住ctrl时鼠标移动变慢并且恒速) 153 | ({mouse mode} l) = 鼠标右移(按住ctrl时鼠标移动变慢并且恒速) 154 | ({mouse mode} i) = 鼠标上移(按住ctrl时鼠标移动变慢并且恒速) 155 | ({mouse mode} k) = 鼠标下移(按住ctrl时鼠标移动变慢并且恒速) 156 | ({mouse mode} s) = 鼠标左键 157 | ({mouse mode} f) = 点击鼠标右键 158 | ({mouse mode} e) = 鼠标滚轮上 159 | ({mouse mode} d) = 鼠标滚轮下 160 | 161 | ({mouse mode} n) = 鼠标点击当前关注的窗口的中央,防止某些丢失焦点的情况,然后离开mouse mode 162 | ({mouse mode} x) = [点击]鼠标中键 163 | ({mouse mode} w) = [点击]鼠标前进键 164 | ({mouse mode} r) = [点击]鼠标后退键 165 | ({mouse mode} c) = 鼠标滚轮左 166 | ({mouse mode} v) = 鼠标滚轮右 167 | ({mouse mode} h) = 隐藏鼠标 168 | ({mouse mode} o) = 显示鼠标 169 | ``` 170 | 171 | ### editline interface 172 | 173 | 这个接口就是用来编辑某一行的内容. 174 | 175 | ```clojure 176 | (ctrl+e) = enter edit mode 177 | 178 | ({edit mode} j) = 向前删除一个单词 179 | ({edit mode} J) = 向前移动一个单词 180 | ({edit mode} l) = 向后删除一个单词 181 | ({edit mode} L) = 向后移动一个单词 182 | ({edit mode} s) = 向前删除到行首,然后离开 edit mode 183 | ({edit mode} f) = 向后删除到行首,然后离开 edit mode 184 | 185 | ({edit mode} d) = 删除整行,然后离开 edit mode 186 | ({edit mode} y) = 拷贝整行,然后离开 edit mode 187 | ({edit mode} u) = 撤销 188 | ({edit mode} U) = 反撤销 189 | ({edit mode} q) = 给前面的单词加上引号 190 | ({edit mode} Q) = 给整行加上引号 191 | ({edit mode} ,) = 切换到另一个 editline mode, 在你发现当前的操作不起作用的时候 192 | ({edit mode} ?) = user defined by self or print char then leave edit mode 193 | ``` 194 | 195 | ### zxcva interface 196 | 197 | 198 | ```clojure 199 | (ctrl+zxcva) 按照windows平台的规则起作用 200 | (alt+z ?) = (ctrl+?) 如果是mac平台是 (cmd+?) 201 | (alt+x ?) = (alt+?) 202 | (alt+c) = 鼠标滚轮向左 203 | (alt+v) = 鼠标滚轮向右 204 | (alt+a .) = 显示应用层用户自定义的快捷键的菜单 205 | (alt+a ?) = 应用层用户自定义的快捷键 206 | 207 | ``` 208 | ### uniq interface 209 | 210 | 这个接口给某些应用, 有一些不好归类又用的比较经常的功能按键, 或者需要一直按着不方便设计成按键序列的功能. 211 | 或者叫做快捷键的快捷键, 有些快捷键你可以定义在 alt a 里面, 但是你还想要它更加的快可以设置成 uniq interface. 212 | ```clojure 213 | (ctrl+u) = 最常用的, 我目前是给了 tts 214 | (ctrl+alt+u) = 最常用的或者唯一的 215 | (alt+u) = 最常用的或者唯一的 216 | ``` 217 | 218 | ### fallthrough interface 219 | 220 | 在fallthrough mode, 所有该leader开头的按键都会原样输出. 也就是说, 在窗口管理出去中, 摁下 ctrl+f 以后, 所有的以 control 开头的快捷键,都是原样的发送给 App,除非摁下 control+shift+f 才能够解除 这个接口主要设计给还没有实现 sui 的应用. 221 | 222 | ```clojure 223 | (leader+f) = 进入 fallthrough mode 224 | (leader+shift+f) = 离开 fallthrough mode 225 | ``` 226 | 227 | ### open interface 228 | 229 | ```clojure 230 | (leader+o .) = 打开命令面板或者菜单 231 | (leader+o o) = 最常用的打开操作 232 | (leader+o r) = 重新加载配置或者重启 App 233 | (leader+o v) = 在垂直窗口打开某个资源 234 | (leader+o h) = 在水平窗口打开某个资源 235 | (leader+o t) = 在新的 tab 打开某个资源 236 | (leader+o s c) = 打开app配置 237 | (leader+o s m) = 打开app快捷键 238 | (leader+o s h) = 打开app帮助 239 | (leader+o s i) = 打开app信息面板 240 | (leader+o ?) = 打开用户自定义的资源 241 | ``` 242 | 243 | ### quit interface 244 | 245 | ```clojure 246 | (leader+q .) = 搜索退出 247 | (leader+q q) = 退出当前窗口(大写强制退出) 248 | (leader+q t) = 退出当前 tab(大写强制退出) 249 | (leader+q a) = 退出app 250 | (leader+q u) = 撤销退出 251 | (leader+q s) = 退出除当前窗口以外的其他窗口 252 | (leader+q S) = 退出除当前 tab 以外的其他 tab 253 | 254 | (leader+q j) = 退出左边窗口 255 | (leader+q l) = 退出右边窗口 256 | (leader+q i) = 退出上边窗口 257 | (leader+q k) = 退出下边窗口 258 | ``` 259 | 260 | ### focus interface 261 | 262 | ```clojure 263 | (leader+j) = 聚焦到左边窗口(如果当前tab只有一个窗口,可以聚焦到左边tab也可以无操作) 264 | (leader+l) = 聚焦到右边窗口(如果当前tab只有一个窗口,可以聚焦到右边tab也可以无操作) 265 | (leader+i) = 聚焦到上边窗口(如果当前tab只有一个窗口,可以聚焦到浮动层也可以无操作) 266 | (leader+k) = 聚焦到下边窗口(如果当前tab只有一个窗口,可以聚焦到平铺层也可以无操作) 267 | (leader+w left) = 聚焦到左边窗口(如果当前tab只有一个窗口,可以聚焦到左边tab也可以无操作) 268 | (leader+w right) = 聚焦到右边窗口(如果当前tab只有一个窗口,可以聚焦到右边tab也可以无操作) 269 | (leader+w up) = 聚焦到上边窗口(如果当前tab只有一个窗口,可以聚焦到浮动层也可以无操作) 270 | (leader+w down) = 聚焦到下边窗口(如果当前tab只有一个窗口,可以聚焦到平铺层也可以无操作) 271 | (leader+left) = 聚焦到左边 tab 272 | (leader+right) = 聚焦到右边 tab 273 | (leader+up) = 聚焦到浮动层 274 | (leader+down) = 聚焦到平铺层 275 | (leader+t left) = 聚焦到左边 tab 276 | (leader+t right) = 聚焦到右边 tab 277 | 278 | (leader+w .) = 搜索窗口并聚焦 279 | (leader+w ,) = 聚焦到最近的窗口 280 | (leader+w ?) = 聚焦到用户定义的窗口 281 | (leader+t .) = 搜索 tab 并聚焦 282 | (leader+t ,) = 聚焦到最近的 tab 283 | (leader+t ?) = 聚焦到用户定义的 tab 284 | (leader+d .) = 搜索 tab 并把当前窗口移动到该 tab 285 | (leader+d ?) = 把当前窗口移动到用户定义的 tab 286 | (leader+d left) = 把当前窗口移动到左边的 tab 287 | (leader+d right) = 把当前窗口移动到右边的 tab 288 | 289 | (ctrl+/) = window manager find widgets 290 | (alt+/) = app find some thing 291 | 292 | ; 下面的操作适用于很多,同时存在3个窗口的情况, 当我的焦点在其中一个主窗口时,我可以同时操作另外两个窗口 293 | (shift+up) 操作第二个窗口里的光标或窗口向上 294 | (shift+down) 操作第二个窗口里的光标或窗口向下 295 | (shift+left) 操作第二个窗口里的光标或窗口向左 296 | (shift+right) 操作第二个窗口里的光标或窗口向右 297 | (shift+pageup) 操作第三个窗口里的光标或窗口向上 298 | (shift+pagedown) 操作第三个窗口里的光标或窗口向下 299 | (shift+home) 操作第三个窗口里的光标或窗口向左 300 | (shift+end) 操作第三个窗口里的光标或窗口向右 301 | ``` 302 | 303 | ### goto interface 304 | 305 | 前面的操作主要是针对窗口或者 tab,这个 goto interface 的操作主要针对于 App 所操作的资源. 或者是当前所在的位置. 306 | 307 | ```clojure 308 | (leader+g .) = 搜索资源并跳转 309 | (leader+g ,) = 跳转到最近的资源 310 | (leader+g j) = 光标往回跳转 311 | (leader+g l) = 光标往前跳转 312 | (leader+g d) = 跳转到定义 313 | (leader+g r) = 跳转到引用 314 | (leader+g t ?) = 跳转到用户定义的特定资源 315 | ``` 316 | 317 | ### move interface 318 | 319 | ```clojure 320 | (leader+m j) = 窗口向左移动 321 | (leader+m l) = 窗口向右移动 322 | (leader+m i) = 窗口向上移动 323 | (leader+m k) = 窗口向下移动 324 | (leader+m left) = tab 向左移动 325 | (leader+m right) = tab 向右移动 326 | (leader+m up) = 移动窗口到浮动层 327 | (leader+m down) = 移动窗口到平铺层 328 | 329 | (leader+m f) = 切换窗口的浮动状态 330 | ``` 331 | 332 | ### size interface 333 | 334 | ```clojure 335 | (leader+s j) = 窗口往左增加或往右减少 336 | (leader+s J) = 窗口往左减少或往右增加 337 | (leader+s l) = 窗口往右增加或往左减少 338 | (leader+s L) = 窗口往右减少或往右增加 339 | (leader+s i) = 窗口往上增加或往右减少 340 | (leader+s I) = 窗口往上减少或往右增加 341 | (leader+s k) = 窗口往下增加或往右减少 342 | (leader+s K) = 窗口往下减少或往右增加 343 | 344 | (leader+s m) = 切换窗口最大化状态 345 | (leader+s z) = 切换窗口zen mode 346 | (leader+s h) = 隐藏或者最小化窗口 347 | (leader+s w) = 修改窗口名字 348 | (leader+s t) = 修改 tab 名字 349 | (leader+s u) = 增加字体或声音大小 350 | (leader+s d) = 减少字体或声音大小 351 | (leader+s s) = 把字体或声音调整到默认大小 352 | 353 | (leader+s ?) = 用户定义的窗口修改相关的操作 354 | ``` 355 | 356 | ### copy&paste interface 357 | 358 | 用f代表当前光标或者窗口所关联的资源或者文件, 所有的资源都是文件. 资源或者文件都有路径,名字还有目录 359 | 360 | ```clojure 361 | ; 大原则 362 | (leader+y y) = 最常用的拷贝 363 | (leader+y n) = 拷贝资源名字 364 | (leader+y p) = 拷贝资源全路径 365 | (leader+y d) = 拷贝资源所在目录 366 | (leader+y i) = 拷贝资源全部信息 367 | (leader+y f) = 拷贝资源 368 | (leader+Y b) = 收藏资源,添加到书签等 369 | 370 | ; 窗口管理器 371 | (ctrl+y r) = 矩形截图(rectangle) 372 | (ctrl+y w) = 窗口截图(window) 373 | (ctrl+y l) = 长截图(long) 374 | (ctrl+y a) = 屏幕截图(all) 375 | (ctrl+y g) = gif截图(gif) 376 | (ctrl+y v) = 录制视频(video) 377 | (ctrl+y .) = 任意区域截图() 378 | 379 | ; 终端 380 | (ctrl+alt+y w) = 拷贝某个单词 381 | (ctrl+alt+y l) = 拷贝某个url 382 | (ctrl+alt+y p) = 拷贝某个路径 383 | (ctrl+alt+y c) = 拷贝某个命令 384 | 385 | ; 浏览器 386 | (ctrl+alt+y n) = 拷贝标题 387 | (ctrl+alt+y p) = 拷贝网址 388 | (ctrl+alt+y d) = 拷贝网站域名 389 | (ctrl+alt+y i) = 拷贝网站所有信息 390 | 391 | (ctrl+alt+y e) = 拷贝编辑框信息 392 | (ctrl+alt+y t) = 拷贝图片地址 393 | 394 | (ctrl+Y t) = 翻译信息 395 | (ctrl+Y o) = ocr处理信息 396 | (ctrl+Y i) = 发送给im聊天工具 397 | (ctrl+Y e) = 发送给文件管理器打开 398 | (ctrl+Y s ?) = 搜索拷贝的信息(web or docs) 399 | (ctrl+Y b) = 收藏拷贝的信息 400 | 401 | ``` 402 | ### editor interface 403 | 404 | 这个接口是对vim原有编辑接口的一种补充,在原vim编辑器中很多的接口设计不太合理也不好记忆,最典型的莫过于gg回文件头和G到文件尾了。还有dw和vwd表现并不完全一致, 并且除了w这一个文本对象以外, 其它的文本对象无简写,也就是说vim原本的文本对象只有iw,aw,ap,ip,as, is等, 都是以a和i为开头的文本对象。这个会导致vim本身很简单的概念记忆成本也会很高, 并且很高频的操作并没有办法简化,例如删除一个单词,用diw明显不如用dw来的简单。vim中还有一大类的文本移动的操作,都是以中括号为开头,例如`[m`是去到上一个标签处,`]m`是去到下一个标签处, 并且很多的插件也支持这一类快捷键的定义。 405 | 406 | editor接口扩展了vim的文本对象概念和中括号移动的概念, 尽量不覆盖vim原本定义的操作,但不做特殊处理,如果冲突则以editor接口为准。 407 | 408 | 1. 动作+范围+文本对象(这里的范围主要是在文件范围内), 也可以用v动作选中对象后面再跟另一个动作来实现 409 | 410 | editor接口尽量以单个字符作为文本对象的标记. 411 | 412 | 413 | | 动作 | 意义 | 414 | | ------------- | -------------- | 415 | | t | 去到/添加 | 416 | | v | 选中 | 417 | | d | 删除 | 418 | | c | 替换 | 419 | | y | 拷贝 | 420 | | j/J | 连接/反连接 | 421 | | gc | 注释 | 422 | | ga(?) | 对齐align | 423 | | gx | 交换 | 424 | | gu/gU | 小写/大写 | 425 | | ge | 运行代码 | 426 | 427 | 428 | | 范围 | 意义 | 429 | | ------------- | -------------- | 430 | | j | 左边 | 431 | | l | 右边 | 432 | | k | 两边 | 433 | | i | inside | 434 | | a | arround | 435 | | (i/a)(j/l) | 某一边的对象 | 436 | | (j/l)(i/a) | 对象的某一边 | 437 | | v | 行对象(有些无行对象的则是特殊功能 vw/vl) | 438 | 439 | | 对象 | 意义 | 440 | | ------------- | -------------- | 441 | | w/W | 单词/大单词 | 442 | | q | 引号 | 443 | | b | 括号 | 444 | | x | 参数 | 445 | | l | 一行 | 446 | | t | tag | 447 | | p | 段落 | 448 | | f | 函数 | 449 | | e | 整个文档 | 450 | | m | 匹配结构 | 451 | | | 下面的对象是没有范围的.可以考虑在前面加上范围前缀表示另外的对象 | 452 | | s | 搜索 | 453 | | u(?) | 其它自定义对象 | 454 | 455 | 456 | 2. 查找/替换等动作+对象范围+对象(这里的范围主要是目录范围内), 也可以先选中对象, 再跟替换+对象范围来实现 457 | 458 | 这个和上一段最主要的差别是这里的对象范围和上面对范围的修饰不一样, 这里的范围其实可以放在上面一节里的对象 459 | 460 | | 动作 | 意义 | 461 | | ------------- | -------------- | 462 | | m | 查找 | 463 | | M | 替换 | 464 | 465 | | 对象范围 | 意义 | 466 | | ------------- | -------------- | 467 | | p | 段落 | 468 | | f | 函数 | 469 | | e | 文件 | 470 | | s | 选中的范围 | 471 | | d/D | 当前目录/不包含子目录 | 472 | | r | root | 473 | | a | all | 474 | | A | any | 475 | 476 | 注意这里的对象全部都是arround的, 否则没啥意义 477 | 478 | | 对象 | 意义 | 479 | | ------------- | -------------- | 480 | | w/W | 单词/大单词 | 481 | | q | 引号 | 482 | | b | 括号 | 483 | | x | 参数 | 484 | | l | 一行 | 485 | | c | 剪切板 | 486 | 487 | 3. navigate接口 488 | 489 | vim原生会用中括号表示光标跳转到某一个对象的前后对象, 例如[c, [s等, 并且有很多插件也会扩展这个动作, 例如去到上一个todo, 490 | 去到下一个git修改的地方等等. 但是这个有一个缺陷在于, 这一套逻辑过于简单无法表达出可以嵌套的文本对象或者说树形结构的对象, 491 | 例如markdown或者org mode里面, 都会是嵌套的小节, 包括括号对象, 也是可能会有嵌套. 492 | 493 | | 字符 | 意义 | 494 | | ------------- | -------------- | 495 | | ] | 后一个对象 | 496 | | [ | 前一个对象 | 497 | | ]] | 忽略层级的后一个对象 | 498 | | [[ | 忽略层级的前一个对象 | 499 | | ( | 当前对象左边 | 500 | | ) | 当前对象右边 | 501 | | [{ | 父亲对象 | 502 | | ]) | 子对象 | 503 | 504 | | 对象 | 意义 | 505 | | ------------- | -------------- | 506 | | y | markdown或者org等文档的一个小节 | 507 | | g | git的hunk | 508 | | d | linter的提示 | 509 | | t | todo的标记 | 510 | | b | 括号对象 | 511 | | q | 引号对象 | 512 | 513 | ### browser interface 514 | 515 | 浏览器和vim模式的文本编辑器其实在某些地方有相似的地方, 比如都是默认是对网页或文本进行浏览而不是编辑. 516 | 由于浏览器的特殊性, 所以 动作+对象已经能够很好的表达浏览器里面一些常用的操作了. 网页中有一个特殊的范围m可以代表同时处理多个对象, 比如同时拷贝多个单词. 517 | 518 | 动作+(m)+对象 519 | 520 | | 动作 | 意义 | 521 | | ------------- | -------------- | 522 | | c/C | 点击click/强制在新网页打开 | 523 | | h | 悬浮hover | 524 | | d | 下载download | 525 | | y | 拷贝 | 526 | | v | select | 527 | 528 | | 对象 | 意义 | 529 | | ------------- | -------------- | 530 | | e | 网页entire | 531 | | w | 单词word | 532 | | l | 链接link | 533 | | v | 视频video | 534 | | i | 输入框input | 535 | | f | 表单form | 536 | | c | 表格的某列column | 537 | | p | 网页路径path | 538 | | t | 图片/picture被路径占用了 | 539 | 540 | 541 | ## SUI接口字母含义速记表 542 | 543 | | 顶层字符(一般和ctrl或者alt一起按下) | 意义 | 叫法 | 544 | | ------------- | -------------- | -------------- | 545 | | , | 最近 | comma/逗号 | 546 | | . | 任意 | dot/句号 | 547 | | / | 搜索 | slash/斜杆 | 548 | | ikjl | 上下左右 | 小上,小下,小左,小右 | 549 | | edsf | pgup, pgdn, home, end | 大上,大下,大左,大右 | 550 | | ctrl+azxcv | 保持不变 | | 551 | | alt+zx | 等价与ctrl和alt | | 552 | | alt+a | app层面的快捷键 | | 553 | | y | yank/拷贝 | | 554 | | Y | paste/粘贴 | | 555 | | e | edit/编辑 | | 556 | | q | quit/退出 | | 557 | | o | open/打开,新建 | | 558 | | w | window/窗口 | | 559 | | t | tab/标签 | | 560 | | s | size,change/大小变化 | | 561 | | m | move/移动 | | 562 | | d | deliver/投递 | | 563 | | b | backup/备份 | | 564 | | n | 鼠标 | | 565 | | g | goto | | 566 | | u | unique(唯一或者很常用的) | | 567 | 568 | 569 | | 第二层字符 | 意义 | 570 | | ------------- | -------------- | 571 | | v | vertical | 572 | | h | horizontal/hide | 573 | | m | maximize | 574 | | z | zen | 575 | | u | up | 576 | | d | down | 577 | | s/S | single | 578 | | n | name/new | 579 | | p | path | 580 | | d | dir | 581 | | i | info | 582 | | r | reset/reload | 583 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SUI 2 | 3 | Shortcut User interface for controlling computer and web app. 4 | 5 | [中文版本](./README_zh.md) 6 | 7 | ## Introduction 8 | 9 | SUI (Shortcut User Interface) is a shortcut user interface, which absorbs the shortcut design ideas of emacs and vim. 10 | It extracts some common and shared operations in daily use of software, and designs an easy-to-learn, easy-to-understand and easy-to-press shortcut key for these operations. 11 | 12 | SUI is currently easy to implement in the three major operating systems and major browsers. Software and Web sites that implement SUI are called SUI-compatible. 13 | 14 | ## Motivation 15 | 16 | I was a GUI user before, and one day I realized that my right hand was numb when I touched the mouse, and my left hand's pinky felt numb when I pressed ctrl, so I had to find a way to use the full keyboard to operate the computer. 17 | Full keyboard to operate the computer, the existing key specification there are three mainstream, one is emacs ctrl + x with a series of keys at the beginning, one is vim mode key, and the other is the menu button that comes with some software, which is alt+letter to goto a menu, followed by a series of buttons, or up and down to navigate the menu. 18 | 19 | These ways have their own drawbacks, emacs buttons are too long, a little more operations require three buttons, vim's mode compilation is difficult to apply to current gui software, software with the menu in the various software is not common, and can not be easily applied to the window manager and browser. 20 | 21 | Through some research and thinking, in the process of daily use of software, whether gui or tui, or website, I found that in most cases, the reason why I have to use the mouse is because there is no way to locate a window or a menu via the keyboard in some app. If you can switch between windows with shortcuts, then most of the rest of the app's functionality can be accomplished with up, down, left, right, or some other keystroke. 22 | 23 | ## SUI-related repositories (TODO) 24 | 25 | The following repositories are operating systems, applications, or web applications that implement sui. Applications that implement the basic sui interface are called sui-compatible. 26 | 27 | Some of these applications are heavily used by me, such as wezterm, browser, yazi, and neovim, which I will desensitize later. 28 | 29 | 30 | - [shortcutui/windows](https://github.com/shortcutui/windows) 31 | - [shortcutui/macos](https://github.com/shortcutui/macos) 32 | - [shortcutui/wezterm](https://github.com/shortcutui/wezterm) 33 | - [shortcutui/browser](https://github.com/shortcutui/browser) 34 | - [shortcutui/yazi](https://github.com/shortcutui/yazi) 35 | - [shortcutui/neovim](https://github.com/shortcutui/neovim) 36 | - [shortcutui/vscode](https://github.com/shortcutui/vscode) 37 | - [shortcutui/idea](https://github.com/shortcutui/idea) 38 | - [shortcutui/lazygit](https://github.com/shortcutui/lazygit) 39 | - [shortcutui/lazydocker](https://github.com/shortcutui/lazygit) 40 | - [shortcutui/tmux](https://github.com/shortcutui/tmux) 41 | 42 | ## Terminology and Key conventions 43 | 44 | In this document, a sequence of keystrokes is enclosed in parentheses, e.g. (a) means that key a was pressed on the keyboard, and (a b) means that key a was pressed first, and key b was pressed a short time later. 45 | A plus sign means that both keys were pressed at the same time, e.g. (ctrl+a) means that both ctrl and a were pressed at the same time, (ctrl+alt+a) means that both ctrl and alt were pressed at the same time, and a was pressed at the same time. Except in vim 46 | scenario, (leader+a) might mean pressing the leader key first, then pressing the a key for a short period of time. 47 | 48 | The leader key represents different keys in different applications, and the SUI categorizes them according to the characteristics of the application, with different types of applications using different keys as leader keys. 49 | The following is an example of a leader setup. The leader keys in parentheses represent the leader keys used by them 50 | 51 | - Window manager (ctrl) 52 | - Normal GUI apps (alt) 53 | - Browser or other terminal app that can connect to ssh remotely (ctrl+alt or none) 54 | - Window manager on remote terminal(alt) 55 | - Normal TUI app (none, or leader in vim mode). 56 | 57 | SUI recommends mapping right ctrl to ctrl+alt by pressing ctrl and ctrl+alt with both left and right hand palms, and mapping Capslock to one of the key combinations when pressed in conjunction with other keys. Depending on the layout of your keyboard and the distribution of your hands, you are free to choose what the leader is and how you want to press it. 58 | 59 | All SUI shortcuts are (leader+character character character character), so if the leader key is a ctrl or alt key, then when you press the character after it, the leader should be mapped to a key combination if it is released or not. 60 | If the leader key is a ctrl or alt key, then pressing the next character and releasing the leader should be mapped to the same action. In addition to the leader key, the SUI should only use numbers 0-9 and letters a-z plus a few other characters, and should avoid using uppercase letters as much as possible. 61 | It should also avoid the use of uppercase letters, and if it is necessary to use uppercase letters, it must be a natural variant of lowercase letters that have a similar or related function. 62 | 63 | Currently SUI uses only three non-alphabetic symbols in addition to the editor interface, that is comma for recently, period for arbitrary, and slash for search. 64 | 65 | `?` represents all characters in the sui that are not defined in that section, e.g., in [space-interface](#space-interface), `(space+?)` represents all characters not defined in the SUI's space interface. Generally these characters are left to be customized by the user. 66 | 67 | The keys in SUI are defined using qwerty's keyboard layout, there are a few special keys that are defined based on their position, jlik(left, right, up, down) 68 | and sfed (home, end, pageup, pagedown). For other letters, an effort is made to find the corresponding words to help memorize them. The same letter should mean the same thing in different applications. 69 | 70 | Unless otherwise specified, after pressing the first key combination, the SUI will enter a key combination mode, either briefly or permanently, which can be exited by pressing esc or q. 71 | If the mode is permanent, then ({x mode} a) means that key a is pressed in x mode, and without explanation, pressing a will perform the corresponding action without exiting x mode. 72 | 73 | SUI works well with the standard qwerty layout and the norman layout I'm using, other layouts may require some modification. 74 | 75 | ## Video Demo 76 | 77 | I recorded a [video](https://www.bilibili.com/video/BV14w4m1q7YQ/) on bilibili to illustrate some of the ways SUI works on my computer now. 78 | 79 | ## SUI interface 80 | 81 | The SUI is categorized into different interfaces depending on what the interface does, and uses a different key as the first button. The same type of interface often serves the same purpose. 82 | 83 | All interfaces are represented as (key) = value, where (key) represents the sequence of keys pressed at the keyboard, and value represents the actual output of a key or an action. 84 | 85 | - [space interface](#space-interface) 86 | - [backup interface](#backup-interface) 87 | - [mouse interface](#mouse-interface) 88 | - [editline interface](#editline-interface) 89 | - [zxcva interface](#zxcva-interface) 90 | - [uniq interface](#uniq-interface) 91 | - [fallthrough interface](#fallthrough-interface) 92 | - [open interface](#open-interface) 93 | - [quit interface](#quit-interface) 94 | - [focus interface](#focus-interface) 95 | - [goto interface](#goto-interface) 96 | - [move interface](#move-interface) 97 | - [size interface](#size-interface) 98 | - [copy&paste interface](#copy&paste-interface) 99 | - [eidtor interface](#editor-interface) 100 | 101 | ### space interface 102 | 103 | The space interface is used to map common up, down, left, right and function keys to the main keyboard area. 104 | 105 | ```clojure 106 | (space+j) = (left) 107 | (space+l) = (right) 108 | (space+i) = (up) 109 | (space+k) = (down) 110 | (space+s) = (home) 111 | (space+f) = (end) 112 | (space+e) = (pageup) 113 | (space+d) = (pagedown) 114 | 115 | (space+h) = (enter) 116 | (space+o) = (backspace) 117 | (space+.) = (delete) 118 | 119 | (space+?) = Any keystroke or action you want to customize 120 | ``` 121 | 122 | ### backup interface 123 | 124 | The backup interface is mainly used by apps that can use sui in most cases, and in some cases when sui is not available and you don't want to use the [fallthrough interface](#fallthrough-interface). 125 | 126 | ```clojure 127 | (ctrl+b j) = move to the left window or tab 128 | (ctrl+b l) = move to the right window or tab 129 | (ctrl+b i) = move to the upper window or tab 130 | (ctrl+b k) = move to the lower window or tab 131 | (ctrl+b .) = Open the application's own shortcut command window 132 | (ctrl+b q) = exit the current window 133 | (ctrl+b r) = Reload the current window 134 | 135 | (ctrl+b ?) = Any keystroke or action you customize 136 | ``` 137 | 138 | ### mouse interface 139 | 140 | This interface simulates mouse operations, and is used for special apps that don't have sui adaptations. 141 | 142 | ```clojure 143 | (ctrl+n) = enter mouse mode 144 | ({mouse mode} q) = leave mouse mode 145 | ({mouse mode} esc) = leave mouse mode 146 | 147 | ({mouse mode} j) = mouse left (mouse movement slows down and is constant when ctrl is held down) 148 | ({mouse mode} l) = mouse right (slow and constant when ctrl is held down) 149 | ({mouse mode} i) = mouse up (slow and constant speed when ctrl is held down) 150 | ({mouse mode} k) = mouse down (slow and constant speed when ctrl is held down) 151 | ({mouse mode} s) = left mouse button 152 | ({mouse mode} f) = click right mouse button 153 | ({mouse mode} e) = mouse wheel up 154 | ({mouse mode} d) = mouse wheel down 155 | 156 | ({mouse mode} n) = mouse click on the center of the window of interest, to prevent some loss of focus, then leave mouse mode 157 | ({mouse mode} x) = [click] center mouse button 158 | ({mouse mode} w) = [click] forward mouse button 159 | ({mouse mode} r) = [click] backward mouse button 160 | ({mouse mode} c) = mouse wheel left 161 | ({mouse mode} v) = mouse wheel right 162 | ({mouse mode} h) = hide mouse 163 | ({mouse mode} o) = show mouse 164 | ``` 165 | ### editline interface 166 | 167 | This interface is used to edit the contents of a line. 168 | 169 | ```clojure 170 | (ctrl+e) = enter edit mode 171 | ({edit mode} j) = delete a word forward 172 | ({edit mode} J) = move one word forward 173 | ({edit mode} l) = delete a word backward 174 | ({edit mode} L) = move backward one word 175 | ({edit mode} s) = delete forward to the beginning of the line, then leave edit mode 176 | ({edit mode} f) = delete backward to the beginning of the line, then leave edit mode 177 | ({edit mode} d) = delete the entire line and leave edit mode 178 | ({edit mode} y) = copy the line and leave edit mode 179 | ({edit mode} u) = undo 180 | ({edit mode} U) = reverse undo 181 | ({edit mode} q) = quote the word before it 182 | ({edit mode} Q) = quote the entire line 183 | ({edit mode} ,) = switch to another editline mode, when you realize that the current action doesn't work 184 | ({edit mode} ?) = user defined by self or print char then leave edit mode 185 | ``` 186 | 187 | ### zxcva interface 188 | 189 | ```clojure 190 | (ctrl+zxcva) works according to windows rules 191 | (alt+z ?) = (ctrl+?) For mac it is (cmd+?) 192 | (alt+x ?) = (alt+?) 193 | (alt+c) = Mouse wheel to the left 194 | (alt+v) = mouse wheel right 195 | (alt+a .) = Display a menu of application-level user-defined shortcuts 196 | (alt+a ?) = Application-level user-defined shortcuts 197 | ``` 198 | 199 | ### uniq interface 200 | 201 | This interface is intended for applications that have some frequently used functions that can't be categorized, or that need to be pressed all the time and aren't conveniently designed as a sequence of keys.Some shortcuts can be defined in alt a, but if you want them to be faster you can set them to the uniq interface. 202 | ```clojure 203 | (ctrl+u) = the most common, I currently give it to tts 204 | (ctrl+alt+u) = most used or unique 205 | (alt+u) = most used or unique 206 | ``` 207 | 208 | ### fallthrough interface 209 | 210 | In fallthrough mode, all keystrokes starting with the leader are output as is. That is, in window manager, after pressing ctrl+f, all shortcuts starting with control are sent to the app as is, unless control+shift+f is pressed to unlock them. This interface is designed for apps that don't yet have a sui implementation. 211 | 212 | ```clojure 213 | (leader+f) = enter fallthrough mode 214 | (leader+shift+f) = exit fallthrough mode. 215 | ``` 216 | 217 | ### open interface 218 | 219 | ```clojure 220 | (leader+o .) = Open command panel or menu 221 | (leader+o o) = most common open operations 222 | (leader+o r) = Reload configuration or restart the App 223 | (leader+o v) = open a resource in a vertical window 224 | (leader+o h) = open a resource in a horizontal window(leader+o t) = open a resource in a new tab 225 | (leader+o s c) = open app configuration 226 | (leader+o s m) = open app shortcuts 227 | (leader+o s h) = open app help 228 | (leader+o s i) = open app info panel 229 | (leader+o ?) = open user-defined resource 230 | ``` 231 | 232 | ### quit interface 233 | 234 | ```clojure 235 | (leader+q .) = Search for quit 236 | (leader+q q) = Quit current window (caps force quit) 237 | (leader+q t) = quit current tab (force quit with capitalization) 238 | (leader+q a) = exit app 239 | (leader+q u) = undo exit 240 | (leader+q s) = exit window other than the current one 241 | (leader+q S) = exit tab other than current tab 242 | 243 | (leader+q j) = quit left window 244 | (leader+q l) = quit right window 245 | (leader+q i) = quit upper window 246 | (leader+q k) = quit lower window 247 | ``` 248 | 249 | ### Focus interface 250 | 251 | ```clojure 252 | (leader+j) = focus to the left window (if there is only one window in the current tab, you can focus to the left tab or not) 253 | (leader+l) = focus on right window (if current tab has only one window, you can focus on right tab or no action) 254 | (leader+i) = focus on upper window (if current tab has only one window, focus on floating layer or no action) 255 | (leader+k) = focus on lower window (if there is only one window in the current tab, you can focus on the tiled layer or do nothing) 256 | (leader+w left) = focus on left window (if the current tab has only one window, you can focus on the left tab or nothing) 257 | (leader+w right) = focus on right window (if current tab has only one window, focus on right tab or no action) 258 | (leader+w up) = focus on upper window (if there is only one window in the current tab, you can focus on the floating layer or nothing) 259 | (leader+w down) = focus on lower window (if the current tab has only one window, you can focus on the tiled layer or no action) 260 | (leader+left) = focus on left tab 261 | (leader+right) = focus on right tab 262 | (leader+up) = focus on floating layer 263 | (leader+down) = Focus on tiled layer 264 | (leader+t left) = Focus on left tab 265 | (leader+t right) = focus on right tab 266 | (leader+w .) = search window and focus 267 | (leader+w ,) = focus on the recently window 268 | (leader+w ?) = focus on user-defined window 269 | (leader+t .) = search for tabs and focus 270 | (leader+t ,) = focus on recently tab 271 | (leader+t ?) = focus on user-defined tab 272 | (leader+d .) = search for tabs and move the current window to that tab 273 | (leader+d ?) = move the current window to the user-defined tab 274 | (leader+d left) = move the current window to the left tab 275 | (leader+d right) = move the current window to the right tab 276 | 277 | (ctrl+/) = window manager find widgets 278 | (alt+/) = app find some thing 279 | 280 | ; In many cases where there are three windows at the same time, when my focus is on one of the main windows, I can work on the other two at the same time. 281 | (shift+up) moves the cursor or window up in the second window. 282 | (shift+down) moves the cursor or window down in the second window 283 | (shift+left) moves the cursor in the second window to the left. 284 | (shift+right) Moves the cursor or window in the second window to the right. 285 | (shift+pageup) Puts the cursor or window in the third window up. 286 | (shift+pagedown) Moves the cursor or window down in the third window. 287 | (shift+home) Moves the cursor or window left in the third window. 288 | (shift+end) Turns the cursor or window in the third window to the right. 289 | ``` 290 | 291 | ### goto interface 292 | 293 | Whereas the previous operations were mainly for windows or tabs, the goto interface operates on the resource that the app is manipulating. This goto interface works on the resource that the app is working on, or the current location of the app. 294 | 295 | ```clojure 296 | (leader+g .) = Search for a resource and jump to it. 297 | (leader+g ,) = jump to the recently resource 298 | (leader+g j) = Cursor jumps back. 299 | (leader+g l) = jump forward with the cursor 300 | (leader+g d) = jump to definition 301 | (leader+g r) = jump to reference 302 | (leader+g t ?) = jump to specific user-defined resource 303 | ``` 304 | 305 | ### move interface 306 | 307 | ```clojure 308 | (leader+m j) = move the window to the left 309 | (leader+m l) = window moves to the right 310 | (leader+m i) = window moves up 311 | (leader+m k) = window moves down 312 | (leader+m left) = tab moves to the left 313 | (leader+m right) = tab moves to the right 314 | (leader+m up) = move window to floating level 315 | (leader+m down) = move window to tiled layer 316 | 317 | (leader+m f) = Toggle window to floating state 318 | ``` 319 | 320 | ### size interface 321 | 322 | ```clojure 323 | (leader+s j) = increase window to the left or decrease window to the right 324 | (leader+s j) = window decreases left or increases right 325 | (leader+s l) = window increases to the right or decreases to the left 326 | (leader+s L) = window decreases to the right or increases to the right 327 | (leader+s i) = window increases up or decreases to the right 328 | (leader+s I) = window decreases upwards or increases to the right 329 | (leader+s k) = window increases down or decreases to the right 330 | (leader+s K) = window decreases down or increases to the right 331 | 332 | (leader+s m) = toggle the window maximization state 333 | (leader+s z) = toggle window zen mode 334 | (leader+s h) = hide or minimize the window 335 | (leader+s w) = change the window name 336 | (leader+s t) = change tab name 337 | (leader+s u) = increase font or sound size 338 | (leader+s d) = decrease font or sound size 339 | (leader+s s) = resize font or sound to default size 340 | 341 | (leader+s ?) = User-defined window modification related operations 342 | ``` 343 | 344 | ### copy&paste interface 345 | 346 | f represents the resource or file associated with the current cursor or window, all resources are files. A resource or file has a path, a name and a directory. 347 | 348 | ```clojure 349 | ; General principles 350 | (leader+y y) = most common copy 351 | (leader+y n) = copy of the resource name 352 | (leader+y p) = Copy the full path of the resource. 353 | (leader+y d) = Copy the directory where the resource is located. 354 | (leader+y i) = copy all information of the resource 355 | (leader+y f) = copy resource 356 | (leader+y b) = Bookmark resource, add to bookmarks, etc. 357 | 358 | ; Window manager 359 | (ctrl+y r) = Rectangle screenshot 360 | (ctrl+y w) = Screenshot of a window. 361 | (ctrl+y l) = long screenshot (long) 362 | (ctrl+y a) = screen shot (all) 363 | (ctrl+y g) = gif screenshot (gif) 364 | (ctrl+y v) = record video 365 | (ctrl+y .) = take a screenshot of any area () 366 | 367 | ; Terminal 368 | (ctrl+alt+y w) = copy a word 369 | (ctrl+alt+y l) = copy a url 370 | (ctrl+alt+y p) = copy a path 371 | (ctrl+alt+y c) = copy a command 372 | 373 | ; Browser 374 | (ctrl+alt+y n) = copy the title 375 | (ctrl+alt+y p) = copy the URL 376 | (ctrl+alt+y d) = copy the domain name of the website 377 | (ctrl+alt+y i) = copy all information of the site 378 | 379 | (ctrl+alt+y e) = copy edit box information 380 | (ctrl+alt+y t) = copy image address 381 | 382 | (ctrl+Y t) = translate message 383 | (ctrl+Y o) = ocr processing message 384 | (ctrl+Y i) = send to im chat tool 385 | (ctrl+Y e) = send to file manager open 386 | (ctrl+Y s ?) = search for copied information (web or docs) 387 | (ctrl+Y b) = Bookmark the copied information 388 | 389 | ``` 390 | ### editor interface(TODO) 391 | 392 | ## SUI CheatSheet 393 | 394 | 395 | | top level character (usually pressed with ctrl or alt) | meaning | call | 396 | | ------------- | -------------- | -------------- | 397 | | , | recently | comma | 398 | | . | arbitrary | dot | 399 | | / | search | slash | 400 | | ikjl | up,down,left,right | small(up,down,left,right) | 401 | | edsf | pgup, pgdn, home, end | big(up,down,left,right) | 402 | | ctrl+azxcv | Remain unchanged | | 403 | | alt+zx | Equivalent to ctrl and alt | | 404 | | alt+a | Shortcuts at the app level | | 405 | | y | yank/copy | | 406 | | Y | paste | | 407 | | e | edit | | 408 | | q | quit | | 409 | | o | open/new | | 410 | | w | window | | 411 | | t | tab | | 412 | | s | size,change | | 413 | | m | move | | 414 | | d | deliver | | 415 | | b | backup | | 416 | | n | mouse | | 417 | | g | goto | | 418 | | u | unique | | 419 | 420 | | second level character | meaning | 421 | | ------------- | -------------- | 422 | | v | vertical | 423 | | h | horizontal/hide | 424 | | m | maximize | 425 | | z | zen | 426 | | u | up | 427 | | d | down | 428 | | s/S | single | 429 | | n | name/new | 430 | | p | path | 431 | | d | dir | 432 | | i | info | 433 | | r | reset/reload | 434 | 435 | --------------------------------------------------------------------------------