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

兰州拼团网站建设群晖nas建设网站

兰州拼团网站建设,群晖nas建设网站,上海集锦信息科技有限公司,搜索引擎优化的方法最近给Firefox这一快捷键坑了几次。恰好发现在CMU也有人遇到类似的烦恼,找到一篇基于Linux的教程。 我使用的是Windows,所以根据自己的情况做了些修改,成功了。小众需求就犯懒直接将笔记贴上了,如果有谁用得上的话,我写…

最近给Firefox这一快捷键坑了几次。恰好发现在CMU也有人遇到类似的烦恼,找到一篇基于Linux的教程。
我使用的是Windows,所以根据自己的情况做了些修改,成功了。小众需求就犯懒直接将笔记贴上了,如果有谁用得上的话,我写个中文版。

Disabling the Ctrl-W shortcut on Firefox

Many vim users use ctrl-w to delete a word. Unfortunately on Firefox, this closes the current tab. So if you’re editing a text area / filling out a form you may accidentally close the tab.

There’s no option to change or disable default keyboard shortcuts (Firefox 98, 2022-03-29 // Firefox 117依然不支持). So if you want to do it, you need to edit files manually.

To disable ctrl-w shortcut in Firefox, you need to manually edit the file:

  • /usr/lib/firefox/browser/omni.ja (Linux) .
  • "/c/Program Files/Mozilla Firefox/browser/omni.ja" (Windows)

Modify the File

Run git bash in administration mode.

First unzip it to a temporary directory:

mkdir /tmp/firefox-omni
cd /tmp/firefox-omni
unzip "/c/Program Files/Mozilla Firefox/browser/omni.ja"

Now you need to edit ./chrome/browser/content/browser/browser.xhtml to make your changes. You can change as many shortcuts as you want here. The ctrl-w key is called close-shortcut. You can either

  • comment out the offending line, or
  • change modifiers="accel,shift" to require ctrl-shift-w to close tabs.

Note, the above instructions only make Ctrl-W an unreserved shortcut. This means extensions can now remap it. If you don’t have any extensions that remap it then Ctrl-W will still close your current window.

If you’d like to simply disable Ctrl-W, then just comment out the above shortcut definitions entirely (instead of only changing reserved="true" to reserved="false" as I suggest above).

Here is how to comment it out:

<key id="key_close" data-l10n-id="close-shortcut" command="cmd_close" modifiers="accel" reserved="true"/>

Now switch to root, and install your changes:

cd /tmp/firefox-omni
zip -0DXqr /tmp/omni.ja * # I have install `zip` into DELL
cd "/c/Program Files/Mozilla Firefox/browser"cp ./omni.ja ./omni.ja.bkup # backupcp /tmp/omni.ja ./omni.ja # TOCHECK: if the first path is correct
rm -r /tmp/omni.ja /tmp/firefox-omni

Clear Firefox Start Cache and Restart

In URI panel, enter about:support

Click “Clear startup cache…” on the right, and click restart. (opened pages won’t be lost)

Done🍺

Note: You will have to do this every time you reinstall firefox. I automated the above into a script. First save firefox-omni.patch as ~/local/src/firefox-omni.patch, and then download and run this script as a normal users (that has sudo privileges).

Reference

https://www.math.cmu.edu/~gautam/sj/blog/20220329-firefox-disable-ctrl-w.html

http://www.yayakq.cn/news/535218/

相关文章:

  • 网站建设收费标准案例百度 网站添加
  • 手机端网站开发框架宜飞思工业设计网站
  • 电子商务网站建设调查问卷网站开发的税率是多少
  • 网站怎么做rsswordpress按分类显示图片
  • 免费商城自助建站上海网站推广服务
  • 腾讯广告建站工具电商网站增加客户
  • 做外链一定要淘宝网站吗中国建筑企业500强排名
  • 如何看网站做打好坏网站开发资质要求
  • 美的企业微信网站短视频平台
  • 受欢迎的汕头网站推广网站内容的编辑和更新怎么做的
  • wordpress ip 改变乐云seo商城网站建设
  • 池州网站seoh5制作方法和步骤
  • 宣城网站开发百度推广建站平台
  • 电子商务的网站怎么做网站建设的界面风格有哪些
  • 用ps做网站画布一般建多大app价格表
  • 安徽省建设工程协会网站个人网站赚钱
  • wordpress 侧边栏错位seo关键词优化公司官网
  • 北京城乡住房建设部网站wordpress会员内容
  • 西城区网站建设PHP做网站的核心是什么
  • 超值的镇江网站建设小红书推广引流收费
  • 网站pv统计方法wordpress开启icon
  • 公司网站抬头用什么软件做wordpress的图片代码是什么
  • 网站后台怎么给图片做水印wordpress 招聘插件
  • html网站的直播怎么做的网页设计与制作实训总结3000字
  • 网站建设 营业执照 经营范围外国平面设计网站有哪些
  • 个人网站建设完整教程学编程要什么学历
  • 永州网站建设多少钱龙华住房与建设局网站
  • 网站设计任务书范文网站建设什么软件
  • 开发网站需要哪些技术怎么做百度自己的网站
  • 做家常便饭网站wordpress登陆phpadmin