Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IWButtons Hotkey property and the &-sign in Captions
#3
(09-20-2019, 10:43 AM)Jose Nilton Pace Wrote: Hi Soren. You can put this code in your form:
Code:
<head>
  <script>
    $(function() {
      document.body.onkeydown = function(e){
        if (e.keyCode == 121) {
          $("#IWBUTTON_GRAVAR").click(); /*F10*/
        }
      };
    });
  </script>
</head>

Hi Jose,

It works nicely. Thanks. Also with (e.key === "F10"), which is a bit easier than remembering all the keycodes.

I have tried with (e.keycode == 27) and (e.key === 'Escape') as well, trying to trap the ESC key to click the "cancel" button, but it do not work. It's like the ESC keydown is being blocked before getting to the function. Do you know if there is anything else one has to do to get the ESC to be passed to the function ?

Regards
Soren
Reply


Messages In This Thread
RE: IWButtons Hotkey property and the &-sign in Captions - by SorenJensen - 09-20-2019, 02:46 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)