Linux上利用剪貼簿協助打中文的工具

input-paste的Python项目详细描述


緣起

在linux平台上,有一些桌面應用程式會遇到不能打中文的情況,像是Sublime TextSpotify

在不去對應用程式做hack的情況下(像是這個)

就只能用最簡單的copy-paste方法了

這個非常簡單的小工具就是跳出小方塊讓你輸入並自動貼上

相依性

安裝

以下示範是在debian/ubuntu上(其他版本將相依性安裝即可)

if run in python2:

$ sudo apt-get install python-gi python-xlib
$ pip install input-paste

if run in python3:

$ sudo apt-get install python3-gi python3-xlib
$ pip install input-paste

接下來,設定系統熱鍵能夠執行input-paste即可

用法

點擊應用程式輸入框並維持游標位置,叫出input-paste輸入文字後

按Enter/Ctrl+Enter就會將文字貼上游標位置,或按Esc/Alt+F4關閉input-paste


Motivation

Sometimes, we can’t type Chinese in application on Linux(or UNIX-like) system.

Without hacking it in low-level(like this), we should utilize clipboard to solve this problem.

This tool will bring convenience to you.

Dependency

Installation

Following is on debian/ubuntu system.

if run in python2:

$ sudo apt-get install python-gi python-xlib
$ pip install input-paste

if run in python3:

$ sudo apt-get install python3-gi python3-xlib
$ pip install input-paste

Next, set up hotkey in your system to execute input-paste.

Usage

Click input box in your application, and retain the cursor position.

Invoke input-paste with hotkey, and type some words in it.

Press Enter/Ctrl+Enter to copy text to your cursor position,

or press Esc/Alt+F4 to close input-paste.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Jackson递归替换匹配字段   JavaGoogleCalendarAPI共享示例   我怎样才能让Eclipse存储。在项目文件夹之外的文件夹中对文件进行分类,我将在其中存储文件。java源文件?   java无法序列化mongodb spark类   java分析的库依赖项。Net/NuGet项目与SonarQube插件   java将安卓日历导出到VCS   java Tomcat 7 war文件部署   java从方法返回泛型类型化对象。获取类<SomeType>而不是SomeType   32位和64位windows服务器上JVM的java最大堆大小   java如何在新的导航抽屉体系结构组件中实现共享应用或评级应用或注销功能   java设置richfaces4树中的默认选定节点   OneToMany的java Hibernate级联问题   java在一个文件中存储常量,并在所有活动中调用它们   java无法从teradata的结果集可靠地写入avro