Pressed Ctrl+ and Ctrl-
Pressed Ctrl+ and Ctrl-
Please add constants for AddKeyboardShortcut. Ctrl+ and Ctrl- on the main keyboard without a tab panel!
Re: Pressed Ctrl+ and Ctrl-
+1, but I recommend changing topic title to something like: Add #PB_Shortcut_Minus, #PB_Shortcut_Plus, #PB_Shortcut_Equals constants.
Re: Pressed Ctrl+ and Ctrl-
Code: Select all
AddKeyboardShortcut(#window, #PB_Shortcut_Shift|#PB_Shortcut_Control|#VK_OEM_PLUS, #ctrlplus)
AddKeyboardShortcut(#window, #PB_Shortcut_Shift|#PB_Shortcut_Control|#VK_OEM_MINUS, #ctrlminus)
Norm
google Translate;Makes my jokes fall flat- Fait mes blagues tombent à plat- Machte meine Witze verpuffen- Eh cumpari ci vo sunari
Re: Pressed Ctrl+ and Ctrl-
The compiler complains, VK_OEM_PLUS
Re: Pressed Ctrl+ and Ctrl-
Only works on Windows

Re: Pressed Ctrl+ and Ctrl-
rndrei finally said in another post that he uses a Linux laptop with no numeric keypad:
This wasn't initially revealed to us when we tried to help. So when he refers to "main keyboard without a tab panel", he means a keyboard without a numeric keypad.
Re: Pressed Ctrl+ and Ctrl-
definitely my last reply to anything from rndrei
might not work on that fruit-OS
Code: Select all
OpenWindow(0, 200, 200, 200, 100, "Bla")
CompilerIf #PB_Compiler_OS = #PB_OS_Windows
AddKeyboardShortcut(0, #VK_OEM_PLUS, 0)
AddKeyboardShortcut(0, #VK_OEM_MINUS, 2)
CompilerElse
AddKeyboardShortcut(0, Asc("+"), 0)
AddKeyboardShortcut(0, Asc("-"), 2)
CompilerEndIf
AddKeyboardShortcut(0, #PB_Shortcut_Add, 1)
AddKeyboardShortcut(0, #PB_Shortcut_Subtract, 3)
Repeat
Select WaitWindowEvent()
Case #PB_Event_Menu
Select EventMenu()
Case 0 : Debug "Plus"
Case 1 : Debug "Plus Keypad"
Case 2 : Debug "Minus"
Case 3 : Debug "Minus Keypad"
EndSelect
Case #PB_Event_CloseWindow
End
EndSelect
ForEver
{Home}.:|:.{Dialog Design0R}.:|:.{Codes}.:|:.{History Viewer Online}.:|:.{Send a Beer}
Re: Pressed Ctrl+ and Ctrl-
What you need!Thank you!
- NicTheQuick
- Addict
- Posts: 1519
- Joined: Sun Jun 22, 2003 7:43 pm
- Location: Germany, Saarbrücken
- Contact:
Re: Pressed Ctrl+ and Ctrl-
On what layout do you need Shift to write a plus sign? On the German layout you can just type `+` without Shift.normeus wrote: Tue Mar 18, 2025 8:08 pmcontrol plus on the keyboard does not exist,you need to also press shift to get plus , if you you do not press shift you'll get equalsCode: Select all
AddKeyboardShortcut(#window, #PB_Shortcut_Shift|#PB_Shortcut_Control|#VK_OEM_PLUS, #ctrlplus) AddKeyboardShortcut(#window, #PB_Shortcut_Shift|#PB_Shortcut_Control|#VK_OEM_MINUS, #ctrlminus)
Norm
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
Re: Pressed Ctrl+ and Ctrl-
On my layout, the key (+) is equal to the keys (=)
Code: Select all
AddKeyboardShortcut(0, Asc("="), 0)
Re: Pressed Ctrl+ and Ctrl-
American English. = is the key directly to the left of backspace, hold shift and press it to get a +.NicTheQuick wrote: Fri Apr 11, 2025 9:49 am On what layout do you need Shift to write a plus sign? On the German layout you can just type `+` without Shift.
Re: Pressed Ctrl+ and Ctrl-
Also in Hungarian keyboard layout. "Shift" + numeric "3" results a "+". But I always use keypad+ while typing.