Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUDxW-0001Qh-1p for pgadmin-hackers@arkaria.postgresql.org; Mon, 01 Aug 2016 14:12:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bUDxV-00057i-Ki for pgadmin-hackers@arkaria.postgresql.org; Mon, 01 Aug 2016 14:12:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bUDxV-00057c-8Z for pgadmin-hackers@postgresql.org; Mon, 01 Aug 2016 14:12:45 +0000 Received: from mail-it0-x229.google.com ([2607:f8b0:4001:c0b::229]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bUDxP-0002lc-HB for pgadmin-hackers@postgresql.org; Mon, 01 Aug 2016 14:12:44 +0000 Received: by mail-it0-x229.google.com with SMTP id f6so246703101ith.1 for ; Mon, 01 Aug 2016 07:12:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=xgXvhgW4j4iARIW3+eKd64DFKBH1VqE9+xPr9HOHkJw=; b=e1pR6YGg8vhauTdKNG2hVK+QMnVWKJnla51ULr7tvsFiMzxuKu88G8rufovr5T25gM j8b5rNSaLK16IcS0bpJOvm2lc/dTA2jXEWL8MnQ2FRuZCovSRU8ghMruE44MSYOK9srC z59SBdZP5m/us6GMBtSNv5M1TIL3ewke5cZWj5VF0xS1dTaAiU2yQul9arAXWsPEAq7E X9mzb3OdNv2wB82FUNe/5c/g3KWvY9fNBkJEVnhnxrrHTMGeDdKMJ5P9jiMP1nKhlzPS tsovBNoY/fFJvHT5YW4t6B1XiDjCO6dUsnL/TLE1AyvdXmI6gzHacZJjY7KHcNCLTszS Lrrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=xgXvhgW4j4iARIW3+eKd64DFKBH1VqE9+xPr9HOHkJw=; b=X1emkJ/fiq20NglnV8aBB4y2XqC3SsRmX5tuEoBzR0DlZlCT7kS4Zq+3iVdpVAu+uR MP/9gO6Tarn+56TlOMb11DGSO9z9Ql+gytfwnTJbt+M2mrQDizjlMh0tKxPDeHuwYJol pvbnE4Ufum9r8Z/NNifTCw6Hx4M4n/M2WnFQ5WEEKzO+uMqk6zPNoeWbknCZMHOBkdhF qaZA6eYqvrw4G/VvneIpE+eLyeeMA4JEPhKCwl3WVDBKsgMxHAMUo07mlNPrcwIpug3r h63v8HzhaDpuWPGuVNHtxZnmV7j9MBw3Dg+DoksSC20CcA19zR69k63s3CitI8DaEkRd TAAQ== X-Gm-Message-State: AEkoousVnZll2ogshp0W6N9e/29DY08aJexerTcdx5qych1ubn67J+n3wkFsKZM8yA1NHl2KD5NXEuo0qF0/Jw== X-Received: by 10.36.2.18 with SMTP id 18mr55264675itu.35.1470060757000; Mon, 01 Aug 2016 07:12:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.208.97 with HTTP; Mon, 1 Aug 2016 07:12:36 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Mon, 1 Aug 2016 15:12:36 +0100 Message-ID: Subject: Re: [pgAdmin4][Patch]: Using F5 for Query Execution in Query tool To: Surinder Kumar Cc: pgadmin-hackers , Ashesh Vashi , Harshal Dhumal Content-Type: text/plain; charset=UTF-8 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org Thanks - applied with a couple of fixes: - The menu option for Explain Analyze showed the shortcut as F8, not Shift+F7 - Explain Analyze was broken - the patch checked for Shift+F7 and called on_explain_analyze, but then also checked for F7 and called on_explain. On Wed, Jul 27, 2016 at 6:09 PM, Surinder Kumar wrote: > Hi > > Please find attached patch with following fixes: > > 1) This patch adds support for Function Keys(F5, F7, F8) as keyboard > shortcuts. > Following are the keyboard shortcuts for query tool operations such as: > > Execute query --> F5 > Explain query --> F7 > Explain analyze query --> Shift + F7 > Download query result as CSV --> F8 > > 2) Add proper condition to check string in JS array in explain analyze. The > code breaks while running explain analyse. > > This patch partially resolves RM1478. > > Please review. > > On Wed, Jul 27, 2016 at 5:48 PM, Surinder Kumar > wrote: >> >> On Wed, Jul 27, 2016 at 2:31 PM, Dave Page wrote: >> >> > >> >> > Hi >> > >> > On Tue, Jul 26, 2016 at 7:13 PM, Surinder Kumar >> > wrote: >> > > Hi Dave >> > > >> > > I spend some time looking at RM#1412 - Function Keys in Query Tool >> > > specific >> > > to execute query using F5 key. >> > >> > Please note that RM1412 was rejected. 1478 is where we're tracking all >> > the shortcut issues now. >> > >> > > As we know F5 key is bound to reload/refresh for browsers on Linux & >> > > Windows. >> > > But If we use F5 key to execute query, then F5 key event is first >> > > captured >> > > inside the code and execution works. >> > >> > OK. >> > >> > > It will not affect the browser reload behaviour. F5 key for execution >> > > will >> > > only work if focus is on Query tool. >> > > >> > > Ashesh's concern is: >> > > If focus is not on query tool and user mistakenly pressed Fn+F5 key, >> > > the >> > > page will reload which shouldn't happened. >> > > >> > > In such case: >> > > The page doesn't reload directly as we always ask user "Whether to >> > > Stay on >> > > page or Leave page". >> > >> > Right. >> > >> > > The other way is to disable reload page on F5 Key only when focus is >> > > inside >> > > the app. >> > > If focus is on browser then F5 for reload will work. (not a good idea) >> > > >> > > @Dave What do you think? >> > >> > On Mac it works nicely, both in the runtime and in Chrome, Safari and >> > Firefox - and given the number of people complaining about the >> > shortcuts here, I think the limitation of focus on the text box is >> > acceptable. >> > >> > > I have tested this attached patch on following platforms without any >> > > issue: >> > > Windows 7 - Runtime & IE 9 & 10. >> > > Mac OSX Yosemite - Safari(8.0.3), Chrome(51) & Firefox(47) >> > > Ubuntu-14.04.2 - Chrome & Firefox. >> > > >> > > Please review the patch. >> > >> > The patch doesn't update the tooltips/buttons/menus to display the >> > correct shortcuts - plus, if we're doing this for F5, then I think we >> > should also keep F7 for Explain, Shift+F7 for Explain Analyse and F8 >> > for Execute to File (CSV Downlaod), like pgAdmin 3. > > Tooltips/buttons/menus are updated with correct shortcuts keys in attached > patch. >> >> I will send a patch later today. >> >> >> > >> > >> > Please note though that that would only partially resolve RM1478. On >> > some browsers/platforms, there is also some CodeMirror related >> > shortcut weirdness that needs to be resolved. It may be worth seeing >> > if a CodeMirror update would help. >> Okay >> > >> > Thanks! >> > >> > -- >> > Dave Page >> > Blog: http://pgsnake.blogspot.com >> > Twitter: @pgsnake >> > >> > EnterpriseDB UK: http://www.enterprisedb.com >> > The Enterprise PostgreSQL Company > > -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers