Giter Site home page Giter Site logo

vimouse's Introduction

重构 Vimouse

参考项目: https://github.com/firemakergk/vimouse

Vimouse 希望能够像 vim 编辑器一样操作鼠标。 我修改并使用了一段时间由 firemakergk 开源的 Vimouse, firemakergk 的 Vimouse 很棒,可以使用 vim 中移动光标的方式移动鼠标,使用特殊的按键组合实现不同的移 动速度,并且可以模拟鼠标的点击,鼠标移动流畅,并且使用 PyQt 实现了一个可配置的用户界面。

但是该项目有一些不足之处,例如 只支持了 Vim 中少量的操作,图形配置界面可配置内容较少,并且我并不需要图形 界面进行配置,由于图形库的加入,打包体积也变得庞大。有些按键映射和 vim 有所冲突等。

于是我参考 Vimouse 的源码,重构了一个更符合我自身需求的 Vimouse, 它更加强大小巧,并且也更易于扩展,感 谢 firemakergk 提供的创意和灵感 ^_^

1、如何使用

以下仅列举出以实现的功能,这些功能往往是在操作鼠标时提供效率所需要的,这些功能大部分来自于 Vim 中的操作习惯, 并且其中大部分映射是可配置的。

  • 启动, 运行程序后 Vimouse 默认使用插入模式,不监听按键,使用 caps lock 切换到普通模式,使用它是 因为我本人觉得 该键作用不大,并且我没有找到合适的按键,注意该键不可配置,如下修改则需要修改代码重新打包...

  • 标签功能,使用 m 触发 标记(mark),Vimouse 会把鼠标当前所在位置记录在标签中,使用 ' 或者 ` 将跳转到相应标签;

  • 移动功能,使用 j k h l 进行鼠标的移动,类似 Vim;

  • 翻页/滚动功能,使用 ctrl-b ctrl-f 或者 alt-j alt-k 进行翻页或者鼠标滚轮的滚动功能;

  • 点击功能,使用 entry 键点击鼠标左键,使用 alt-entry 组合键点击鼠标右键,使用 ctrl-entry 组合键表示点击鼠标中键,这样配置是考虑到不同按键使用的频率不同。

  • 速度调节功能,使用 a 调节鼠标的移速,在 Vimouse 中这设置了三档速度,它们分别是 25, 23, 21 个单位,这样设计是考虑到鼠标移动定位的过程是由快到慢的,并且其速度变化 类似指数变化,这样能使得鼠标定位过程更加平滑,a 键会在三个移动速度间切换,由于只有三档的速度,在不同挡位 切换比较轻松。 也可以使用 alt-a 将移动速度调整到最大,使用 ctrl-a 将移动速度调整到最小;

  • 插入功能, 使用 i 键暂时回到普通输入模式, 使用 caps lock 回到普通模式;

  • 选择功能, 使用 v 键进入可视模式,该模式下继续移动指针,再次按下 v 键,两次按下的位置形成的矩 形框中的内容将被选中。

2、配置

开发中......

3、原理

更新中......

4、 Q & A

更新中......

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.