Chris,

Like Min suggests, you'll want to invoke actions instead of emulating
keyboard commands.  Similarly, when interacting with widgets and cells,
you'll want to invoke the native methods of the objects to set content.
IIRC for a cell it's something like

cell.set_value('#Cell content')


- use the web console to find the exact method name.  For widgets

widgetView.model.set('value', 'something');
> widgetView.touch();


There isn't a way to invoke keyboard/mouse click events on cells&widgets
that works universally.

Best,
Jon

On Tue, Aug 9, 2016 at 7:35 AM, Christopher Brooks <[email protected]>
wrote:

> I actually want to automate the typing of the content out based on a
> script - I won't be in command mode at the time.
>
> Regards,
>
> Chris
>
> On Tue, Aug 9, 2016 at 10:09 AM, MinRK <[email protected]> wrote:
>
>> May I ask what keypresses do you want to trigger, and why? Since keyboard
>> shortcuts are customizable, triggering a keypress in command mode can take
>> an arbitrarily different action from the default behavior, so perhaps
>> calling the js APIs that those keypresses correspond to is the right
>> approach, rather than triggering events that may or may not do what you
>> want.
>>
>> -MinRK
>>
>> On Fri, Aug 5, 2016 at 11:13 PM, Christopher Brooks <[email protected]>
>> wrote:
>>
>>> Hi,
>>>
>>> I'm looking to interact with the jupyter notebook pages in javascript,
>>> largely to do things like send key commands. I've spent a bit of time going
>>> through the variety of bindings, but I can't see where I could actually
>>> raise a keypress/keydown event such that it would trigger
>>> KeyboardManager.prototype.bind_events.
>>>
>>> Any hints on where I should be looking? My javascript's gotten a bit
>>> rusty :)
>>>
>>> Chris
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Project Jupyter" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/jupyter/2cdbafa4-7fb4-47bf-89d9-02b1e6bb9549%40googlegroups.com
>>> <https://groups.google.com/d/msgid/jupyter/2cdbafa4-7fb4-47bf-89d9-02b1e6bb9549%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Project Jupyter" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/jupyter/f5WcGrvbKvQ/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> To post to this group, send email to [email protected].
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/jupyter/CAHNn8BWmWVrNSG0yMD8wO01fcFL1-Dx2RW-G4JCvST-
>> F5abZBA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/jupyter/CAHNn8BWmWVrNSG0yMD8wO01fcFL1-Dx2RW-G4JCvST-F5abZBA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Christopher Brooks
> Research Assistant Professor, School of Information
> Director of Learning Analytics & Research, Office of Academic Innovation
>
> E-Mail: [email protected]
> Web: http://www.si.umich.edu/people/christopher-brooks
>
> School of Information
> University of Michigan
> 4439 North Quad
> 105 S. State St.
> Ann Arbor, MI 48109-1285
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/CAJQ6OJMHcZExpqp6jPsVe0Qpc6dOJDpPdbGJCW6sNy9k8JEw8A%40mail.
> gmail.com
> <https://groups.google.com/d/msgid/jupyter/CAJQ6OJMHcZExpqp6jPsVe0Qpc6dOJDpPdbGJCW6sNy9k8JEw8A%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAAoBLw0RXk%2B0MOn2WQuVXT4Wnw1i2t0ngKS2R2U9%3DLVsjENO5w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to