开发者

How to set HTML AccessKey using extJS

开发者 https://www.devze.com 2023-02-08 21:29 出处:网络
Hopefully everyone knows the benefit of setting the HTML accesskey property on input-fields and buttons (and various others): It makes the page easy to navigate by enabeling shortcuts (in IE by pressi

Hopefully everyone knows the benefit of setting the HTML accesskey property on input-fields and buttons (and various others): It makes the page easy to navigate by enabeling shortcuts (in IE by pressing 'Alt' and the accesskey).

My problem is now that I have been asked to look into extJS for building our forms (and web stuff en general) as this is delivered with our IceBreak server.

I've been able to build a form and at first I figured that I must be able to set the accesskey the same way as all the other properties.开发者_运维百科.. but that does not seem to be working =0/

I can see in How to implement accesskey on ExtJs tabs? and http://www.sencha.com/forum/showthread.php?22812-AccessKeys-(Global-keymap) that it is possible to make something similar to accesskeys, but they seem a lot like work-arounds to me.

I just need for Alt and 0-9 or a-z to focus/active the elements. Nothing more fancy than that.

Is there a SIMPLE way of getting extJS to set the accesskey? (preferably on the html-element)


I was about to suggest using the KeyMap component, but I see that the forum links already do that. I have used the keymap object before to create keyboard shortcuts in the past. We replicated the keyboard shortcuts that existed in the thick-client legacy application we were replacing.

If you follow the guidelines in the links you posted, that should get you to where you are going. Following this method is what you'll need to do.

0

精彩评论

暂无评论...
验证码 换一张
取 消