-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Presentation thingie does not generate events #57
Comments
I hacked (something like) this into story-board for a talk I gave last month. The problem was something like keyup / keydown are generated, but not keypress. If you write a "capture all events" blank-canvas app, we can track down what event the Page Up/Down generates. Something that just registers for every DOM event, and prints to stdout the event. I'll add it as an example on the wiki. The fix will be in story-board, I expect. |
I found this cheat sheet. |
@andygill btw, there is a pull request from me (low prio) for story-board. |
Okay, I'll look at it. It will require a refactor to use keyup/keydown rather than keypress. |
@andygill that would be awesome :-) Thanks! |
Just for the posterity... I hacked up function Trigger(e) {
var o = {};
o.metaKey = e.metaKey;
o.type = e.type;
if (e.pageXY != undefined) {
o.pageXY = e.pageXY;
}
if (e.pageX != undefined && e.pageY != undefined) {
o.pageXY = [e.pageX,e.pageY];
}
if (e.which != undefined) {
o.which = e.which;
}
if (o.type == "keydown" && !o.metaKey) {
if (o.which == 33 || o.which == 34 || o.which == 37 || o.which == 39) {
o.type = "keypress";
if (o.which == 34 || o.which == 37)
{
o.which = 98
}
}
}
if (o.type != "keydown") {
$.kc.event(o);
}
}
function register(name) {
$('body').addClass('stop-scrolling');
$(document).bind(name,Trigger);
if (name == "keypress") {
$(document).bind("keydown",Trigger); }
} And now my thingie seems to work. Fingers crossed... Please do not merge this in your sources, it is an ugly hack! |
I have an USB-dongle that (wirelessly) activates PageUP/Down keys on my keyboard. I have a Mac. However those keystrokes (as well as arrow keys etc. from the keyboard) do not arrive on the server side. I use
story-board
as the server app, and Chome as the client browser (same with Safari).Any idea where the change should be made to fix this?
The text was updated successfully, but these errors were encountered: