S5 1.1b3
Published 19 years, 8 months pastWell, there was time off for the holidays, but now S5 is back and ready to increment its beta number. So, without too much ado: S5 1.1b3 (248KB ZIP file). Here’s the current testbed presentation, for those who just want to play around with it. Because of the long holiday break, I want to add another beta round or two just to work out as many kinks as possible. So this isn’t the last version before going final on 1.1; still, I’m interested in any problems that people encounter.
There’s really only one notable change from the previous version. I incorporated Jordan Liggitt’s “type slide number” code into this version. Why his, when others have done similar things? Because his version was well-marked with comments, and thus easy for me to figure out what he’d done and how he’d done it. So here’s how it works:
- If the user types a number (multi-digit is allowed), the script stores the number. Inputting any non-number key clears the entered number.
- If the user hits Enter/Return while there is a number stored, the slide show jumps to that slide. Any attempt to jump directly to a slide past the end of the slide show results in no action, although the number is still cleared.
- Hitting any of the “Next” or “Previous” keys while there is a number entered causes the slide show to skip the number entered in the appropriate direction. Thus, entering “3” and hitting the space bar would jump forward three slides; entering 5 and hitting Page Up would jump backward five slides. Skipping past the end of the slide show will drop you on the title slide, which is something I’m thinking about changing, though I’m not entirely certain in what way.
I’m mulling over which keys should invoke which jumping behavior. For example, a couple of times I’ve typed a slide number and then hit the space bar to advance directly to that slide. Instead, I jumped forward by that number, which is correct but obviously not what I was subconsciously expecting. So I’m thinking about further restricting the keys that trigger the “jump n slides” behavior. Anyone have suggestions based on other slide show software?
At this stage, I’m likely to put off adding the multiple-author meta
that I toyed with in earlier versions. The general need is still there, but I’m just not able to think the problem through with the kind of clarity I want. It will have to wait for another day. I’m also dithering a bit about the licensing, though at this point I’m leaning pretty heavily toward using Expat. My hesitation is largely based on my very desire to make the right choice so that I never, ever have to worry about it again, you know?
Anyway, as always, feedback is welcome.
Comments (37)
Pingback ::
zeroKspot.com :: » Eric’s Archived Thoughts: S5 1.1b3
[…] ived Thoughts: S5 1.1b3
Filed under: Web Software — zeroK @ 19:57 pm
Eric’s Archived Thoughts: S5 1.1b3 Eric Meyer hat wieder eine neue Version seines &# […]
Thanks Eric, I was just about to email you asking for the testbed in a zip file. I’ve been trying to play with it, but had no easy way to get it.
Thanks for your work on S5. Its an excellent projet.
Great stuff, Eric.
One quick bug report: in my browser — Firefox 1.0, Mac OS X — it seems that s5 hijacks pretty much all keystrokes; i.e. hitting return in the URL bar doesn’t go to a new URL but instead goes to the next slide (!).
Wow, cool to see the contribution used. Jacob, I see sort of similar behavior within Firefox under Windows, but not quite. It was intentional to trap keystrokes while the focus was in the document, so that quickkeys, FAYT, etc, wouldn’t pop up during the slideshow.
However, at least under Windows, once the focus is out of the document (say for example, in the address bar), all the quickkeys work normally, and enter in the address bar works fine for me.
I’m wondering if logic is needed in the trap() function to only return false if the document has the focus. Anyone have any ideas for that? I don’t have an easy way to test the efficacy of any changes for the MacOS, since I only have Windows and Linux platforms, and I hadn’t seen this problem on either.
What happened to all the nice graphics? A switch to a more minimal version?
I am going to use S5 in academia next week. Check it out… the original version 1.
http://www.schestowitz.com/Research/Presentations/Early_2005_Presentation
Eric,
First of all, thanks you very much for your work on S5, it is an excellent system. One (possible) bug I just noticed. It seems that with the new type slide number code takes me to the last slide if I try to go backwards more slides than I’ve gone forward. In other words, if I am on slide 4 and I press 5 then PageUp, I go to the last slide in the show. It seems like it might be more intuitive for that to take you to the first slide. Also, I personally feel that when you go past the end of the slideshow using the type page number, I should go to the last page instead of the first. Anyways, just my two cents.
Just to confirm what Jacob said, in Firefox you can’t press any buttons on the keyboard. So for example: I can’t hit F11 to go to full screen.
Keyboard works fine under Firefox 1.0/Windows and Firefox 1.0/SuSE Linux 8.1. (just for re-assurance)
My experience is that in Firefox 1.0 under OS X, keys are always trapped but not necessarily imprisoned. For example, if I start up a slide show and advance a few slides, then type a URL into the address bar and hit Return, the slide show advances one step and then the URL is loaded, thus leaving the slide show behind. I’ll agree that’s kind of weird, but it isn’t the kind of steel-jawed trap others are reporting.
On the other hand, I do see the blocking of things like F11 and command-left arrow (to go back). I’ll have to see if I can figure out how to fix that, or will gladly take a contribution from someone who does. It seems like the trap should apply only to a range of keys, and let anything else go past untouched.
In previous versions, there were some reported problems revolving around the Adblock extension, which I don’t run, but I believe those were related to the external links opening, not typing into the address bar. Regardless, S5 does need to be a bit less greedy about devouring keystrokes.
Tyler: good catch! I’ll fix that to act as you describe– unless I decide that trying to skip too far (in either direction) results in nothing happening, like trying to jump to a slide that doesn’t exist. But either way, it’ll be made consistent, which it really isn’t right now.
Ok, here’s a first attempt at a fix for the key trap method. It got a little bigger than I expected, but the steps should be pretty clear. For clarity, the keys() function got renamed to keysup(), and the trap method got renamed to keyspress(). Changed lines are flagged with
// Key trap fix
Example slideshow at
http://www.liggitt.net/s5
Modified script at
http://www.liggitt.net/s5/v11b3/default/slides.js
Basically, what this patch does is monitor whether any modifier keys are pressed (Ctrl/Alt/Shift), hence the need for keyup, keydown, and keypress methods.
When the keypress method is called, if there are any modifier keys pressed, or the key being pressed doesn’t produce a character (key.which == 0, which happens in the case of all function keys, arrow keys, etc), the key event is allowed to bubble. Otherwise, we trap it, so it won’t set of FAYT.
I wasn’t able to get the keyCode of the CMD modifier key on the Mac, since I don’t have access to one. If someone wants to post that, I can update the script to detect that modifier key as well.
An alternate approach (and much more lightweight, which I think I like), would be to only trap numerical keypresses. These are the only things s5 currently handles, and the only thing that users would be expected to type during a presentation.
That would let us avoid the keyup/keydown/keypress state machine, and reduce the scripting overall.
The downside is that if FAYT is enabled, and a user accidentally hits another key during a presentation, havoc is wrought.
Hmmm… my previous comment didn’t go up.
Here’s a fix for the key trap problem. Basically this code does the following things:
1. Registers listeners for all the key events (keyup, keydown, and keypress). the keys() function was changed to keysup() and the trap() function was changed to keyspress(), for clarity’s sake. The keysdown() function was added.
2. In the keysup() and keysdown() functions, we keep track of modifier keys that are pressed (Ctrl/Alt/Shift/Win/Cmd).
3. In the keyspress() (the old trap()) function, if any modifier keys are pressed, we don’t trap. Also, if the keycode of the key that is pressed eqeuals 0 (meaning it does not insert a character, which would be the case for the arrow keys, all the F* keys, Esc, etc) we don’t trap.
Example is available at
http://www.liggitt.net/s5/
The modified script file is at
http://www.liggitt.net/s5/v11b3/default/slides.js
All changed lines are flagged with
// Key trap fix
This is some hot stuff. Thanks!
PS.: about the licensing–the BSD is similar and better known.
Hi Eric,
Really like your s5 application. I use the previous (stable) version all the time! This new version seems to have a problem with my Safari (1.0.3 (v85.8.1) on 10.2.8). Everything of the testbed is there if I look at the html-source. However, the browser window remains almost completely blank. Same test in Firefox 1: no problem.
Thanks!
Hi,
I like the option of pressing a number to go to a specific slide. Very convenient.
I’ve noticed some slightly odd behaviour. I’ve been generating S5 files using XSLT and have found that an empty “handout” div:
<div class=”handout”/>
at the end of the title (first) slide messes up the display of all the others. Just curious about why this would happen.
Luke.
P.S. All the image tags in the introduction slide show aren’t closed, so it fails validation :).
Oops. Forgot to add I’m using firefox 1.0 on Windows XP. The problem seems to occur with S5 1.0 and the latest beta.
Jordan: you’re probably right about changing the trap to only grab numeric keys, although I’m also thinking maybe the trap should grab all alphanumeric keys (and punctuation) just to be on the safe side. Could you post modified trapping code here, or on your site? I’m not skilled enough in JS to know exactly how to go about inverting the trap in that manner. Feel free to make a numeric trap only. I can probably figure out how to modify it from there if I need to.
Jan: I don’t have any problems in Safari 1.2.4 / OS X 10.3.7. Your description sounds like what happens to Safari when markup doesn’t validate, but I just double-checked the testbed and absent a missing
alt
attribute (which I’ve added) there were no validation errors. So I’m stumped.Luke: that feels like a XML parsing error of some kind, based on what I’ve observed here. I converted those to <div class=”handout”></div> and it corrected the problem. When I used <div class=”handout” /> (with or without the space before the close-slash) things went south. The DOM inspector revealed that all of the slides after slide0 had become children of slide0, instead of remaining its siblings. I don’t think that’s a fault of S5, although given that there is some DOM manipulation going on I suppose could be wrong. I’ll dig around and see what I come up with.
Oh, and I fixed the image elements in the intro; thanks for catching that. (Grumble grumble stupid XML syntax rules mutter grumble.)
If all you want to do is trap all keys that would insert a character (and thus trigger FAYT popups), just change the contents of the trap() function from the 1.1beta3 version to the following:
if (!e) {
e = event;
e.which = e.keyCode;
}
try
{
modifierKey = e.ctrlKey || e.altKey;
}
catch(e)
{
modifierKey = false;
}
return modifierKey || e.which == 0;
That’s a much more lightweight approach… I’ve changed the version posted on my site (http://www.liggitt.net/s5) to use this… anyone care to try it and reply with bugs found?
I’m particularly concerned with Opera and the Mac browsers, since I don’t have access to those for testing. I don’t think the
e.altKey
attribute is supported on Opera, hence the try{}catch{} block.The script file is located at http://www.liggitt.net/s5/v11b3/default/slides.js
The trap() function is the only change from the posted 1.1 beta 3 version.
If you viewed this file before, be sure to refresh it, to get past the cached version.
Ha, I think I lied in this comment. When I started writing that, I really intended to do an alphanumeric-only trap, but then I started thinking about all the things that would break:
Ctrl+F: Find
Ctrl+T: New tab
Alt+D: Focus to address bar
Alt+(any character): Keyboard menu access
I think we need to try to recognize if the Ctrl or Alt key is pressed, and let the key event through if it is. That’s what the latest code does.
Jordan: excellent. In my local test files, your latest code seems to work fine– alphanumeric keys are allowed through untouched, as are function keys. However, command-key combinations seem to be blocked in OS X. I couldn’t get the window to close with command-W, nor could I reload with command-R.
I have no idea how to find out the keycode for the command key, but if you can put up a testing page that detects any key whatsoever I can hit it and tell you what’s returned for command. I tried to create a testing page of my own but it didn’t return codes for any of the modifier keys (shift, control, option, command, function).
Well, I found a OS X laptop to test this change on… this change works on Firefox, Safari, and IE for Mac.
New trap() function body (only change is the added .metaKey part):
// Key trap fix, new function body for trap()
function trap(e) {
if (!e) {
e = event;
e.which = e.keyCode;
}
try
{
modifierKey = e.ctrlKey || e.altKey || e.metaKey;
}
catch(e)
{
modifierKey = false;
}
return modifierKey || e.which == 0;
}
The only one I’m not sure about now is Opera. Any takers?
I may have missed mention of this somewhere, but on Safari, the page-up/down keys don’t work on the outline view.
The incremental display in Opera does not work. It doesn’t even go backwards to OSF to make the incremental pages visible.
Hi,
I’ve been using S5 in my classes. Thanks for the great work.
Though I have a small suggestion: allow the author to enable/disable the mouseover event. Often the audience needs to copy&paste text from the slides and the “on mouse over move next slide” behaviour makes it really difficult.
Are you planning on adding any feature regarding this ?
Regards.
PS: I just lost the comment that I had written just because I had not filled the e-mail field (!). Arggh!
Sérgio: I presume you mean the presenter, not the audience, needs to copy and paste text. Is it possible to just have the presentation document open as text, to get around this?
S5 isn’t using the
onmouseover
event for navigation. You probably mean thedocument.onclick
event, which results in ago(1)
to move forward one slide.Ben: I really mean the audience. Occasionally, in workshops, the audience has access to the presentation using a browser so that they can copy code blocks and try them.
Do you know any simple hack so that the onclick event is disabled outside the navigation links ?
Wish-list feature:
What if a trick was employed which would allow images to be loaded only once a ‘slide’ is reached? At present, the entire presentation is run simultaneously. With 3 videos encoded as GIF’s the presentation becomes a ‘beast’ to: 1) load; 2) Run.
I like very much Roy’s whish-list,… alternatively a splash screen and the content (text+image) loading in background? …
The problem is mainly that all videos run at the same time throughout the whole presentation. Trifide’s suggestion means you needn’t tolerate the loading time. The only solution/workaround I can think of (to the numbers of videos) is ‘chunking’. You split the presentation into pieces so that the last slide links to the first one of its subsequent.
Another thing I had in mind is packing it all up under an interface a la WordPress.
Sorry if this is a duplicate post, but I don’t think the other one went through, because I disabled javascript.
External links are not working in firefox on winXP (for example, “Opera Show” on slide 3). They work fine in IE and Netscape 7.2. I tried outline mode and disabling the popup blocker. The external link still doesn’t work in firefox. I could get it to work, however, if I disabled javascript.
Hm.. It seems to be an adblock extention problem. If I disable that it works fine.. odd..
I love the tool, and I’m going to use it for some presentations I’m giving in the next two months. But I have encountered one problem in IE (v. 6.0.28) on Windows XP Professional:
Whenever I try to resize the browser window, I get the following error message (and the error message window will not close without shutting down IE through the task manager):
A Runtime Error has occurred.
Do you wish to Debug?
Line: 422
Error: invalid argument.
I apologize if this is a duplicate post, but I did not see this error reported elsewhere in the comments.
Damn that stuff looks cool.
Thanks.
sylvia
http://blog.5p.org.uk
I’ve just started using S5 (in conjunction with an OmniOutliner export plug-in) for classroom lectures. One thing I’d like to do, but haven’t figured out, is to place an image behind the bulleted text. Any suggestions?
Hello folks!
S5 was mentioned in the German magazine Internet World (jeah, very German name, I know). In a two-side article it shows the advantages of S5 in opposition to Powerpoint and basic configuration.
Sadly the article isn’t available for free. A brief summary can be found on the German S5 Website.
I have a feature request/suggestion:
The S5 content model is currently flat. However, presentations typically have a hierarchy; they very commonly are divided into sections, with each section break indicated with its own title slide.
I thus propose that S5 allow for a div with a “section” class attribute within the “presentation” div. The first slide within that div would thus be the title slide for that section.
The other — less ideal — option would be to keep the current structure, but to allow an additional “section” class attribute on a a slide div to signal the need for different formatting. I don’t really like this approach myself.