Subject: Fix for issue RM1336 [pgadmin4]

From: Harshal Dhumal <[email-masked]>
Date: Thu, 16 Jun 2016 15:58:38 +0530

Hi,

PAF patch for issue RM1336

Changes: Added keyboard shortcuts (static/non configurable) to some query
tool operations.

Execute  -->   Ctrl + Shift + E
Explain  -->    Ctrl + Shift + X
Explain analyze  -->   Ctrl + Shift + A

Note: Keyboard shortcuts do not work if focus is set on any disabled button
inside query tool or out side the query tool.

-- 
*Harshal Dhumal*
*Software Engineer*

EnterpriseDB India: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git a/web/pgadmin/tools/datagrid/templates/datagrid/index.html b/web/pgadmin/tools/datagrid/templates/datagrid/index.html
index 43510cd..bde3757 100644
--- a/web/pgadmin/tools/datagrid/templates/datagrid/index.html
+++ b/web/pgadmin/tools/datagrid/templates/datagrid/index.html
@@ -61,7 +61,7 @@ body {
             </select>
           </div>
           <div class="btn-group" role="group" aria-label="">
-            <button id="btn-flash" type="button" class="btn btn-default" style="width: 40px;" title="{{ _('Execute/Refresh') }}">
+            <button id="btn-flash" type="button" class="btn btn-default" style="width: 40px;" title="{{ _('Execute/Refresh (Ctrl+Shift+E)') }}">
               <i class="fa fa-bolt" aria-hidden="true"></i>
             </button>
             <button id="btn-query-dropdown" type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
@@ -70,12 +70,12 @@ body {
             <ul class="dropdown-menu dropdown-menu">
               <li>
                 <a id="btn-explain" href="#">
-                  <span>{{ _('Explain') }}</span>
+                  <span>{{ _('Explain (Ctrl+Shift+X)') }}</span>
                 </a>
               </li>
               <li>
                 <a id="btn-explain-analyze" href="#">
-                    <span>{{ _('Explain analyze') }}</span>
+                    <span>{{ _('Explain analyze (Ctrl+Shift+A)') }}</span>
                 </a>
               </li>
               <li class="divider"></li>
diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
index 60c4ee4..9c9514f 100644
--- a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
+++ b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
@@ -175,7 +175,8 @@ define(
         "click #btn-explain-costs": "on_explain_costs",
         "click #btn-explain-buffers": "on_explain_buffers",
         "click #btn-explain-timing": "on_explain_timing",
-        "change .limit": "on_limit_change"
+        "change .limit": "on_limit_change",
+        "keyup": "keyAction"
       },
 
       // This function is used to render the template.
@@ -1010,6 +1011,25 @@ define(
             self,
             self.handler
         );
+      },
+
+      // Callback for keyboard event
+      keyAction: function(ev) {
+        if(ev.ctrlKey && ev.shiftKey) {
+          if(ev.keyCode == 69) {
+            // char e/E
+            // Execute query.
+            this.on_flash(ev);
+          } else if(ev.keyCode == 88){
+            // char x/X
+            // Explain query.
+            this.on_explain(ev);
+          } else if(ev.keyCode == 65) {
+            // char a/A
+            // Explain analyze query.
+            this.on_explain_analyze(ev);
+          }
+        }
       }
     });

-- 
Sent via pgadmin-hackers mailing list ([email-masked])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

---

From: Dave Page <[email-masked]>
Date: Thu, 16 Jun 2016 11:33:37 +0100

Hi,

Can we not make them compatible with pgAdmin 3? Ctrl + Shift + E is
significantly less convenient than F5.

On Thu, Jun 16, 2016 at 11:28 AM, Harshal Dhumal
<[email-masked]> wrote:
> Harshal Dhumal
> Software Engineer

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

---

From: Harshal Dhumal <[email-masked]>
Date: Thu, 16 Jun 2016 16:10:32 +0530

Hi Dave,

Ok, I'll change shortcut keys

New shortcuts would be:

Execute  -->   F5
Explain  -->    F7
Explain analyze  --> Shift+F7

-- 
*Harshal Dhumal*
*Software Engineer*

---

From: Dave Page <[email-masked]>
Date: Thu, 16 Jun 2016 11:42:54 +0100

Thanks!

---

From: Harshal Dhumal <[email-masked]>
Date: Thu, 16 Jun 2016 16:17:39 +0530

Hi Dave,

Function keys won't work properly with browser as they already have
predefined bindings.

e.g.

F5 for refresh (standard)
F7 for Caret Browsing in firefox

-- 
*Harshal Dhumal*
*Software Engineer*

---

From: Dave Page <[email-masked]>
Date: Thu, 16 Jun 2016 11:49:00 +0100

Hi

Hmm, I guess that's system dependent. What about Ctrl+F5? Or we bite
the bullet and make it configurable.

On Thu, Jun 16, 2016 at 11:47 AM, Harshal Dhumal
<[email-masked]> wrote:
> On Thu, Jun 16, 2016 at 4:10 PM, Harshal Dhumal

---

From: Harshal Dhumal <[email-masked]>
Date: Thu, 16 Jun 2016 16:44:21 +0530

Hi,

As per my offline discussion with Ashesh; He is suggesting not to use
Function keys as shortcuts.

And regarding configurable key options, I suspect It is going to be time
consuming task, please let me know if you want me to start working it. Or
can we keep current shortcuts from my last patch?

---

From: Dave Page <[email-masked]>
Date: Thu, 16 Jun 2016 12:40:10 +0100

> Function keys as shortcuts.

Why? That is primarily what they are on the keyboard for.

> can we keep current shortcuts from my last patch?

Surely we can come up with some simple ones that will be intuitive and work?

---

From: Ashesh Vashi <[email-masked]>
Date: Thu, 16 Jun 2016 19:58:09 +0530

> Why? That is primarily what they are on the keyboard for.
F5 is always bind to refresh function of the browser on linux & windows.
Similarly - many shortcuts of browser are bound to the function keys.

Hence - I asked not to use F5.

> >> >>> > Changes: Added keyboard shortcuts (static/non configurable) to
> some
> >> >>> > query
> >> >>> > tool operations.
> >> >>> >
> >> >>> > Note: Keyboard shortcuts do not work if focus is set on any
> disabled
> >> >>> > button

---

From: Dave Page <[email-masked]>
Date: Thu, 16 Jun 2016 15:33:14 +0100

> Hence - I asked not to use F5.

I suggested Ctrl+F5.

---

From: Harshal Dhumal <[email-masked]>
Date: Mon, 20 Jun 2016 15:15:37 +0530

Hi Dave,

I tried to find unique shortcuts keys combination using function keys on
different platforms (windows, mac, linux ) but no success. Any combination
of function keys with either of (or some of them together) Alt, Ctrl, Shift
conflict with either browser functionality or with window functionality
(like resize, move, minimize, maximize etc).

And regarding Ctrl+F5, it is for hard refresh on some browsers.

-- 
*Harshal Dhumal*
*Software Engineer*

---

From: Dave Page <[email-masked]>
Date: Mon, 20 Jun 2016 13:05:55 +0100

OK, applied as-is for now. I guess all our shortcuts will probably end
up being Ctrl+Shift+Something :-(

---

From: Adam Brusselback <[email-masked]>
Date: Mon, 20 Jun 2016 09:29:40 -0400

I'm just wondering what the thought process is for making the shortcuts
configurable, or why that's going to be significantly hard? I find that to
be highly desirable feature, one of the reasons being avoiding something
like this from happening (with browser bindings). Some of us have other
tools which are also unconfigurable and bind to the same keys, and now you
have conflicts between them.

However, what I think doesn't matter at all in the scheme of things, I'm
just throwing in my $0.02.

Thanks,
-Adam

---

From: Dave Page <[email-masked]>
Date: Mon, 20 Jun 2016 14:33:15 +0100

> just throwing in my $0.02.

It's not that it's necessarily hard, it's that there are only 24 hours
in the day to get things done. We've got a long list of improvements
to make - some immediate (i.e. in time for betaX - 2 being today in
fact), others for GA and others for future releases. Meanwhile, much
as I'd like to, I cannot keep 10 people assigned to pgAdmin
indefinitely. I do need to get them working on other projects, for
which there are also deadlines.

---

From: Colin Beckingham <[email-masked]>
Date: Mon, 20 Jun 2016 09:51:29 -0400

> which there are also deadlines. 
Since pgadmin4 is at the top of the stack browser - window environment - 
OS - kernel, all of which have their call on some specific set of 
shortcuts, a couple of thoughts:
1. are there other applications similar to pgadmin which are in the same 
position where they too are looking for shortcuts? In which case is 
there a possibility of cross-fertilization of ideas?
2. in the world of software shortcuts, the needs of dependent 
applications such as pgadmin might not have been foreseen, but is there 
in the hierarchy a moral obligation to keep a certain subset of 
combinations free? At the moment it seems like a free for all...

---

From: Dave Page <[email-masked]>
Date: Mon, 20 Jun 2016 15:00:05 +0100

On Mon, Jun 20, 2016 at 2:51 PM, Colin Beckingham <[email-masked]> wrote:
>> It's not that it's necessarily hard, it's that there are only 24 hours in
>> the day to get things done. We've got a long list of improvements to make -
>> some immediate (i.e. in time for betaX - 2 being today in fact), others for
>> GA and others for future releases. Meanwhile, much as I'd like to, I cannot
>> keep 10 people assigned to pgAdmin indefinitely. I do need to get them
>> working on other projects, for which there are also deadlines.
>
> Since pgadmin4 is at the top of the stack browser - window environment - OS
> - kernel, all of which have their call on some specific set of shortcuts, a
> couple of thoughts:
> position where they too are looking for shortcuts? In which case is there a
> possibility of cross-fertilization of ideas?

The only app I've found so far like that is Gmail, but 95% of it's
shortcuts are single keys that only work when you're not already
focussed in an editable field. In pgAdmin, that doesn't help much in
cases like this, when you're likely editing a query.

> 2. in the world of software shortcuts, the needs of dependent applications
> such as pgadmin might not have been foreseen, but is there in the hierarchy
> a moral obligation to keep a certain subset of combinations free? At the
> moment it seems like a free for all...

Yeah, you'd think there should be some moral obligation, but you're
right - it is a free for all.

---

From: Harshal Dhumal <[email-masked]>
Date: Wed, 29 Jun 2016 23:35:57 +0530

Hi,

PFA upadated patch for RM1336

Issue fixed: Query tool shortcuts weren't working on mac runtime. Also
changed shortcut key for "Explain analyze" from Ctrl+Shift+A --->
Alt+Shift+N as Ctrl+Shift+A was conflicting with shortcut to show "about"
dialog in runtime.

-- 
*Harshal Dhumal*
*Software Engineer*

On Mon, Jun 20, 2016 at 7:30 PM, Dave Page <[email-masked]> wrote:

> in
> OS
> there a
> applications
diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
index 92579f1..4001066 100644
--- a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
+++ b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
@@ -1015,19 +1015,23 @@ define(
 
       // Callback for keyboard event
       keyAction: function(ev) {
-        if(ev.ctrlKey && ev.shiftKey) {
-          if(ev.keyCode == 69) {
-            // char e/E
-            // Execute query.
-            this.on_flash(ev);
-          } else if(ev.keyCode == 88){
-            // char x/X
-            // Explain query.
-            this.on_explain(ev);
-          } else if(ev.keyCode == 65) {
-            // char a/A
-            // Explain analyze query.
-            this.on_explain_analyze(ev);
+        if(ev.shiftKey) {
+          if(ev.ctrlKey) {
+            if(ev.keyCode == 69) {
+              // char e/E
+              // Execute query.
+              this.on_flash(ev);
+            } else if(ev.keyCode == 88) {
+              // char x/X
+              // Explain query.
+              this.on_explain(ev);
+            }
+          } else if(ev.altKey) {
+            if(ev.keyCode == 78) {
+              // char n/N
+              // Explain analyze query.
+              this.on_explain_analyze(ev);
+            }
           }
         }
       }

---

From: Dave Page <[email-masked]>
Date: Wed, 29 Jun 2016 19:11:57 +0100

Hi

> Alt+Shift+N as Ctrl+Shift+A was conflicting with shortcut to show "about"

Thanks - but let's change the runtime and go back to Ctrl+Shift+A in
the app. The About box in the runtime is really unimportant.

---

From: Harshal Dhumal <[email-masked]>
Date: Thu, 30 Jun 2016 00:02:15 +0530

Hi,

Here is updated patch for RM1336

Fixed query tool shortcuts issue in Mac runtime and changed shortcut to
show "About" dialog in runtime from Ctrl+Shift+A ----> Alt+Shift+A

-- 
*Harshal Dhumal*
*Software Engineer*

> the app. The About box in the runtime is really unimportant.
diff --git a/runtime/BrowserWindow.cpp b/runtime/BrowserWindow.cpp
index 5419c0e..684cb27 100644
--- a/runtime/BrowserWindow.cpp
+++ b/runtime/BrowserWindow.cpp
@@ -125,7 +125,7 @@ void BrowserWindow::createActions()
     connect(exitShortcut, SIGNAL(activated()), this, SLOT(close()));
 
     // About box
-    aboutShortcut = new QShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_A), this);
+    aboutShortcut = new QShortcut(QKeySequence(Qt::ALT + Qt::SHIFT + Qt::Key_A), this);
     aboutShortcut->setContext(Qt::ApplicationShortcut);
     connect(aboutShortcut, SIGNAL(activated()), this, SLOT(about()));
 }
diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
index 92579f1..2a269c0 100644
--- a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
+++ b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
@@ -176,7 +176,7 @@ define(
         "click #btn-explain-buffers": "on_explain_buffers",
         "click #btn-explain-timing": "on_explain_timing",
         "change .limit": "on_limit_change",
-        "keyup": "keyAction"
+        "keydown": "keyAction"
       },
 
       // This function is used to render the template.
@@ -1020,7 +1020,7 @@ define(
             // char e/E
             // Execute query.
             this.on_flash(ev);
-          } else if(ev.keyCode == 88){
+          } else if(ev.keyCode == 88) {
             // char x/X
             // Explain query.
             this.on_explain(ev);

---

From: Dave Page <[email-masked]>
Date: Wed, 29 Jun 2016 20:35:29 +0100

Hi

On Wed, Jun 29, 2016 at 7:32 PM, Harshal Dhumal
<[email-masked]> wrote:
> Fixed query tool shortcuts issue in Mac runtime and changed shortcut to show
> "About" dialog in runtime from Ctrl+Shift+A ----> Alt+Shift+A

I updated the runtime to use Alt+Shift+A, as well as changing the
other shortcuts to use Alt+Shift to avoid future collisions.

However, the shortcuts in the app still don't work in the runtime for
me, so I haven't applied the other change.

---

From: Harshal Dhumal <[email-masked]>
Date: Thu, 30 Jun 2016 12:29:44 +0530

Hi Dave,

Somehow control key is mapped to Command key in Mac. So on Mac shortcuts
are Shift+Command+E, Shift+Command+X, Shift+Command+A

-- 
*Harshal Dhumal*
*Software Engineer*

On Thu, Jun 30, 2016 at 1:05 AM, Dave Page <[email-masked]> wrote:

> show

---

From: Dave Page <[email-masked]>
Date: Thu, 30 Jun 2016 10:04:55 +0100

Hi Harshal,

On Thu, Jun 30, 2016 at 7:59 AM, Harshal Dhumal
<[email-masked]> wrote:
> Hi Dave,
>
> Somehow control key is mapped to Command key in Mac. So on Mac shortcuts are
> Shift+Command+E, Shift+Command+X, Shift+Command+A

OK, those work, but I think we need to take a step back here (partly
because Cmd+Shift+A seems to be Select All in CodeMirror on Mac). I've
committed the patch now, but changed Ctrl+Shift+A to Ctrl+Shift+N.

Can you please work on the following:

1) Create a table of shortcuts from our runtime, our web app, and
CodeMirror. This should list:

Component (e.g. runtime, CodeMirror, Query Tool)
Standard shortcut (e.g. Ctrl+Shift+A)
Mac shortcut (e.g. Cmd+Shift+A)
Function (e.g. Explain Analyze or Select All)

Let's make this as complete and accurate as possible, so it can be
included in the documentation, and used by us to select or
de-duplicate shortcuts.

2) Confirm that the shortcuts we're using in our runtime and web
application don't conflict with any in CodeMirror (or web browsers, in
the case of the web app).

3) Update the web application so the shortcuts are correctly displayed
on Mac automatically - e.g. the tooltips and menus should show
Cmd+Shift not Ctrl+Shift

4) Investigate #1360, and ensure that the CodeMirror shortcuts work
consistently between the runtime and browsers on all platforms.

5) Investigate any remaining shortcuts that don't work as expected.

Thanks, Dave.

---

From: Harshal Dhumal <[email-masked]>
Date: Fri, 1 Jul 2016 15:40:50 +0530

Hi,

PFA patch

This contains:
1] All shortcuts' list which we are using in pgAdmin4.
2] Fixed shortcut display tooltips.

-- 
*Harshal Dhumal*
*Software Engineer*

On Thu, Jun 30, 2016 at 2:34 PM, Dave Page <[email-masked]> wrote:

> are
Added shortcuts' list.

> the case of the web app).
Tested. No other conflicting shortcuts found.

> on Mac automatically - e.g. the tooltips and menus should show
Fixed

> consistently between the runtime and browsers on all platforms.
Investigating now.

> 5) Investigate any remaining shortcuts that don't work as expected.

Investigating now.: Codemirror shortcut (Cmd/Ctrl+Shift+A)  "Select all"
only works on Mac (web/runtime) not on linux platform (haven't tested on
windows)

> Thanks, Dave.
diff --git a/web/keyboard_shortcuts.txt b/web/keyboard_shortcuts.txt
new file mode 100644
index 0000000..1684dc0
--- /dev/null
+++ b/web/keyboard_shortcuts.txt
@@ -0,0 +1,28 @@
++--------------------------------------------------------------------------------+
+|                       pgAdmin4 keyboard shortcuts                              |
++--------------------------------------------------------------------------------+
+==================================================================================
+
+
+
++-----------------+-------------------+-------------------+----------------------+
+| Component       | Function          | Standard shortcut | Mac shortcut         |
++-----------------+-------------------+-------------------+----------------------+
+|                 | Open Url          | Alt+Shift+U       | Alt+Shift+U          |
+|                 +-------------------+-------------------+----------------------+
+| pgAdmin4 runtime| Set python path   | Alt+Shift+P       | Alt+Shift+P          |
+|                 +-------------------+-------------------+----------------------+
+|                 | Open about dialog | Alt+Shift+A       | Alt+Shift+A          |
++-----------------+-------------------+-------------------+----------------------+
+|                 | Execute query     | Ctrl+Shift+E      | Cmd+Shift+E (runtime)|
+|                 |                   |                   | Ctrl+Shift+E (web)   |
+|                 +-------------------+-------------------+----------------------+
+| Query tool      | Explain           | Ctrl+Shift+X      | Cmd+Shift+X (runtime)|
+|                 |                   |                   | Ctrl+Shift+X (web)   |
+|                 +-------------------+-------------------+----------------------+
+|                 | Explain analyze   | Ctrl+Shift+N      | Cmd+Shift+N (runtime)|
+|                 |                   |                   | Ctrl+Shift+N (web)   |
++-----------------+-------------------+-------------------+----------------------+
+| Codemirror      | Select all text   |                   | Cmd+Shift+A (runtime)|
+| (query editor)  | in editor         |                   | Ctrl+Shift+A (web)   |
++-----------------+-------------------+-------------------+----------------------+
diff --git a/web/pgadmin/tools/datagrid/__init__.py b/web/pgadmin/tools/datagrid/__init__.py
index 3a7625f..3580638 100644
--- a/web/pgadmin/tools/datagrid/__init__.py
+++ b/web/pgadmin/tools/datagrid/__init__.py
@@ -23,7 +23,7 @@ from pgadmin.utils import PgAdminModule
 from pgadmin.utils.ajax import make_json_response, bad_request, \
     internal_server_error
 
-from config import PG_DEFAULT_DRIVER
+from config import PG_DEFAULT_DRIVER, SERVER_MODE

 class DataGridModule(PgAdminModule):
@@ -171,10 +171,23 @@ def panel(trans_id, is_query_tool, editor_title):
     if "linux" in _platform:
         is_linux_platform = True
 
+    if not SERVER_MODE and \
+            'mac' in request.headers.environ['HTTP_USER_AGENT'].lower():
+        execute_shortcut = gettext("Execute/Refresh (Cmd+Shift+E)")
+        explain_shortcut = gettext("Explain (Cmd+Shift+X)")
+        explain_analyse_shortcut = gettext("Explain analyze (Cmd+Shift+N)")
+    else:
+        execute_shortcut = gettext("Execute/Refresh (Ctrl+Shift+E)")
+        explain_shortcut = gettext("Explain (Ctrl+Shift+X)")
+        explain_analyse_shortcut = gettext("Explain analyze (Ctrl+Shift+N)")
+
     return render_template("datagrid/index.html", _=gettext, uniqueId=trans_id,
                            is_query_tool=is_query_tool, editor_title=editor_title,
                            script_type_url=sURL, is_desktop_mode=app.PGADMIN_RUNTIME,
-                           is_linux=is_linux_platform)
+                           is_linux=is_linux_platform,
+                           execute_shortcut=execute_shortcut,
+                           explain_shortcut=explain_shortcut,
+                           explain_analyse_shortcut=explain_analyse_shortcut)

 @blueprint.route(
diff --git a/web/pgadmin/tools/datagrid/templates/datagrid/index.html b/web/pgadmin/tools/datagrid/templates/datagrid/index.html
index b138a46..f4433e8 100644
--- a/web/pgadmin/tools/datagrid/templates/datagrid/index.html
+++ b/web/pgadmin/tools/datagrid/templates/datagrid/index.html
@@ -69,7 +69,7 @@
             </div>
             <div class="btn-group" role="group" aria-label="">
                 <button id="btn-flash" type="button" class="btn btn-default" style="width: 40px;"
-                        title="{{ _('Execute/Refresh (Ctrl+Shift+E)') }}">
+                        title="{{ execute_shortcut }}">
                     <i class="fa fa-bolt" aria-hidden="true"></i>
                 </button>
                 <button id="btn-query-dropdown" type="button" class="btn btn-default dropdown-toggle"
@@ -79,12 +79,12 @@
                 <ul class="dropdown-menu dropdown-menu">
                     <li>
                         <a id="btn-explain" href="#">
-                            <span>{{ _('Explain (Ctrl+Shift+X)') }}</span>
+                            <span>{{ explain_shortcut }}</span>
                         </a>
                     </li>
                     <li>
                         <a id="btn-explain-analyze" href="#">
-                            <span>{{ _('Explain analyze (Ctrl+Shift+N)') }}</span>
+                            <span>{{ explain_analyse_shortcut }}</span>
                         </a>
                     </li>
                     <li class="divider"></li>

---

From: Dave Page <[email-masked]>
Date: Fri, 1 Jul 2016 13:16:04 +0100

Hi

> 2] Fixed shortcut display tooltips.

Let's keep it as a separate file for now, and not part of the source
tree or any patches.

I notice that it's missing much of what I wanted to collect though, e.g.

Ctrl+Space - Autocomplete(?)
Cut
Copy
Paste
Select All
...

The other CodeMirror keys can be found at
https://codemirror.net/doc/manual.html#keymaps. Please add at least
the basic editting commands.

> Tested. No other conflicting shortcuts found.

Good.

>> consistently between the runtime and browsers on all platforms.

You've already found one inconsistency - Cmd vs. Ctrl on Mac browsers
vs. the runtime. It should be Cmd in either UI, to avoid user
confusion.

> only works on Mac (web/runtime) not on linux platform (haven't tested on

Yeah - see also some of the comments I made on
https://redmine.postgresql.org/issues/1360

Let's figure out what's wrong first, then come up with a set of
fixes/changes that will get us to a consistent set of keys that work
as per the list you're preparing.

---

From: Harshal Dhumal <[email-masked]>
Date: Mon, 4 Jul 2016 19:30:35 +0530

Hi,

PFA updated patch for RM1336 and keyboard shortcuts file separately.

This patch is same as last patch except I have removed keyboard shortcut
list from this patch.

Also please see my inline response below.

-- 
*Harshal Dhumal*
*Software Engineer*

> the basic editting commands.
Yes I have added basic codemirror shortcuts in file.

> vs. the runtime. It should be Cmd in either UI, to avoid user
Yes, UI will now show Ctrl or Cmd depending on os platform and application
mode (web/runtime). (This was also there in last patch)

> > only works on Mac (web/runtime) not on linux platform (haven't tested on
"Select all" was working on linux as well. It was my mistake. I have added
shortcut key details in keyboard shortcut file.

> I spend some time debugging this but didn't get what's going wrong here.

---

From: Dave Page <[email-masked]>
Date: Tue, 5 Jul 2016 12:02:17 +0100

Hi

> Yes I have added basic codemirror shortcuts in file.

Thanks.

> mode (web/runtime). (This was also there in last patch)

You are missing my point I think - the shortcuts should not be
different in the runtime; if they are, they need to be fixed. If I'm
on a Mac, the shortcuts should be the same in both the browser and
runtime for example.

> shortcut key details in keyboard shortcut file.

OK.

> I spend some time debugging this but didn't get what's going wrong here.

I think the point is that you need to verify that the set of shortcuts
in your text file work correct in both browsers and the runtime, on
Windows, Mac and Linux - and if not, which ones are broken, and how do
we fix them.

The ultimate aim is to ensure we have consistent, working shortcuts
(with only Ctrl vs. Cmd being a different on Macs).