Menu Keyhandler
 

Keyhandler on every page

Set as default in the layout.

Furthering the experiment with the conditional display of outbound links and the hiding and showing of elements on the page I am trying the addition of a keyhandler that is the default in the layout template.

This page has such a keyhandler. It also has an INPUT form tag (see UITextField/UITextView discussion on StackOveflow)

Top

display:list-item

I changed the handler that shows a hidden link from "block" to "list-item".

This argument for the display: style does not immediately get explained on the W3C Schools website.

Lovejoy maps

This is a page that I mean when I provide a link to something that if a visitor finds they are unlikely to return.

Having put the link to MyMaps I see that I probably wouldn't return.

More Thoughts

Having seen that the keyhandler approach seems to be pretty inobtrusive to the loading of the page I thought another way would be to work out a way to load the external page when the key is pressed.

The code would be pretty much the same as the shim code but would load the page and would not need the modal popup. The code for the PDF shim is on this page and my documentation of it is on my PDF Phylosophy page.

keyhandler.js

I now have an external Javascript file that contains the functions for the handling of keys.

Not all pages will require the keyhandler and it seems to be pretty benign when linked to a webpage.

At the moment I have the keys 1 to 9 and "a" to "c". The "s" key is handled to display the Webmaster Notes.

I could add function key handling in the future but I feel that I have more than enough keys to achieve my needs.

I will eventually add this to my Sixth Template unless something detrimental come out of adding it pages that I am regularly updating.

Benefits of the keeyhandler approach

It is very useful to check dead links. Many links that I have used in the past have expired and some have been changed by whoever hosted them in the first place

Links

Link to PDF Disabled

If you require a copy please email tempusfugit.me.uk

Top

References - a note on these -

  • 1 - CSS Display - https://developer.mozilla.org/en-US/docs/Web/CSS/display
  • 2 - UITextField/UITextView - https:// developer.apple.com/ documentation/uikit/ uitextview - This is an Apple thing and not totally relevant to what I am trying to do here.
  • 3 - Ideas to get this to work on iOS - https:// stackoverflow.com/questions/13005969/ it-is-possible-to-show-keyboard-without- aiusing-uitextfield-and-uitextview-iphone