Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added hotkeys ctrl+{l,t,w}

  • Loading branch information...
commit 3a4d29e04a20ddbb8b2d58d3aaf589be8b624829 1 parent 6ece47c
@carli2 authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 main.js
View
11 main.js
@@ -23,6 +23,7 @@
// Import Chromeless modules
var favicon = require("favicon");
+var hotkey = require("hotkey");
var web_content = require("web-content");
const url = require("url");
const fullscreen = require("fullscreen");
@@ -378,4 +379,14 @@ $(document).ready(function() {
// Wait for MS Windows to catch up, then toggle full screen mode
setTimeout("fullscreen.toggle(window)", 2000);
+
+ hotkey.register("accel-w", function(){
+ closeTab();
+ });
+ hotkey.register("accel-t", function(){
+ newTab();
+ });
+ hotkey.register("accel-l", function(){
+ $("#windows .selected .url_input")[0].select();
+ });
});

1 comment on commit 3a4d29e

@benfrancis

Thanks for this, I can't automatically apply this commit but I've started on the keyboard shortcuts feature based on your code webianproject@e3343a1

I couldn't get the accel-w shortcut to work though, perhaps because you need to pass clostTab() an argument?

Please sign in to comment.
Something went wrong with that request. Please try again.