Silverfrost Forums

Welcome to our forums

%ac[Ins] not working

11 Sep 2012 9:27 #10728

Hi. I've just noticed that the Ins accelerator key (%ac[Ins]) appears to have stopped working. I'm not sure on which version of the compiler it stopped, but code compiled a year or two back works okay. The window is getting WM_KEYDOWN events for the Ins key but the accelerator doesn't work. Other keys like Home and End are okay. I get the same issue when tested on XP and Win 7.

! Demonstrate failure of Insert hotkey
winapp
use mswin

external OnHome, OnIns, OnEnd

i = winio@('%ca[Test Hotkey - Press Home, Insert or End]&')
i = winio@('%ac[Home]&', OnHome)
i = winio@('%ac[Ins]&', OnIns)    ! doesn't work
i = winio@('%ac[End]', OnEnd)
end program

! Handle hotkey presses - notify which key was pressed
integer function OnHome()
  i = winio@('%ca[Home]')
  OnHome = 2
end function OnHome
integer function OnIns()
  i = winio@('%ca[Ins]')
  OnIns = 2
end function OnIns
integer function OnEnd()
  i = winio@('%ca[End]')
  OnEnd = 2
end function OnEnd

[/code]

11 Sep 2012 10:35 #10729

Quick workaround.

! Temporary workaround for failure of Insert hotkey 
winapp 
use mswin 

external OnHome, OnIns, OnEnd, KB_func
call ADD_KEYBOARD_MONITOR@( KB_func)
i = winio@('%ca[Test Hotkey - Press Home, Insert or End]&') 
i = winio@('%ac[Home]&', OnHome) 
i = winio@('%ac[INS]&', OnIns)    ! doesn't work 
i = winio@('%ac[End]', OnEnd) 
end program 

! Handle hotkey presses - notify which key was pressed 
integer function OnHome() 
  i = winio@('%ca[Home]') 
  OnHome = 2 
end function OnHome 
integer function OnIns() 
  i = winio@('%ca[Insert]') 
  OnIns = 2 
end function OnIns 
integer function OnEnd() 
  i = winio@('%ca[End]') 
  OnEnd = 2 
end function OnEnd 
integer function KB_func() 
include <windows.ins>
integer OnIns
  KB_func = 2 
  IF(clearwin_info@('keyboard_key') .eq. 338)then
    KB_func = OnIns()
  endif
end function KB_func 
11 Sep 2012 3:30 #10731

I have logged this for investigation.

13 Sep 2012 7:00 #10734

This regression has now been fixed.

Please login to reply.