You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there are way we can propagate a keydown event to browser to do default action? For example, with Ctrl + P we can print page, but it doesn't work with ipyevents as expected.
Related to this is another option of dispatching a new event when a key is pressed, e.g. let say I press key Ctrl + P and it does not propagate to notebook/browser that is fine, but what if I can handle that by adding something like:
defhandle_keydown(event):
ifevent["ctrlKey"] andevent["code"] =="p":
ipyevents.propagate() # This is less flexible, # ORipyevents.dispatch_javascript_event("window.print();") # if such function exists, it is much more flexible
This second way to dispatch events selectively looks better than just passing events to browser. I am looking specifically for window.dispatchEvent(new Event('resize')); on press of some key or some layout change of widgets.
The text was updated successfully, but these errors were encountered:
Is there are way we can propagate a keydown event to browser to do default action? For example, with
Ctrl + P
we can print page, but it doesn't work withipyevents
as expected.Related to this is another option of dispatching a new event when a key is pressed, e.g. let say I press key
Ctrl + P
and it does not propagate to notebook/browser that is fine, but what if I can handle that by adding something like:This second way to dispatch events selectively looks better than just passing events to browser. I am looking specifically for
window.dispatchEvent(new Event('resize'));
on press of some key or some layout change of widgets.The text was updated successfully, but these errors were encountered: