我可以按鍵盤上的數字“7”並使其插入“字串”而不是“7”嗎?

我可以按鍵盤上的數字“7”並使其插入“字串”而不是“7”嗎?

我正在使用 centos linux 6.4 桌面(最小桌面),我正在尋找一個解決方案,以便當我按下鍵盤上的數字“7”時。

它將插入一個字串而不是“7”...

the numbers on the right side of my keyboard are never used.
i need to make them become strings so i can use them to speed things up.

is there a software, or a program ? that can help me customize my keyboard?

答案1

  1. 安裝xvkbd

  2. 建立一個與此類似的腳本:

#

#!/bin/bash
sleep 0.5
xvkbd -text "some string"

您可能想要調整,sleep 0.5但如果您忽略它,按下的鍵將阻礙整個字串的輸入。

  1. 建立鍵盤快速鍵來啟動腳本。請注意,如果您的主資料夾中有該腳本,則必須將其硬編碼為bash /home/USER/folder/script.sh,bash ~/folder/script.sh不起作用(至少與基於 Ubuntu 的發行版中的情況類似)。數字鍵盤上的“7”應為“KP_Home”,因此與數字7的輸入不應衝突。

這個設定在 Linux Mint 上適用於我。

相關內容