Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bWlqp-0005kb-9a for pgadmin-hackers@arkaria.postgresql.org; Mon, 08 Aug 2016 14:48:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bWlqo-0006YQ-T1 for pgadmin-hackers@arkaria.postgresql.org; Mon, 08 Aug 2016 14:48:22 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bWlqo-0006YK-DX for pgadmin-hackers@postgresql.org; Mon, 08 Aug 2016 14:48:22 +0000 Received: from mail-it0-x22c.google.com ([2607:f8b0:4001:c0b::22c]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bWlqk-0001zj-U8 for pgadmin-hackers@postgresql.org; Mon, 08 Aug 2016 14:48:21 +0000 Received: by mail-it0-x22c.google.com with SMTP id x130so12612109ite.1 for ; Mon, 08 Aug 2016 07:48:18 -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=Pz24HxPG2ztcbaykhheJ6Q6EpB7mfJH5rbuAefR0rLk=; b=yYvXYbaQq9QfOWAPrSyxquO1JD6zy+Gw4xsFEJdJPdxvVy49MNO9hZ08FfBs2MUK2B zgJ45w31y2RUnj+4sNHY/en20XHSOM2lcyGqPrLTttn2ntu7NGWEQFdzgckznRd8YP66 u2hhM74QV583qnt20FMpE9aeG3YxPETqqc9nBWk6P2n3wadYSob3nbNZ2FI2jBvK+ZN6 9YdJDIYaaabBjsowL1pIQRrMbCo+FHIrPqT3GcQO22+iR8uihhwBMr1EidNZC1R9wnmi 6qjeUjvMJoXzZt7mb2eSzW1t26f9WOnRrgjsBC9oEUo6rdDUjwYYRTx0tER/ch5gD/UC d8WQ== 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=Pz24HxPG2ztcbaykhheJ6Q6EpB7mfJH5rbuAefR0rLk=; b=NfcOgppSOnWC5jHlTV9dSiEYmblhEbn62wzjHJQ2Whu9A/ZP4lc8e3BxPFg5pj14ue LKE3P1k2kUF8R8DbhPYfc/8ry9/reAYre+F3sxQloyUnw2m+k8hLOJ3GHbO/tNwP6MLZ C+Pwj8Q1dLXTOb193qEl3WFK/c5jJm7MgMw8i5NsS0RLAFCm3gV8AOXY9f6BCN+N2kq5 BuAt2x+Te/emnlht881GrkHg20KLJ84nfkW5sFW+XamRq1PmoTqx/bP8h5f/HCbxUkMb JOLKiPqlyu8evqqyWsiE7GU5PswfUMiATLEhJkYG2QJrQOPdV0NYIGY5LyueaTqqN7vN SlFw== X-Gm-Message-State: AEkoouslHCf2iSXJHGLxTPim/ryGDuu8KKaU/pEV64mONLH8eOjBje8Dxm9Jn4HN1J0q8rcfEwf/jhIkIFa/Ew== X-Received: by 10.36.2.18 with SMTP id 18mr17728292itu.35.1470667697307; Mon, 08 Aug 2016 07:48:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.208.97 with HTTP; Mon, 8 Aug 2016 07:48:16 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Mon, 8 Aug 2016 15:48:16 +0100 Message-ID: Subject: Re: [pgAdmin4][Patch]: RM#1478 - Make code mirror text editor keyboard shortcuts consistent irrespective of platform type To: Surinder Kumar Cc: pgadmin-hackers Content-Type: text/plain; charset=UTF-8 X-Pg-Spam-Score: -2.6 (--) 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 minor changes per our discussion on skype. On Mon, Aug 8, 2016 at 2:34 PM, Surinder Kumar wrote: > Hi Dave, > > This patch contains following changes: > > Add "editor_shortcut_keys" variable to pgAdmin.Browser in browser.js object > to make it accessible to all pgAdmin modules. > Apply shortcuts keys to following code mirror instances: > > a) Query tool, Query filter & Datagrid. > b) Debugger tool. > c) Sql Panel. > d) SqlTab & SqlField Controls. > > Please find updated patch and review. > > On Mon, Aug 8, 2016 at 5:53 PM, Surinder Kumar > wrote: >> >> On Mon, Aug 8, 2016 at 5:52 PM, Dave Page wrote: >>> >>> On Mon, Aug 8, 2016 at 1:15 PM, Surinder Kumar >>> wrote: >>> > On Mon, Aug 8, 2016 at 4:43 PM, Dave Page wrote: >>> >> >>> >> Hi Surinder, >>> >> >>> >> This looks very promising, but it only covers the query tool at >>> >> present. We need the shortcuts to apply to all codemirror instances. >>> >> Do the others work anyway, because we're invoking in a different way, >>> >> or is more work needed there? >>> > >>> > To apply the same shortcuts to other codemirror instances(e.g: >>> > SqlTabControl) we just need to set a parameter >>> > extraKeys: pgAdmin.editor_shortcut_keys for every codemirror instance. >>> > As of now, shortcuts are applicable to query tool & data filter. >>> > >>> > Also, we need to define pgAdmin.editor_shortcut_keys variable in >>> > server.js >>> > instead of sqleditor.js to work it for >>> > other code mirror instances. >>> >>> OK, please update the patch to do that. >>> >>> Can you get that to me in the next hour or so? I'd like to include it in >>> beta 4. >> >> Sure. >>> >>> >>> >> On Fri, Aug 5, 2016 at 6:42 PM, Surinder Kumar >>> >> wrote: >>> >> > Hi >>> >> > >>> >> > I found that Code-mirror library itself provides the List of >>> >> > keyboard >>> >> > shortcuts for Mac OSX and other platform type. >>> >> > We just need to pass them in extraKeys param while creating >>> >> > code-mirror >>> >> > instance. >>> >> > >>> >> > Following is the keyboard shortcuts for various operations in text >>> >> > editor: >>> >> > >>> >> > Copy - [Ctrl-C, Cmd-C] >>> >> > Cut - [Ctrl-X, Cmd-X] >>> >> > Select All - [Ctrl-A, Cmd-A] >>> >> > Undo - [Ctrl-Z, Cmd-Z] >>> >> > Redo - [Ctrl-Y, Cmd-Y] >>> >> > Delete Line - [Ctrl-D, Cmd-D] >>> >> > Move left/right(words) - [Alt-Left, Alt-Right] >>> >> > Move start/end of line - [Cmd-Left, Cmd-Right] // Ctrl-Left/Right >>> >> > are >>> >> > bound >>> >> > to System shortcuts. so these keys cannot be used. >>> >> > >>> >> > These keyboard shortcuts are consistent in Web/Runtime applications >>> >> > in >>> >> > all >>> >> > platform types. >>> >> > >>> >> > Issue not fixed: >>> >> > keyboard shortcut for Paste text doesn't work in Mac Runtime only. >>> >> > It is >>> >> > working on Linux runtime & Windows Runtime. >>> >> > An issue "Key shortcuts doesn't work on Mac OS for QWebView widget" >>> >> > is >>> >> > also >>> >> > reported. >>> >> > >>> >> > I also found that right click paste is working in Mac Runtime which >>> >> > is >>> >> > the >>> >> > feature of code-mirror, So I am looking into its code to figure out >>> >> > and >>> >> > I >>> >> > will send a patch with fix once it gets fixed. >>> >> > >>> >> > Please find attached patch and review. >>> >> > >>> >> > >>> >> > Thanks, >>> >> > Surinder Kumar >>> >> > >>> >> > >>> >> > >>> >> > -- >>> >> > Sent via pgadmin-hackers mailing list >>> >> > (pgadmin-hackers@postgresql.org) >>> >> > To make changes to your subscription: >>> >> > http://www.postgresql.org/mailpref/pgadmin-hackers >>> >> > >>> >> >>> >> >>> >> >>> >> -- >>> >> 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 >> >> > -- 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