当前位置: 首页 > news >正文

使用gsettings修改命令ubuntu快捷键

ubuntu中除了使用界面修改键盘快捷键外,还可以使用命令行修改键盘快捷键.

一种方式为使用gsettings修改键盘快捷键.

1. 在目录/usr/share/gnome-control-center/keybindings中,可以找到一组xml配置文件

2.  该文件包含一组节点, 该节点与界面操作键盘快捷键(system settings-> keyboard->shortcuts)一一对应.

?xml version="1.0" encoding="UTF-8"?>
<KeyListEntries wm_name="Compiz" schema="org.gnome.desktop.wm.keybindings" package="compiz" group="system" name="Windows">

<KeyListEntry name="activate-window-menu" description="Activate the window menu"></KeyListEntry>

<KeyListEntry name="toggle-fullscreen" description="Toggle fullscreen mode"></KeyListEntry>

<KeyListEntry name="toggle-maximized" description="Toggle maximization state"></KeyListEntry>

<KeyListEntry name="maximize" description="Maximize window"></KeyListEntry>

<KeyListEntry name="unmaximize" description="Restore window"></KeyListEntry>

<KeyListEntry name="toggle-shaded" description="Toggle shaded state"></KeyListEntry>

<KeyListEntry name="close" description="Close window"></KeyListEntry>

<KeyListEntry name="minimize" description="Minimize window"></KeyListEntry>

<KeyListEntry name="begin-move" description="Move window"></KeyListEntry>

<KeyListEntry name="begin-resize" description="Resize window"></KeyListEntry>

<KeyListEntry name="raise" description="Raise window above other windows"></KeyListEntry>

<KeyListEntry name="lower" description="Lower window below other windows"></KeyListEntry>

<KeyListEntry name="maximize-vertically" description="Maximize window vertically"></KeyListEntry>

<KeyListEntry name="maximize-horizontally" description="Maximize window horizontally"></KeyListEntry>

</KeyListEntries>

3. 使用gsettings设置Alt-F4不关闭界面.

  gsettings list-keys  org.gnome.desktop.wm.keybindings 

罗列出所有按键

4. 获取"close"关闭界面的快捷键.

gsettings get  org.gnome.desktop.wm.keybindings close

5. 设置"close"关闭界面快捷键.

gsettings set  org.gnome.desktop.wm.keybindings close "[]"

此时Alt-F4将不起效果.

6. 如果想恢复默认快捷键.

gsettings reset org.gnome.desktop.wm.keybindings close

此时Alt-F4将关闭快捷键.

http://www.dtcms.com/a/395365.html

相关文章:

  • Linux线程互斥与同步
  • 【AI扣子生成测试用例】自动生成测试用例工作流
  • Hive建表实战
  • Ethernaut Level 5: Token - 整数下溢攻击详解
  • 正向代理 vs 反向代理
  • SNN论文阅读——spikformer
  • 【论文阅读】Robix:机器人交互、推理与规划的统一模型
  • 【论文阅读】AutoDrive-R^2: 激励自动驾驶VLA模型的推理与自我反思能力
  • [UnrealEngine] 虚幻引擎UE5下载及安装(UE4、UE5)
  • AI原生安全架构的提出与落地路径:来自南凌科技的实践观察
  • ELK企业级日志分析系统
  • EasyDSS一站式点播方案如何提升企业视频门户的用户体验?
  • MARSIM仿真平台部署安装及FUEL部署-Ubuntu20.04
  • 16-留言板案例
  • ubuntu22.04配置ip
  • VMware ubuntu开机后黑屏
  • ubuntu运行项目:音乐解锁-unlock-music-master,安装依赖报错问题
  • vim操作
  • 【AI编程】四大规范驱动开发Spec工具助力AI编程从“即兴创作“向“工程化“转变
  • IDEA中print(“)输出中文乱码
  • 一站式报修软件:破解高校、物业等机构报修难题的高效方案
  • mobaxterm解决无法在vim中复制
  • 深度解析 CUDA-QX 0.4 加速 QEC 与求解器库
  • 深度解析通义DeepResearch:阿里开源的300亿参数深度研究智能体
  • 关于OpenCV无法进行h264视频转码的问题
  • KingbaseES 四维操控:索引、视图、用户与事务的实战密码
  • 大模型强化学习-PPO应用
  • 惠普打印机连接电脑完整指南:方法与故障排除
  • 轻松加载外部Jar,实现SpringBoot功能灵活扩展
  • MCGS COM口MODBUS转发