diff --git a/index.html b/index.html index 682c5e9..9d36cea 100644 --- a/index.html +++ b/index.html @@ -115,7 +115,7 @@
  • ALT-a: Focus on next buffer with activity
  • ALT-<: Switch to previous buffer
  • ALT-g: Focus on buffer list filter
  • -
  • escape: disconnect
  • +
  • Esc: disconnect
  • arrow keys: history navigation
  • diff --git a/js/glowingbear.js b/js/glowingbear.js index 79cf886..32cbb6c 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -915,6 +915,10 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', } } }; + // Helper function since the keypress handler is in a different scope + $rootScope.toggleNicklist = function() { + $scope.nonicklist = !$scope.nonicklist; + } $scope.handleSearchBoxKey = function($event) { @@ -1103,7 +1107,7 @@ weechat.directive('inputBar', function() { // Left Alt+n -> toggle nicklist if ($event.altKey && !$event.ctrlKey && code === 78) { $event.preventDefault(); - $scope.nonicklist = !$scope.nonicklist; + $rootScope.toggleNicklist(); return true; }