Add a shortcut to open a new tab

This commit is contained in:
Florian Mounier
2015-10-12 17:50:21 +02:00
parent 7b5a4ee244
commit 71820849eb
5 changed files with 16 additions and 3 deletions

View File

@@ -22,6 +22,7 @@ Butterfly is a xterm compliant terminal built with python and javascript.
{strong}[Alt] + [a] : {reset}Set an alarm which sends a notification when a modification is detected. (Ring on regexp match with [Shift])
{strong}[Alt] + [s] : {reset}Open theme selection prompt. Use [Alt] + [Shift] + [s] to refresh current theme.
{strong}[Alt] + [e] : {reset}List open user sessions. (Only available in secure mode)
{strong}[Alt] + [o] : {reset}Open new terminal (As a popup)
{strong}[Alt] + [z] : {reset}Escape: don't catch the next pressed key.
Useful for using native search for example. ([Alt] + [z] then [Ctrl] + [f]).

View File

@@ -157,6 +157,14 @@
}
});
document.addEventListener('keydown', function(e) {
if (!(e.altKey && e.keyCode === 79)) {
return true;
}
open(location.href);
return cancel(e);
});
Popup = (function() {
function Popup() {
this.el = document.getElementById('popup');

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,4 @@
document.addEventListener 'keydown', (e) ->
return true unless e.altKey and e.keyCode is 79
open(location.href)
cancel e