From 1ba1698703ed3ff87bb10a62dcaca32d75db9db7 Mon Sep 17 00:00:00 2001 From: Tor Hveem Date: Thu, 13 Oct 2016 14:16:24 +0200 Subject: [PATCH] Implement alt-h. Fixes #832 --- index.html | 1 + js/inputbar.js | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/index.html b/index.html index 62e0616..caceef5 100644 --- a/index.html +++ b/index.html @@ -151,6 +151,7 @@
  • ALT-a: Focus on next buffer with activity
  • ALT-<: Switch to previous active buffer
  • ALT-g: Focus on buffer list filter
  • +
  • ALT-h: Clear unread counters in every buffer (locally)
  • Esc-Esc: Disconnect (double-tap)
  • Arrow keys: Navigate history, or navigate quick search buffer results.
  • Tab: Complete nick
  • diff --git a/js/inputbar.js b/js/inputbar.js index a4fc48b..43839d0 100644 --- a/js/inputbar.js +++ b/js/inputbar.js @@ -357,6 +357,15 @@ weechat.directive('inputBar', function() { return true; } + // Alt-h -> Toggle all as read + if ($event.altKey && !$event.ctrlKey && key === "KeyH" ) { + var buffers = models.getBuffers(); + _.each(buffers, function(buffer) { + buffer.unread = 0; + buffer.notification = 0; + }); + } + var caretPos; // Arrow up -> go up in history