Merge pull request #908 from lorenzhs/altoption
Allow users to disable the alt+%d buffer switching
This commit is contained in:
commit
5ed67d871f
3 changed files with 13 additions and 2 deletions
10
index.html
10
index.html
|
@ -484,6 +484,16 @@ npm run build-electron-{windows, darwin, linux}</pre>
|
|||
</div>
|
||||
</form>
|
||||
</li>
|
||||
<li class="desktop">
|
||||
<form class="form-inline" role="form">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" ng-model="settings.enableQuickKeys">
|
||||
Use Alt+[0-9] to switch buffers
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
|
|
@ -44,6 +44,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
|
|||
'readlineBindings': false,
|
||||
'enableJSEmoji': (utils.isMobileUi() ? false : true),
|
||||
'enableMathjax': false,
|
||||
'enableQuickKeys': true,
|
||||
'customCSS': '',
|
||||
"currentlyViewedBuffers":{},
|
||||
});
|
||||
|
|
|
@ -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)) {
|
||||
if ($event.altKey && !$event.ctrlKey && (code > 47 && code < 58) && settings.enableQuickKeys) {
|
||||
if (code === 48) {
|
||||
code = 58;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue