Home
Categories
WIKI
Topic
User
LANGUAGE:
中文
English
手动编译deepin-terminal交换右键和中键,实现右键粘贴功能
Experiences and Insight
696
views ·
0
replies ·
To
floor
Go
186******70
deepin
2020-07-28 18:23
Author
本帖最后由 yar999 于 2020-7-28 10:55 编辑
虽然 deepin-terminal 提供了选中复制的功能,但是习惯了putty下的右键粘贴功能,实在不想 ctrl+shift+v 粘贴。而且右键弹出菜单之后再粘贴更影响效率,所以决定重新编译 deepin-terminal
## 安装编译 deepin-terminal 的依赖
sudo apt build-dep deepin-terminal
Copy the Code
## 下载源码包
mkdir -p ~/src/deepin-terminal
cd ~/src/deepin-terminal
apt source deepin-terminal
Copy the Code
## 修改 `deepin-terminal-5.0.4.1/widget/terminal.vala`
187~195 行:
case Gdk.BUTTON_SECONDARY:
// Grab focus terminal first.
focus_term();
uri_at_right_press = uri;
show_menu((int) event.x_root, (int) event.y_root);
return false;
}
Copy the Code
修改为:
case Gdk.BUTTON_MIDDLE:
// Grab focus terminal first.
focus_term();
uri_at_right_press = uri;
show_menu((int) event.x_root, (int) event.y_root);
return false;
case Gdk.BUTTON_SECONDARY:
focus_term();
term.paste_clipboard();
return false;
}
Copy the Code
## 重新编译然后安装
cd deepin-terminal-5.0.4.1
dpkg-buildpackage -us -uc -b
cd ..
dpkg -i deepin-terminal*.deb
Copy the Code
## 标记 `deepin-terminal deepin-terminal-dbgsym` 不升级
sudo apt-mark hold deepin-terminal deepin-terminal-dbgsym
Copy the Code
Reply
Like 0
Favorite
View the author
All Replies
No replies yet
Please
sign
in first
Featured Collection
Change
[Tutorial] deepin25 WSL Offline Installation Guide
UOS AI 2.8 Released! Three New Intelligent Agents & Major Evolution
Solid Q&A | deepin 25 Common Questions – The Immutable System Edition
New Thread
Popular Events
More
虽然 deepin-terminal 提供了选中复制的功能,但是习惯了putty下的右键粘贴功能,实在不想 ctrl+shift+v 粘贴。而且右键弹出菜单之后再粘贴更影响效率,所以决定重新编译 deepin-terminal
## 安装编译 deepin-terminal 的依赖
187~195 行: