Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bWjbP-0000PL-LZ for pgadmin-hackers@arkaria.postgresql.org; Mon, 08 Aug 2016 12:24:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bWjbP-00037I-8P for pgadmin-hackers@arkaria.postgresql.org; Mon, 08 Aug 2016 12:24:19 +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 1bWjbO-00037A-P3 for pgadmin-hackers@postgresql.org; Mon, 08 Aug 2016 12:24:18 +0000 Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bWjbK-0000h9-2r for pgadmin-hackers@postgresql.org; Mon, 08 Aug 2016 12:24:18 +0000 Received: by mail-wm0-x236.google.com with SMTP id i5so135500121wmg.0 for ; Mon, 08 Aug 2016 05:24:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Ss5eOyH7FWwot+xLp10Oy4h2L76jLz+kN7FEzNp6g1g=; b=od/TlQaa2uSkmn7OCUJS5dnVTKem6sO60giw/gyM+N/N/FmDGau2OA7oJF6KkCW/nJ 1p9Yz3UxAEkt6yCsW2H3tP9ZLSC2IApxgnXluvwYRxJ9ptwdjdxaEo3vEzag4deQP/Hk EHL330vRtAktrkYwVAIKZr+7Zmqdepg14tZcoipJuQnlZhB00Xujuf2wIIYufEdnkC9Q +Gg0WnuqiiTmX/vlQG+WXlos584EVcG42Cc8vD0GsfnbwQYSCv6RkUsei8HflQWAFya+ TpliyB5W6QByX+71h6yNG50HOoIb/N/OEcaLst5A5xcDaf7KWUJshSGnJzFsHg5YdHpT EZeA== 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=Ss5eOyH7FWwot+xLp10Oy4h2L76jLz+kN7FEzNp6g1g=; b=KtG4BOBkWFiZ/3a1v8qOGkxIytXF1MCAheoNtCTf/lDMwBZCndN4Th/bbv5BxuyP0w fL+gIMLy/5uH4I0B3chCN6jjwIjFQaSp4z6Ya1npkY2Fp4siDhg3Rep7azpfZChzfXrE F2B8kl6XHT2+9c8cwL6hADdaFyz5xERdBgm2DeiX/n//9aSOu3h6u2S5qyhDbtBPUwpk NBbyM20O4pOolbTXp0urCHjbxZqiICWzuREuN9FX1fht6lyWNPvFKG90FL7rYyjViWTZ YOEScNxsNQckk1NzmnTa3AKhFlRhU84xfIsmYou4xOwVfOK4wC25ho95/I3AnpCzX37h afMw== X-Gm-Message-State: AEkooutxgoa8FO086pElTb91BuzsPt0Zf7+xCOVabUb9BqGT9k+bdyCtwSgirSmuSkHHtqS3VFYv968vpuDy7yA6 X-Received: by 10.28.39.133 with SMTP id n127mr16073609wmn.6.1470659053183; Mon, 08 Aug 2016 05:24:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.167.81 with HTTP; Mon, 8 Aug 2016 05:23:42 -0700 (PDT) In-Reply-To: References: From: Surinder Kumar Date: Mon, 8 Aug 2016 17:53:42 +0530 Message-ID: Subject: Re: [pgAdmin4][Patch]: RM#1478 - Make code mirror text editor keyboard shortcuts consistent irrespective of platform type To: Dave Page Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary=001a114e161273882605398e7e8a 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 --001a114e161273882605398e7e8a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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. > =E2=80=8BSure.=E2=80=8B > > >> On Fri, Aug 5, 2016 at 6:42 PM, Surinder Kumar > >> wrote: > >> > Hi > >> > > >> > I found that Code-mirror library itself provides the List of keyboar= d > >> > 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 a= re > >> > 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. I= t > 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.or= g > ) > >> > 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 > --001a114e161273882605398e7e8a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On = Mon, Aug 8, 2016 at 5:52 PM, Dave Page <dpage@pgadmin.org> w= rote:
On Mon, Aug 8, 2016 at 1:15 PM, S= urinder Kumar
<surinder.kumar@enter= prisedb.com> wrote:
> On Mon, Aug 8, 2016 at 4:43 PM, Dave Page <dpage@pgadmin.org> 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 instance= s.
>> Do the others work anyway, because we're invoking in a differe= nt 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 serve= r.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 i= n beta 4.
=E2=80=8BSure.=E2=80=8B

>> On Fri, Aug 5, 2016 at 6:42 PM, Surinder Kumar
>> <surinder.ku= mar@enterprisedb.com> 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 c= ode-mirror
>> > instance.
>> >
>> > Following is the keyboard shortcuts for various operations in= text
>> > editor:
>> >
>> > Copy -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 [Ctrl-C, Cmd-C]
>> > Cut -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[Ctrl-X, Cmd-X]
>> > Select All -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 [Ctrl-A, Cmd-A]
>> > Undo -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 [Ctrl-Z, Cmd-Z]
>> > Redo -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 [Ctrl-Y, Cmd-Y]
>> > Delete Line -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 [Ctrl-D, Cmd-D]
>> > Move left/right(words) -=C2=A0 [Alt-Left, Alt-Right]
>> > Move start/end of line -=C2=A0 [Cmd-Left, Cmd-Right] // Ctrl-= Left/Right are
>> > bound
>> > to System=C2=A0 =C2=A0shortcuts. so these keys cannot be used= .
>> >
>> > These keyboard shortcuts are consistent in Web/Runtime applic= ations in
>> > all
>> > platform types.
>> >
>> > Issue not fixed:
>> > keyboard shortcut for Paste text doesn't work in Mac Runt= ime only. It is
>> > working on Linux runtime & Windows Runtime.
>> > An issue "Key shortcuts doesn't work on Mac OS for Q= WebView 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 figu= re 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/mailp= ref/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

--001a114e161273882605398e7e8a--