Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am working on a project where only keypad is available(no mouse), so I cannot use controls like buttons. The problem i am having is I can use commands to navigate through my views on the "main_view_model". However, when I load my views, I have to use the same keypad to do stuff on the child view. Any Ideas?
Posted

1 solution

What I understood is. you are trying to develope a website without using the mouse.

In this way if you enter any text in textbox and want to search any value(Assumed) then you need a button to click to fire the event.

so in this way. in my knowledge you should use jQuery button codes. as you might know that the buttons clicked can be identified by jQuery code.

below is just an example of enter key pressing on text search.
C#
$('#txtSearchProdAssign').keypress(function (e) {
 var key = e.which;
 if(key == 13)  // the enter key code
  {
    $('input[name = butAssignProd]').click();
    return false;
  }
});


so key==13 is for Enter, in this way you can find for other keys
use this LINK for key reference and put the If condition and make your own commands.

Hope this helps
 
Share this answer
 
Comments
Thaps1 30-Jul-14 9:14am    
Thanks,but I am not building a website it's a WPF application which will be deployed on a panel PC which has about 10 function key. Is there a way which is nice and elegant to re-map these keys to different commands either to a different view-model/main viewmodel?

Thanks and I appreciate taking time to help me.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900