0

How do I set the accesskey property of a Button control in XPages to be a function key, e.g. F1?

The property panel for a Button in XPages only allows a single character. I can compute the value, but I'm not expecting a return value of F1 to work. Is it possible to set the accesskey to one of the function keys or are those keys restricted as browser shortcuts?

Thomas
  • 4,119
  • 2
  • 33
  • 49
Paul Stephen Withers
  • 15,699
  • 1
  • 15
  • 33

2 Answers2

3

Access Key doesn't work for those keys (I have read it somewhere I don't remember. I'll update when I find).

You may also use Dojo for cross-browser solution.

This is an example how to register keypress events:

http://dojo-toolkit.33424.n3.nabble.com/how-to-listen-for-onkepress-event-td1870699.html

This is the list of keys for Jojo:

http://dojotoolkit.org/reference-guide/dojo/keys.html

Serdar Basegmez
  • 3,355
  • 16
  • 20
2

This Stack Overflow question (with answers) might be useful for you: Handling key-press events (F1-F12) using JavaScript and jQuery, cross-browser

Community
  • 1
  • 1
Per Henrik Lausten
  • 21,331
  • 3
  • 29
  • 76