allancl
小狐狸
小狐狸
  • UID49322
  • 注册日期2015-03-11
  • 最后登录2019-05-14
  • 发帖数6
  • 经验6枚
  • 威望0点
  • 贡献值4点
  • 好评度0点
  • 社区居民
阅读:1803回复:6

keyconfig 鼠标左键的求助!

楼主#
更多 发布于:2016-07-05 14:16
能否有这样的功能:用键盘上的任意一个字母键来代替鼠标左键的点击。
这样的话可以使得鼠标移动到任意链接上不用鼠标左键点击来打开网页上的链接,而用键盘上的字母键来点击,这样可以减缓右手的僵硬。。。。

我也知道WINDOWS的轻松访问用小键盘来代替鼠标键,但是小键盘上的键我在keyconfig已经分配完了,轻松访问不能设置成左边的字母键来代替。

找了好久都没有这样的代码,哪位能人能够帮助,谢谢啊!!
allancl
小狐狸
小狐狸
  • UID49322
  • 注册日期2015-03-11
  • 最后登录2019-05-14
  • 发帖数6
  • 经验6枚
  • 威望0点
  • 贡献值4点
  • 好评度0点
  • 社区居民
1楼#
发布于:2016-07-08 13:56
hill:keyconfig从启ff的代码是什么?
我之前的不起作用了。
回到原帖
const nsIAppStartup = Components.interfaces.nsIAppStartup;  
  
// Notify all windows that an application quit has been requested.  
var os = Components.classes["@mozilla.org/observer-service;1"]  
.getService(Components.interfaces.nsIObserverService);  
var cancelQuit = Components.classes["@mozilla.org/supports-PRBool;1"]  
  
.createInstance(Components.interfaces.nsISupportsPRBool);  
os.notifyObservers(cancelQuit, "quit-application-requested", null);  
  
// Something aborted the quit process.  
if (cancelQuit.data)  
return;  
  
// Notify all windows that an application quit has been granted.  
os.notifyObservers(null, "quit-application-granted", null);  
  
// Enumerate all windows and call shutdown handlers  
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]  
.getService(Components.interfaces.nsIWindowMediator);  
var windows = wm.getEnumerator(null);  
while (windows.hasMoreElements()) {  
var win = windows.getNext();  
if (("tryToClose" in win) && !win.tryToClose())  
return;  
}  
Components.classes["@mozilla.org/toolkit/app-startup;1"].getService(nsIAppStartup)  
.quit(nsIAppStartup.eRestart | nsIAppStartup.eAttemptQuit);
游客

返回顶部