Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] CodeEdit - listen to CTRL+DOWN-ARROW

Sorry, I did not answer your question. Yes, the focus is on the editor and the page scroll works, but I dont see the console.log() message in the console.

Thanks

Gowrishankar Holalkere | Sr. Development Manager, IT
Solutions Development - Variable Data Management
Retail Branding and Information Solutions | Avery Dennison 
1700 West Park Drive, Suite 400, Westborough, MA 01581
508-948-3466 (office) | 508-308-7987 (mobile) 
Gowrishankar.Holalkere@xxxxxxxxxxxxxxxxx 


On Tue, Dec 8, 2015 at 1:35 PM, Gowrishankar Holalkere <gowrishankar.holalkere@xxxxxxxxxxxxxxxxx> wrote:
Hello Libing,

I am on Google Chrome Version 46.0.2490.86 m on Windows 7 64-bit.

Thanks

Gowrishankar Holalkere | Sr. Development Manager, IT
Solutions Development - Variable Data Management
Retail Branding and Information Solutions | Avery Dennison 
1700 West Park Drive, Suite 400, Westborough, MA 01581
508-948-3466 (office) | 508-308-7987 (mobile) 
Gowrishankar.Holalkere@xxxxxxxxxxxxxxxxx 


On Tue, Dec 8, 2015 at 9:15 AM, Libing Wang <Libing_Wang@xxxxxxxxxx> wrote:
Hi Gowrishankar:
I've just downloaded this version and it works fine for me.
What browser and version are you using?
Does your editor get focus when you use ctrl+arrowdown?

-Libing



From:        Gowrishankar Holalkere <gowrishankar.holalkere@xxxxxxxxxxxxxxxxx>
To:        Orion developer discussions <orion-dev@xxxxxxxxxxx>
Date:        12/08/2015 08:40 AM
Subject:        Re: [orion-dev] CodeEdit - listen to CTRL+DOWN-ARROW
Sent by:        orion-dev-bounces@xxxxxxxxxxx




Hi Libing, I am using S20151119-1459 downloaded couple weeks ago.

http://eclipse.mirror.rafal.ca/orion/drops/S20151119-1459/built-codeEdit.zip

Thanks

Gowrishankar Holalkere| Sr. Development Manager, IT
Solutions Development - Variable Data Management
Retail Branding and Information Solutions | Avery Dennison 
1700 West Park Drive, Suite 400, Westborough, MA 01581
508-948-3466 (office) | 508-308-7987 (mobile) 
Gowrishankar.Holalkere@xxxxxxxxxxxxxxxxx 


On Tue, Dec 8, 2015 at 8:09 AM, Libing Wang <Libing_Wang@xxxxxxxxxx> wrote:
What version of the build are you using?

-Libing




From:        
Gowrishankar Holalkere <gowrishankar.holalkere@xxxxxxxxxxxxxxxxx>
To:        
Orion developer discussions <orion-dev@xxxxxxxxxxx>
Date:        
12/07/2015 11:09 AM
Subject:        
Re: [orion-dev] CodeEdit - listen to CTRL+DOWN-ARROW
Sent by:        
orion-dev-bounces@xxxxxxxxxxx




Hi Libing,
This is exactly the code I copied and still not seeing it working.


Thanks

Gowrishankar Holalkere
| Sr. Development Manager, IT
Solutions Development - Variable Data Management
Retail Branding and Information Solutions | Avery Dennison 
1700 West Park Drive, Suite 400, Westborough, MA 01581

508-948-3466 (office) | 508-308-7987(mobile) 
Gowrishankar.Holalkere@xxxxxxxxxxxxxxxxx 



On Mon, Dec 7, 2015 at 9:47 AM, Libing Wang <
Libing_Wang@xxxxxxxxxx> wrote:
Hi Gowrishankar:
Thanks for the hint of link. I will write down another wiki section mentioning how to override the actions.
RE:
I tried this code, but it did not trigger when CTRL+ARROW-DOWN is typed
Could you just use the simple demo in
https://wiki.eclipse.org/Orion/How_Tos/Code_Edit#Using_the_build_and_the_quick_start_demoand put the snippet after the editor is created, like the code below? it does not need anything else.

codeEdit.create({parent: "embeddedEditor", contentType: "application/_javascript_", contents: contents}).then(function(editorViewer) {
        document.getElementById("progressMessageDiv").textContent = "Plugins loaded!";
        editorViewer.editor.getTextView().setAction("scrollLineDown", function(){
                console.log("my action invoked!");
                return true;
        });

        //You can call APIs from editorViewer.editor  for further actions.
});

-Libing




From:        
Gowrishankar Holalkere <gowrishankar.holalkere@xxxxxxxxxxxxxxxxx>
To:        
Orion developer discussions <orion-dev@xxxxxxxxxxx>
Date:        
12/04/2015 04:28 PM
Subject:        
Re: [orion-dev] CodeEdit - listen to CTRL+DOWN-ARROW
Sent by:        
orion-dev-bounces@xxxxxxxxxxx




Also I tried printing below and it shows empty array. Seems like key-binding is missing? 

editorViewer.editor.getTextView().getKeyBindings("scrollLineDown")

And then, tried below to bind the key to the action, and this code failed.

