From 231a524438af78b96042ae293b2021b1f43f9ab7 Mon Sep 17 00:00:00 2001 From: Evan Tschuyi Date: Wed, 13 Jul 2016 22:14:03 -0700 Subject: [PATCH 1/4] allow users to disable the alt+%d buffer switching --- index.html | 10 ++++++++++ js/glowingbear.js | 1 + js/inputbar.js | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 4e3f262..fb61c67 100644 --- a/index.html +++ b/index.html @@ -484,6 +484,16 @@ npm run build-electron-{windows, darwin, linux} +
  • +
    +
    + +
    +
    +
  • -
  • +
  • From e17fce6f6d32b63cc0dd953cbe3a2886a5d66b67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20H=C3=BCbschle-Schneider?= Date: Mon, 6 Mar 2017 15:34:45 +0100 Subject: [PATCH 3/4] Rename setting for consistency --- index.html | 2 +- js/glowingbear.js | 2 +- js/inputbar.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 8ba0c32..64b45b6 100644 --- a/index.html +++ b/index.html @@ -488,7 +488,7 @@ npm run build-electron-{windows, darwin, linux}
    diff --git a/js/glowingbear.js b/js/glowingbear.js index 4a71cad..4a6a33c 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -44,7 +44,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', 'readlineBindings': false, 'enableJSEmoji': (utils.isMobileUi() ? false : true), 'enableMathjax': false, - 'enableAltSwitcher': true, + 'enableQuickKeys': true, 'customCSS': '', "currentlyViewedBuffers":{}, }); diff --git a/js/inputbar.js b/js/inputbar.js index db85a10..90ed779 100644 --- a/js/inputbar.js +++ b/js/inputbar.js @@ -247,7 +247,7 @@ weechat.directive('inputBar', function() { $scope.iterCandidate = null; // Left Alt+[0-9] -> jump to buffer - if ($event.altKey && !$event.ctrlKey && (code > 47 && code < 58) && settings.enableAltSwitcher) { + if ($event.altKey && !$event.ctrlKey && (code > 47 && code < 58) && settings.enableQuickKeys) { if (code === 48) { code = 58; } From f4db7c26477c75f8c9c16b886fafd1ea57f1532e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20H=C3=BCbschle-Schneider?= Date: Mon, 6 Mar 2017 15:40:11 +0100 Subject: [PATCH 4/4] Don't show quick keys if they're disabled --- js/inputbar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/inputbar.js b/js/inputbar.js index 90ed779..c77bcf4 100644 --- a/js/inputbar.js +++ b/js/inputbar.js @@ -480,7 +480,7 @@ weechat.directive('inputBar', function() { } // Alt key down -> display quick key legend - if ($event.type === "keydown" && code === 18 && !$event.ctrlKey && !$event.shiftKey) { + if ($event.type === "keydown" && code === 18 && !$event.ctrlKey && !$event.shiftKey && settings.enableQuickKeys) { $rootScope.showQuickKeys = true; } };