From 7aa6754d04d1e747fcffb5425f56a5f9819d0e20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Aragunde=20P=C3=A9rez?= Date: Wed, 27 Feb 2013 12:50:21 +0100 Subject: [PATCH] [#164] Add alternative hotkeys: ALT + U, ALT + N, ALT + S, CTRL + S. In this way all major browsers have at least some hotkey combination available. --- docs/user/tasks.rst | 9 ++++++--- web/tasks.php | 20 ++++++++++++++++---- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/docs/user/tasks.rst b/docs/user/tasks.rst index e19ac6e9b..7e77584b0 100644 --- a/docs/user/tasks.rst +++ b/docs/user/tasks.rst @@ -132,11 +132,14 @@ Hotkeys Some hotkeys are available to increase the productivity for keyboard users: CTRL + S - Save changes. + Save changes. Some browsers don't allow to overwrite the behaviour of this + key combination (e.g. Epiphany), so you can use ALT + S instead. -CTRL + U +CTRL + N Create a new task. The cursor will be placed in the first field of the new - task. + task. Some browsers don't allow to overwrite the behaviour of this + key combination (e.g. Chrome), so you can use ALT + N, CTRL + U or ALT + U + instead. CTRL + number The cursor will be placed in the first field of the first, second, third, etc. diff --git a/web/tasks.php b/web/tasks.php index aaf63ec07..e9bbd5bfe 100644 --- a/web/tasks.php +++ b/web/tasks.php @@ -1152,16 +1152,28 @@ function saveTasks() { key: 's', ctrl: true, stopEvent: true, - handler: function () { - saveTasks(); - } + handler: saveTasks, + }); + new Ext.KeyMap(document, { + //alternate shortcut for Epiphany + key: 's', + alt: true, + stopEvent: true, + handler: saveTasks, }); new Ext.KeyMap(document, { - key: 'u', + key: 'un', ctrl: true, stopEvent: true, handler: newTask }); + new Ext.KeyMap(document, { + //alternate shortcut for Epiphany + key: 'un', + alt: true, + stopEvent: true, + handler: newTask + }); new Ext.KeyMap(document, { key: '123456789', ctrl: true,