It is currently Thu Nov 21, 2019 8:47 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: [BUG-v571] AddKeyboardShortcut fails on shift+padXX
PostPosted: Mon Oct 07, 2019 8:19 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Dec 23, 2009 10:14 pm
Posts: 3122
Location: Boston, MA
Code:
EnableExplicit
Define.i evWW, evM
#EV_KS_0          = 100
#EV_KS_Pad0       = 101
#EV_KS_SHIFT_0    = 102
#EV_KS_SHIFT_Pad0 = 103
If OpenWindow(0, 0, 0, 220, 220, "BUG v571 - Shift+Padn menu event?", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  StringGadget(1, 10, 20, 150, 32, "ABC")
  AddKeyboardShortcut(0, #PB_Shortcut_0, #EV_KS_0)
  AddKeyboardShortcut(0, #PB_Shortcut_Pad0, #EV_KS_Pad0)
  AddKeyboardShortcut(0, #PB_Shortcut_Shift | #PB_Shortcut_0, #EV_KS_SHIFT_0)
  AddKeyboardShortcut(0, #PB_Shortcut_Shift | #PB_Shortcut_Pad0, #EV_KS_SHIFT_Pad0)
  Repeat
    evWW = WaitWindowEvent()
    Select evWW
    Case #PB_Event_Menu
      evM = EventMenu()
      ;ClearDebugOutput()
      If evM = #EV_KS_0
        Debug "Just 0"
      ElseIf evM = #EV_KS_Pad0
        Debug "Pad0"
      ElseIf evM = #EV_KS_SHIFT_0
        Debug "Shift+0"
      ElseIf evM = #EV_KS_SHIFT_Pad0
        Debug "Shift+Pad0"
      EndIf
    Case #PB_Event_CloseWindow
      Break
    EndSelect
  ForEver
EndIf

_________________
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum


Top
 Profile  
Reply with quote  
 Post subject: Re: [BUG-v571] AddKeyboardShortcut fails on shift+padXX
PostPosted: Tue Oct 08, 2019 6:44 am 
Offline
Addict
Addict

Joined: Sat Jun 30, 2007 8:04 pm
Posts: 3362
Can you provide a reference for the EV_KS constants? Where are you getting these?


Top
 Profile  
Reply with quote  
 Post subject: Re: [BUG-v571] AddKeyboardShortcut fails on shift+padXX
PostPosted: Tue Oct 08, 2019 12:49 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Dec 23, 2009 10:14 pm
Posts: 3122
Location: Boston, MA
I just made them, you can change them.

_________________
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum


Top
 Profile  
Reply with quote  
 Post subject: Re: [BUG-v571] AddKeyboardShortcut fails on shift+padXX
PostPosted: Tue Oct 08, 2019 1:45 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Fri Apr 25, 2003 4:34 pm
Posts: 918
Location: Canada
Maybe #PB_Shortcut_Insert is taking priority over #PB_Shortcut_Shift|#PB_Shortcut_Pad0 for some reason ?

_________________
Image Image


Top
 Profile  
Reply with quote  
 Post subject: Re: [BUG-v571] AddKeyboardShortcut fails on shift+padXX
PostPosted: Wed Oct 09, 2019 6:59 pm 
Offline
PureBasic Expert
PureBasic Expert

Joined: Sun Apr 12, 2009 6:27 am
Posts: 3458
https://devblogs.microsoft.com/oldnewthing/20040906-00/?p=37953

_________________
Egypt my love


Top
 Profile  
Reply with quote  
 Post subject: Re: [BUG-v571] AddKeyboardShortcut fails on shift+padXX
PostPosted: Wed Oct 09, 2019 10:05 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Dec 23, 2009 10:14 pm
Posts: 3122
Location: Boston, MA
Doh :evil:
That explains it. Shared NumLock with Shift key.

_________________
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye