diff --git a/css/glowingbear.css b/css/glowingbear.css index 44eb0f7..28f8d42 100644 --- a/css/glowingbear.css +++ b/css/glowingbear.css @@ -327,16 +327,18 @@ table.notimestampseconds td.time span.seconds { } #sidebar .showquickkeys .buffer .buffer-quick-key { - transition:all linear 1s; - -webkit-transition:all ease-out 1s; + transition: all ease 0.5s; + -webkit-transition: all ease 0.5s; + transition-delay: 0.2s; + -webkit-transition-delay: 0.2s; opacity: 0.7; } #sidebar .buffer .buffer-quick-key { - margin-left: -0.8em; + margin-left: -0.7em; margin-right: -0.2em; font-size: smaller; - transition:all linear 2s; - -webkit-transition:all ease-in 2s; + transition: all ease 0.5s; + -webkit-transition: all ease 0.5s; opacity: 0; text-shadow: -1px 0px 4px rgba(255, 255, 255, 0.4), 0px -1px 4px rgba(255, 255, 255, 0.4), diff --git a/js/inputbar.js b/js/inputbar.js index f82b198..73ec3cf 100644 --- a/js/inputbar.js +++ b/js/inputbar.js @@ -362,9 +362,16 @@ weechat.directive('inputBar', function() { $event.preventDefault(); return true; } + // Alt key down -> display quick key legend - if ($event.type === "keydown" && code === 18) { + if ($event.type === "keydown" && code === 18 && !$event.ctrlKey && !$event.shiftKey) { $rootScope.showQuickKeys = true; + } + }; + + $rootScope.handleKeyRelease = function($event) { + // Alt key up -> remove quick key legend + if ($event.keyCode === 18) { if ($rootScope.quickKeysTimer !== undefined) { clearTimeout($rootScope.quickKeysTimer); } @@ -374,18 +381,10 @@ weechat.directive('inputBar', function() { $rootScope.$apply(); } delete $rootScope.quickKeysTimer; - }, 3000); + }, 1000); return true; } }; - $rootScope.handleKeyRelease = function($event) { - // Alt key up -> remove quick key legend - if ($event.keyCode === 18) { - if ($rootScope.showQuickKeys) { - $rootScope.showQuickKeys = false; - } - } - }; }] }; });