Keyboard Shortcut Question

Everything else that doesn't fall into one of the other PB categories.
ebs
Enthusiast
Enthusiast
Posts: 561
Joined: Fri Apr 25, 2003 11:08 pm

Keyboard Shortcut Question

Post by ebs »

Does anyone know if there is a keyboard shortcut for the '5' key on the numeric keypad, when the NumLock state is OFF? If not, how about a 'VK_xxx' constant that can be used with the 'GetKeyboardState_()' API function? All of the other keys on the keypad have alternate functions, i.e., '3' is 'PageDown', except '5', and I need to be able to catch the keypress.

Thanks,
Eric
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

erh... maybe the #PB_Key_Pad5 will work:?:

EDIT:


Code: Select all

 


NAME                 VALUE 
#PB_AlphaSprite 2 
#PB_Button_Default 2 
#PB_Button_Left 1 
#PB_Button_MultiLine 256 
#PB_Button_Right 8192 
#PB_Button_Toggle 512 
#PB_CheckBox_Center 4099 
#PB_CheckBox_Right 768 
#PB_Clipboard_Image 512 
#PB_ClipboardImage 2 
#PB_ComboBox_Editable 2 
#PB_ComboBox_LowerCase 2 
#PB_ComboBox_UpperCase 16384 
#PB_Date_Day 8192 
#PB_Date_Hour 3 
#PB_Date_Minute 4 
#PB_Date_Month 5 
#PB_Date_Second 1 
#PB_Date_Week 6 
#PB_Date_Year 2 
#PB_Event_ActivateWindow 0 
#PB_Event_CloseWindow 6 
#PB_Event_Gadget 16 
#PB_Event_Menu 13100 
#PB_Event_MoveWindow 13101 
#PB_Event_Repaint 3 
#PB_Event_SizeWindow 15 
#PB_Event_SysTray 75008 
#PB_EventActivateWindow 13102 
#PB_EventCloseWindow 6 
#PB_EventGadget 16 
#PB_EventMenu 13100 
#PB_EventMoveWindow 13101 
#PB_EventRepaint 3 
#PB_EventSizeWindow 15 
#PB_EventSysTray 75008 
#PB_EventType_Change 13102 
#PB_EventType_Focus 768 
#PB_EventType_LeftClick 256 
#PB_EventType_LeftDoubleClick 0 
#PB_EventType_LostFocus 2 
#PB_EventType_ReturnKey 512 
#PB_EventType_RightClick 1281 
#PB_EventType_RightDoubleClick 1 
#PB_FileSystem_Archive 3 
#PB_FileSystem_Compressed 32 
#PB_FileSystem_Force 2048 
#PB_FileSystem_Hidden 2 
#PB_FileSystem_Normal 2 
#PB_FileSystem_ReadOnly 128 
#PB_FileSystem_Recursive 1 
#PB_FileSystem_System 1 
#PB_Font_Bold 4 
#PB_Font_Default 256 
#PB_Font_Italic -1 
#PB_Image_Border 512 
#PB_Key_0 512 
#PB_Key_1 11 
#PB_Key_2 2 
#PB_Key_3 3 
#PB_Key_4 4 
#PB_Key_5 5 
#PB_Key_6 6 
#PB_Key_7 7 
#PB_Key_8 8 
#PB_Key_9 9 
#PB_Key_A 10 
#PB_Key_Add 30 
#PB_Key_All 78 
#PB_Key_Apostrophe -1 
#PB_Key_B 40 
#PB_Key_Back 48 
#PB_Key_BackSlash 14 
#PB_Key_C 43 
#PB_Key_Capital 46 
#PB_Key_Comma 58 
#PB_Key_D 51 
#PB_Key_Decimal 32 
#PB_Key_Delete 83 
#PB_Key_Divide 211 
#PB_Key_Down 181 
#PB_Key_E 208 
#PB_Key_End 18 
#PB_Key_Equals 207 
#PB_Key_Escape 13 
#PB_Key_F 1 
#PB_Key_F1 33 
#PB_Key_F10 59 
#PB_Key_F11 68 
#PB_Key_F12 87 
#PB_Key_F2 88 
#PB_Key_F3 60 
#PB_Key_F4 61 
#PB_Key_F5 62 
#PB_Key_F6 63 
#PB_Key_F7 64 
#PB_Key_F8 65 
#PB_Key_F9 66 
#PB_Key_G 67 
#PB_Key_Grave 34 
#PB_Key_H 41 
#PB_Key_Home 35 
#PB_Key_I 199 
#PB_Key_Insert 23 
#PB_Key_J 210 
#PB_Key_K 36 
#PB_Key_L 37 
#PB_Key_Left 38 
#PB_Key_LeftAlt 203 
#PB_Key_LeftBracket 56 
#PB_Key_LeftControl 26 
#PB_Key_LeftShift 29 
#PB_Key_M 42 
#PB_Key_Minus 50 
#PB_Key_Multiply 12 
#PB_Key_N 55 
#PB_Key_NumLock 49 
#PB_Key_O 69 
#PB_Key_P 24 
#PB_Key_Pad0 25 
#PB_Key_Pad1 82 
#PB_Key_Pad2 79 
#PB_Key_Pad3 80 
#PB_Key_Pad4 81 
#PB_Key_Pad5 75 
#PB_Key_Pad6 76 
#PB_Key_Pad7 77 
#PB_Key_Pad8 71 
#PB_Key_Pad9 72 
#PB_Key_PadComma 73 
#PB_Key_PadEnter 179 
#PB_Key_PageDown 156 
#PB_Key_PageUp 209 
#PB_Key_Pause 201 
#PB_Key_Period 197 
#PB_Key_Q 52 
#PB_Key_R 16 
#PB_Key_Return 19 
#PB_Key_Right 28 
#PB_Key_RightAlt 205 
#PB_Key_RightBracket 184 
#PB_Key_RightControl 27 
#PB_Key_RightShift 157 
#PB_Key_S 54 
#PB_Key_Scroll 31 
#PB_Key_SemiColon 70 
#PB_Key_Slash 39 
#PB_Key_Space 53 
#PB_Key_Subtract 57 
#PB_Key_T 74 
#PB_Key_Tab 20 
#PB_Key_U 15 
#PB_Key_Up 22 
#PB_Key_V 200 
#PB_Key_W 47 
#PB_Key_X 17 
#PB_Key_Y 45 
#PB_Key_Z 21 
#PB_ListIcon_AlwaysShowSelection 44 
#PB_ListIcon_CheckBoxes 8 
#PB_ListIcon_Checked 1 
#PB_ListIcon_FullRowSelect 2 
#PB_ListIcon_GridLines 1073741824 
#PB_ListIcon_HeaderDragDrop 65536 
#PB_ListIcon_MultiSelect 268435456 
#PB_ListIcon_Selected 4 
#PB_MemorySprite 1 
#PB_MessageRequester_Ok 1 
#PB_MessageRequester_YesNo 0 
#PB_MessageRequester_YesNoCancel 4 
#PB_OS_Windows_2000 3 
#PB_OS_Windows_95 50 
#PB_OS_Windows_98 10 
#PB_OS_Windows_Futur 30 
#PB_OS_Windows_ME 100 
#PB_OS_Windows_NT3_51 40 
#PB_OS_Windows_NT_4 5 
#PB_OS_Windows_XP 20 
#PB_PixelFormat_15Bits 60 
#PB_PixelFormat_16Bits 2 
#PB_PixelFormat_24Bits_BGR 3 
#PB_PixelFormat_24Bits_RGB 5 
#PB_PixelFormat_32Bits_BGR 4 
#PB_PixelFormat_32Bits_RGB 7 
#PB_PixelFormat_8Bits 6 
#PB_ProcessPureBasicEvents 1 
#PB_ProgressBar_Smooth -522133279 
#PB_ProgressBar_Vertical 1 
#PB_Requester_MultiSelection 4 
#PB_Shortcut_0 1 
#PB_Shortcut_1 48 
#PB_Shortcut_2 49 
#PB_Shortcut_3 50 
#PB_Shortcut_4 51 
#PB_Shortcut_5 52 
#PB_Shortcut_6 53 
#PB_Shortcut_7 54 
#PB_Shortcut_8 55 
#PB_Shortcut_9 56 
#PB_Shortcut_A 57 
#PB_Shortcut_Add 65 
#PB_Shortcut_All 107 
#PB_Shortcut_Alt -1 
#PB_Shortcut_Apps 262144 
#PB_Shortcut_B 93 
#PB_Shortcut_Back 66 
#PB_Shortcut_C 8 
#PB_Shortcut_Capital 67 
#PB_Shortcut_Clear 20 
#PB_Shortcut_Control 12 
#PB_Shortcut_D 131072 
#PB_Shortcut_Decimal 68 
#PB_Shortcut_Delete 110 
#PB_Shortcut_Divide 46 
#PB_Shortcut_Down 111 
#PB_Shortcut_E 40 
#PB_Shortcut_End 69 
#PB_Shortcut_Escape 35 
#PB_Shortcut_Execute 27 
#PB_Shortcut_F 43 
#PB_Shortcut_F1 70 
#PB_Shortcut_F10 112 
#PB_Shortcut_F11 121 
#PB_Shortcut_F12 122 
#PB_Shortcut_F13 123 
#PB_Shortcut_F14 124 
#PB_Shortcut_F15 125 
#PB_Shortcut_F16 126 
#PB_Shortcut_F17 127 
#PB_Shortcut_F18 128 
#PB_Shortcut_F19 129 
#PB_Shortcut_F2 130 
#PB_Shortcut_F20 113 
#PB_Shortcut_F21 131 
#PB_Shortcut_F22 132 
#PB_Shortcut_F23 133 
#PB_Shortcut_F24 134 
#PB_Shortcut_F3 135 
#PB_Shortcut_F4 114 
#PB_Shortcut_F5 115 
#PB_Shortcut_F6 116 
#PB_Shortcut_F7 117 
#PB_Shortcut_F8 118 
#PB_Shortcut_F9 119 
#PB_Shortcut_G 120 
#PB_Shortcut_H 71 
#PB_Shortcut_Help 72 
#PB_Shortcut_Home 47 
#PB_Shortcut_I 36 
#PB_Shortcut_Insert 73 
#PB_Shortcut_J 45 
#PB_Shortcut_K 74 
#PB_Shortcut_L 75 
#PB_Shortcut_Left 76 
#PB_Shortcut_LeftWindows 37 
#PB_Shortcut_M 91 
#PB_Shortcut_Menu 77 
#PB_Shortcut_Multiply 18 
#PB_Shortcut_N 106 
#PB_Shortcut_Next 78 
#PB_Shortcut_Numlock 34 
#PB_Shortcut_O 144 
#PB_Shortcut_P 79 
#PB_Shortcut_Pad0 80 
#PB_Shortcut_Pad1 96 
#PB_Shortcut_Pad2 97 
#PB_Shortcut_Pad3 98 
#PB_Shortcut_Pad4 99 
#PB_Shortcut_Pad5 100 
#PB_Shortcut_Pad6 101 
#PB_Shortcut_Pad7 102 
#PB_Shortcut_Pad8 103 
#PB_Shortcut_Pad9 104 
#PB_Shortcut_Pause 105 
#PB_Shortcut_Print 19 
#PB_Shortcut_Prior 42 
#PB_Shortcut_Q 33 
#PB_Shortcut_R 81 
#PB_Shortcut_Return 82 
#PB_Shortcut_Right 13 
#PB_Shortcut_RightWindows 39 
#PB_Shortcut_S 92 
#PB_Shortcut_Scroll 83 
#PB_Shortcut_Select 145 
#PB_Shortcut_Separator 41 
#PB_Shortcut_Shift 108 
#PB_Shortcut_Snapshot 65536 
#PB_Shortcut_Space 44 
#PB_Shortcut_Subtract 32 
#PB_Shortcut_T 109 
#PB_Shortcut_Tab 84 
#PB_Shortcut_U 9 
#PB_Shortcut_Up 85 
#PB_Shortcut_V 38 
#PB_Shortcut_W 86 
#PB_Shortcut_X 87 
#PB_Shortcut_Y 88 
#PB_Shortcut_Z 89 
#PB_Sprite_Alpha 90 
#PB_Sprite_Memory 2 
#PB_Sprite_Texture 1 
#PB_String_BorderLess 4 
#PB_String_LowerCase 131072 
#PB_String_MultiLine 16 
#PB_String_Numeric 4 
#PB_String_Password 8192 
#PB_String_ReadOnly 32 
#PB_String_UpperCase 2048 
#PB_Text_Border 8 
#PB_Text_Center 131072 
#PB_Text_Right 1 
#PB_TextureSprite 2 
#PB_ToolBarIcon_Copy 4 
#PB_ToolBarIcon_Cut 1 
#PB_ToolBarIcon_Delete 0 
#PB_ToolBarIcon_Find 5 
#PB_ToolBarIcon_Help 12 
#PB_ToolBarIcon_New 11 
#PB_ToolBarIcon_Open 6 
#PB_ToolBarIcon_Paste 7 
#PB_ToolBarIcon_Print 2 
#PB_ToolBarIcon_PrintPreview 14 
#PB_ToolBarIcon_Properties 9 
#PB_ToolBarIcon_Redo 10 
#PB_ToolBarIcon_Replace 4 
#PB_ToolBarIcon_Save 13 
#PB_ToolBarIcon_Undo 8 
#PB_TrackBar_Ticks 3 
#PB_TrackBar_Vertical 1 
#PB_Tree_AlwaysShowSelection 2 
#PB_Tree_CheckBoxes 32 
#PB_Tree_NoButtons 256 
#PB_Tree_NoLines 1 
#PB_Web_Back 2 
#PB_Web_Forward 1 
#PB_Web_Refresh 2 
#PB_Web_Stop 4 
#PB_Window_BorderLess 3 
#PB_Window_Invisible -2147483648 
#PB_Window_MaximizeGadget 268435456 
#PB_Window_MinimizeGadget 13172736 
#PB_Window_ScreenCentered 13238272 
#PB_Window_SizeGadget 1 
#PB_Window_SystemMenu 12845056 
#PB_Window_TitleBar 13107200 
#PB_Window_WindowCentered 12582912 

ebs
Enthusiast
Enthusiast
Posts: 561
Joined: Fri Apr 25, 2003 11:08 pm

Post by ebs »

Num3,

If you mean #PB_Shortcut_Pad5 with 'AddKeyboardShortcut()', it doesn't work unless the NumLock is on.
Or did you mean that I should try #PB_Key_Pad5 with the 'GetKeyboardState_()' API function? I'll try that.

Eric
Post Reply