editorViewer.editor.getTextView().setKeyBinding(orion.editor.KeyBinding('38', true, false, false, false, "keydown"), "scrollLineDown") ;



Thanks


Gowrishankar Holalkere
| Sr. Development Manager, IT
Solutions Development - Variable Data Management
Retail Branding and Information Solutions | Avery Dennison 
1700 West Park Drive, Suite 400, Westborough, MA 01581

508-948-3466 (office) | 508-308-7987(mobile) 
Gowrishankar.Holalkere@xxxxxxxxxxxxxxxxx 



On Fri, Dec 4, 2015 at 3:33 PM, Gowrishankar Holalkere <
gowrishankar.holalkere@xxxxxxxxxxxxxxxxx> wrote:
Hi Libing,
I tried this code, but it did not trigger when CTRL+ARROW-DOWN is typed. Could you please try and let me know if there is anything else need to be set for it to work.

Also, I found the below doc-ref from orionhub for the list of action-ids.  

https://orionhub.org/jsdoc/symbols/orion.editor.TextView.html#getActions

Assuming they are same for codeEdit, it may save you some effort to put that together.



Thanks


Gowrishankar Holalkere
| Sr. Development Manager, IT
Solutions Development - Variable Data Management
Retail Branding and Information Solutions | Avery Dennison 
1700 West Park Drive, Suite 400, Westborough, MA 01581

508-948-3466 (office) | 508-308-7987(mobile) 
Gowrishankar.Holalkere@xxxxxxxxxxxxxxxxx 



On Fri, Dec 4, 2015 at 12:10 PM, Libing Wang <
Libing_Wang@xxxxxxxxxx> wrote:
Generally speaking, you can always register a orion.edit.command service(
https://wiki.eclipse.org/Orion/Documentation/Developer_Guide/Plugging_into_the_editor#orion.edit.command) with a keybinding to achieve your custom command, as I mentioned in the https://wiki.eclipse.org/Orion/How_Tos/Code_Edit#The_codeEdit.serviceRegistry_instance.

There are exceptions, editorViewer.editor.getTextView() instance, which is the core part of the widget, already preserved a lot of "common sense" key bindings for actions like editor navigations, etc. And ctrl+down-arrow & ctrl+up-arrow are two of them.
But do not worry, you can still use some low level APIs to override these actions. Please refer to the following snippet.

editorViewer.editor.getTextView().setAction("scrollLineDown", function(){// use "scrollLineUp" for ctrl+up-arrow.
    console.log("my action invoked!");
    return true;
});


Note that "return true" means you do not want the default behavior at all, while "return false" means you want both.

There are a lot of other preserved key bindings. I have not yet documented it but will soon. I am working on an html snippet so that you can run it to render a page listing up  all the preserved actions with action id and associated key bindings. Then from that list, the end users will have to decide if the desired key binding collides with the preserved one. They have to grab the action id(e.g. "scrollLineUp") and use the setAction API to override it.

Stay tuned on this incoming wiki section.

Libing




From:        
Gowrishankar Holalkere <gowrishankar.holalkere@xxxxxxxxxxxxxxxxx>
To:        
Orion developer discussions <orion-dev@xxxxxxxxxxx>
Date:        
12/03/2015 10:59 PM
Subject:        
[orion-dev]  CodeEdit - listen to CTRL+DOWN-ARROW
Sent by:        
orion-dev-bounces@xxxxxxxxxxx




Hello,
Could you please tell me how to listen to CTRL+DOWN-ARROW and CTRL+UP-ARROW?


Thanks


Gowrishankar Holalkere
| Sr. Development Manager, IT
Solutions Development - Variable Data Management
Retail Branding and Information Solutions | Avery Dennison 
1700 West Park Drive, Suite 400, Westborough, MA 01581

508-948-3466 (office) | 508-308-7987(mobile) 
Gowrishankar.Holalkere@xxxxxxxxxxxxxxxxx 




-------------------------------------------------------------------------------------------------------------
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
-------------------------------------------------------------------------------------------------------------

_______________________________________________
orion-dev mailing list

orion-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

https://dev.eclipse.org/mailman/listinfo/orion-dev


_______________________________________________
orion-dev mailing list

orion-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

https://dev.eclipse.org/mailman/listinfo/orion-dev




-------------------------------------------------------------------------------------------------------------
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
-------------------------------------------------------------------------------------------------------------

_______________________________________________
orion-dev mailing list

orion-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

https://dev.eclipse.org/mailman/listinfo/orion-dev


_______________________________________________
orion-dev mailing list

orion-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

https://dev.eclipse.org/mailman/listinfo/orion-dev



-------------------------------------------------------------------------------------------------------------
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
-------------------------------------------------------------------------------------------------------------

_______________________________________________
orion-dev mailing list

orion-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

https://dev.eclipse.org/mailman/listinfo/orion-dev


_______________________________________________
orion-dev mailing list

orion-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

https://dev.eclipse.org/mailman/listinfo/orion-dev



-------------------------------------------------------------------------------------------------------------
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
-------------------------------------------------------------------------------------------------------------
_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/orion-dev


_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/orion-dev




-------------------------------------------------------------------------------------------------------------
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
-------------------------------------------------------------------------------------------------------------


Back to the top