Skip to main content

Microsoft Silverlight

Unanswered Question Disable F hotkeys like F5,F4... on IERSS Feed

(0)

jhunter85
jhunter85

Member

Member

6 points

12 Posts

Disable F hotkeys like F5,F4... on IE

We have silverlight application. In Firefox, F5,F1 don't refresh.I can catch it only from SL. It is good. But in Internet Explorer they refresh page or open help also i catch from SL.

I want to disable F5 to refresh in Internet Explorer. 

I tried all methods especially about javascript in live.com or google searches. But they dont work.

Can i disable from Silverlight or javascript?

 i dont understand i dont need to do anything in Firefox. But in Internet Explorer i do everything but it is still bad

Thank you very much.

Yusuf Avcı
CodeVine Software
http://www.codevine.net

jhunter85
jhunter85

Member

Member

6 points

12 Posts

Re: Disable F hotkeys like F5,F4... on IE

Please someone tells this problem to microsoft internet explorer team. They should fix them. :(

Yusuf Avcı
CodeVine Software
http://www.codevine.net

MarkMonster
MarkMonster

Contributor

Contributor

5220 points

1,046 Posts

Re: Disable F hotkeys like F5,F4... on IE

I'm not sure, but I can think of this bug/feature thing to be by design. Because it might be a security issue if take over the browsers function keys. But I'm no Microsoft employee, but this is something I can imagine.

Mark Monster - MCPD Enterprise
http://mark.mymonster.nl
Silverlight and Expression Insiders UG

Dont forget to click "Mark as Answer" on the post that helped you.

jhunter85
jhunter85

Member

Member

6 points

12 Posts

Re: Re: Disable F hotkeys like F5,F4... on IE

If microsoft thinks that silverlight kills windows application, they should improve internet explorer. Especialy about performance and keyboard,mouse functions...

Yusuf Avcı
CodeVine Software
http://www.codevine.net

MarkMonster
MarkMonster

Contributor

Contributor

5220 points

1,046 Posts

Re: Re: Disable F hotkeys like F5,F4... on IE

 I don't agree in here. I can understand your situation but we have to remind ourselves Silverlight is hosted in an application. This can be Internet Explorer, Firefox, Chrome, Safari or any other browser. I don't think it's a natural good thing to take over the application that's hosting the Silverlight plugin. I even think it's rather strange it's supported by Firefox. If I as a user use a browser shortcut, I want this to work. When this behaviour is not wanted a browser application is maybe not the thing you're looking for. You can built of course a WPF application or make use of one of the following articles about hosting a Silverlight plugin inside your own application.

 

http://silverlightuk.blogspot.com/2008/07/silverlight-desktop-application.html

http://blendables.com/labs/Desklighter/DesklighterStory.aspx

 

Mark Monster - MCPD Enterprise
http://mark.mymonster.nl
Silverlight and Expression Insiders UG

Dont forget to click "Mark as Answer" on the post that helped you.

GuinnessKMF
GuinnessKMF

Member

Member

222 points

58 Posts

Re: Re: Re: Disable F hotkeys like F5,F4... on IE

Mark, what you're missing is that IE does allow you to disable F5, just not for silverlight (although this may indeed be a bug).  It's possible to write javascript that cancels propigation of the keypress event for F5, preventing the page from refreshing.  But when a silverlight control has focus, you cannot capture the F5 event from javascript or silverlight.

 As it stands right now you can (very ugly) hack your way around it by keeping focus on an HTML element, and routing keystrokes into silverlight (meaning you have to implement your own key event stack).

I agree with you that we are in the context of a browser, but all silverlight is, is shoehorning your application into an enviroment that's not ideal, it's an ubiquity of deployment issue that makes silverlight the right choice.  Now if a customer is looking at your silverlight page, your silverlight control has focus and they hit F5, meaning refresh, I would think they would want the control's content to refresh, not the control's host.  This is especially true if your silverlight application implements its own concept of 'pages', someone would want to refresh a page in your application, not start over and have to log back in.  Same goes for F1 or F3 ... If focus is currently in the silverlight application, I likely want help or to search within the application.

-Kellen
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities