keyboard-navigation

KeyBoard Navigation for menu using jquery

ぃ、小莉子 提交于 2019-12-18 05:12:43
问题 I am trying to add keyboard navigation to Menu(ul li based ) , i have bound the keydown event to menu (or should i bind keydown to the document ?) the handler function used is given below KeyDown: function(e) { var toFocus = false; if (e.keyCode == 38) { toFocus = $((e.target/* li */).next()[0]); } if (e.keyCode == 40) { toFocus = $((e.target).next()[1]); } if (toFocus) { $(e.target).attr('tabIndex', '-1'); $(toFocus).attr('tabIndex', '0'); toFocus.focus(); return false; } } here i get e

How can I find an item in a WPF ListBox by typing?

让人想犯罪 __ 提交于 2019-12-17 22:54:48
问题 Most list boxes allow you to find items within them by typing the first letters of the displayed text. If the typed letters match multiple items, then you can keep adding letters to narrow the search. I need to do this in a WPF ListBox . However, the items aren't plain strings -- they're custom objects that I present using a DataTemplate . I'm hoping that there's a way I can provide a path to the string value that should be used for this textual keyboard navigation of the ListBox items. How

keyboard navigation using knockout

耗尽温柔 提交于 2019-12-13 02:35:48
问题 I have an observable array in my viewmodel which I am binding to a list of div elements using foreach and template binding. How can I navigate through these div elements using keyboard's up and down arrow key. The way I want is when the user clicks on 1 of the div element that gets the focus and when he presses the down arrow key the next div element gets focus and similarly when he presses the up arrow key the previous div gets focus. I have searched all over the internet but didn't came

p:selectOneMenu doesn't receive focus on tab key navigation

隐身守侯 提交于 2019-12-13 00:40:38
问题 I have a form with <p:inputText> and <p:selectOneMenu> components next to each other. When the focus is on the input text and I press the tab key in order to navigate to select one menu by keyboard, then the focus is lost. I don't see which component is focused. How can I get the focus on the select one menu when I tab into it? 回答1: You need to use the tabindex property of <p:inputText> and <p:selectOneMenu> , as explained in the documentation. 回答2: Using the tabindex property makes it

Can I navigate into and out of a wpf combo box using arrow keys instead of tab?

坚强是说给别人听的谎言 提交于 2019-12-06 07:53:00
I have wpf UserControl containing a combobox and a textbox in a row. Currently the only way to move between the components is to tab between them, but I would like to also be able to switch from the combobox to the textbox using the left and right arrow keys. It is not as easy as just slapping an eventhandler on the keyup event. void ComboKeyUp( object sender, KeyEventArgs e ) { if( e.Key == Key.Right) { e.Handled = true; textbox.Focus(); } } ...because the combo will change value despite the event being reported as handled. Is there a way to do this that doesn't simultaneously break the up

keyboard navigation with arrow keys (next and back) for changing filenames

耗尽温柔 提交于 2019-12-03 00:51:25
问题 I have a bunch of html files with different file-names, that I need to add an option to use keyboard arrow keys to navigate (previous and next file). The file-names are not dynamic.. for example: filename.html, anotherfile.html, thirdone.html etc. So I need what's in the .js file for the navigation, and what I should link the previous, next buttons on the html file? 回答1: If you were to define two ID's on two <a> tags like so: <a id="prev" href="filename.html">prev</a> <a id="next" href=

keyboard navigation with arrow keys (next and back) for changing filenames

喜你入骨 提交于 2019-12-02 13:29:59
I have a bunch of html files with different file-names, that I need to add an option to use keyboard arrow keys to navigate (previous and next file). The file-names are not dynamic.. for example: filename.html, anotherfile.html, thirdone.html etc. So I need what's in the .js file for the navigation, and what I should link the previous, next buttons on the html file? If you were to define two ID's on two <a> tags like so: <a id="prev" href="filename.html">prev</a> <a id="next" href="thirdone.html">next</a> You could do something like this in navigation.js and include it from every page: // when

How can I prevent tabbing to a UserControl?

纵饮孤独 提交于 2019-11-30 08:22:51
问题 I have a custom Popup that overlays part of my screen. When it is open, I want to disable tabbing into the UserControl behind it. I do not want to use the IsEnabled property because I do not want to gray out all the controls. Is there another property that does the same thing? IsTabStop only prevents the tab from stopping on the UserControl itself, not it's children, and IsFocusable isn't a valid property for a UserControl. 回答1: Use the KeyboardNavigation.TabNavigation Attached Property with

Is there a workaround to Safari's/Opera's bug that you can't tab through hyperlinks?

一世执手 提交于 2019-11-29 05:41:14
问题 In IE, Firefox, Chrome and most Windows-based interfaces that I've used, the Tab key can be used to navigate from one form field or hyperlink to the next (e.g. "actionable" items) ( note: I have not tested on other Operating Systems ) However Safari and Opera skip all hyperlinks in a web page when tabbing. IMHO its a usability bug but I digress. Is there a workaround/hack to make Safari and/or Opera navigate through these links? I've noticed that Opera will accept the tabindex attribute if

How can I find an item in a WPF ListBox by typing?

為{幸葍}努か 提交于 2019-11-28 20:56:06
Most list boxes allow you to find items within them by typing the first letters of the displayed text. If the typed letters match multiple items, then you can keep adding letters to narrow the search. I need to do this in a WPF ListBox . However, the items aren't plain strings -- they're custom objects that I present using a DataTemplate . I'm hoping that there's a way I can provide a path to the string value that should be used for this textual keyboard navigation of the ListBox items. How is this possible? You could try setting IsTextSearchEnabled to true and using the TextSearch.TextPath