• Welcome to Jose's Read Only Forum 2023.
 

Keyboard keys textual names and keyboard shortcuts

Started by Dominic Mitchell, December 26, 2012, 12:54:37 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dominic Mitchell

PowerBasic forums are down again...

This is not a question on keyboard shortcut localization, because from a technical
standpoint they are not localized by Windows since they are processed during the
WM_KEYDOWN message.
This question is about what abbreviations you as programmers use for keys with or
without textual names.  The GetKeyNameText function can be used to retrieve the names
of the keys for a specific keyboard layout. Unfortunately, the text that is retrieved
is not always in a desirable form(not abbreviated, all capitals, no accents etc.) or
seems to be too long.

AltGr is not included in the list for the same reason that Ctrl+Alt is discouraged as
a modifier combination for shortcuts.

For the keys listed below, I want to know what is the standard name that would be used
in the text of a menu item in languages such as French, German, and Spanish.
For example,
 
Ctrl+X(English) Strg+X(German)
Shift+X(English) Umschalt+X(German)

BackSpace
Tab
Enter
Shift
Ctrl 
Alt
Pause
Caps Lock
Esc
Space
Page Up
Page Down
End
Home
Left Arrow
Up Arrow
Right Arrow
Down Arrow
Print Screen
Ins
Del
Application
Num Lock
Scroll Lock 
Dominic Mitchell
Phoenix Visual Designer
http://www.phnxthunder.com

José Roca

Spanish from Spain:

BackSpace = Retroceso
Tab = Tabulación
Enter = Entrar (or Intro)
Shift = Mayús
Ctrl  = Ctrl
Alt = Alt
Pause = Pausa
Caps Lock = Bloq Mayús
Esc = Esc
Space = Barra Espaciadora
Page Up = Re Pág
Page Down = Av Pág
End = Fin
Home = Inicio
Left Arrow = Flecha Izquierda (abrev. Flecha Izda)
Up Arrow = Flecha Arriba
Right Arrow = Flecha Derecha (abrev. Flecha Dcha)
Down Arrow = Flecha Abajo
Print Screen = Imp Pant (or Impr Pant)
Ins = Insert
Del = Supr
Application = Aplicación
Num Lock = Bloq Núm
Scroll Lock =  Bloq Despl

Dominic Mitchell

#2
Thanks José.
Your reply highlights the problems with the GetKeyNameText function.

The following names are what I came up with for the numeric keypad.
Is there supposed to be an accent in Numero?
Is Tecla de xxx the format for the operators?

0 (Número 0 )
1 (Número 1 )
2 (Número 2 )
3 (Número 3 )
4 (Número 4 )
5 (Número 5 )
6 (Número 6 )
7 (Número 7 )
8 (Número 8 )
9 (Número 9 )
* (Tecla de Multiplicacion)
+ (Tecla de Adicion)
- (Tecla de Sustraccion)
. (Tecla Decimal)
/ (Tecla de Division)
Dominic Mitchell
Phoenix Visual Designer
http://www.phnxthunder.com

José Roca

> Is there supposed to be an accent in Numero?

Yes, and also in Multiplicación, Adición, Sustracción and División.

> Is Tecla de xxx the format for the operators?

Yes, but as it is too long, I would use Tecla *, Tecla +, Tecla - and Tecla /

A correction: Instead of Bloq Núm, it must be Bloq Num (without accent), because it is an abbreviation of Bloqueo Numérico.

Dominic Mitchell

Thanks. Now my head hurts. I have been at this for a month.

This whole business started when you pointed out that you were able to zoom the Phoenix
IDE for VK_OEM_PLUS(+) and not for VK_ADD(Num +). I decided to enhance the menu and accelerator
editors to allow multiple shortcuts per item.  I have had to write functions to replace the
VkKeyScanEx, ToAsciiEx, ToUnicodeEx and GetKeyNameText functions, because they are flawed.
The GetKeyNameText function is turning out to be utterly useless.

One of the debates I have been having is whether the menu text should read

"Zoom In Ctrl++, Ctrl+Num +"

or just

"Zoom In Ctrl++"

For the Spanish keyboard
 
"Zoom In Ctrl++, Ctrl+Tecla de Adicion"

which, according to you, should be

"Zoom In Ctrl++, Ctrl+Tecla +"


Now throw in shift states(Shift, Caps Lock, AltGr, SGCAPS and that other thing on the Canadian
multilingual keyboard) and things get complicated in a hurry.
Dominic Mitchell
Phoenix Visual Designer
http://www.phnxthunder.com

Patrice Terrier

#5
French from France :

BackSpace = Retour arrière
Enter = Retour chariot | Ligne suivante | Entrée
Shift = Majuscules
Ctrl  = Controle
Alt = Alt
Pause = Pause
Caps Lock = Verroullage en majuscules
Esc = Echap
Space = Barre d'espacement
Page Up = Page précédente
Page Down = Page suivante
End = Fin
Home = Origine
Left Arrow = Déplacement vers la gauche | Flèche gauche
Up Arrow = Déplacement vers le haut | Flèche haut
Right Arrow = Déplacement vers la doite | Flèche droite
Down Arrow = Déplacement vers le bas | Flèche bas
Print Screen = Imprime écran
Ins = Insertion
Del = Suppression
Application = Application
Num Lock = Verrouillage numérique
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

José Roca

For the Spanish keyboard, Ctrl+Num + is also appropriate, because Num + would mean the + key of the numeric keyboard. If it also works with the + key of the text keyboard, then Ctrl+ + would be the one to choose.

BTW, "Intro" (abbreviation of Introducir) is now used instead than "Entrar" because this is the way in which that key is now labeled in Spanish keyboards. "Entrar" was used many years ago, in DOS times.

Dominic Mitchell

Quote
BTW, "Intro" (abbreviation of Introducir) is now used instead than "Entrar"
because this is the way in which that key is now labeled in Spanish keyboards.
"Entrar" was used many years ago, in DOS times.
Thanks for clearing that up. I was trying to figure out what to do about the Enter
key, because GetKeyNameText returns Entrar(VK_RETURN=Enter on main keyboard) and
Intro(VK_SEPARATOR=Enter on numeric pad).

Quote
For the Spanish keyboard, Ctrl+Num + is also appropriate, because Num + would mean
the + key of the numeric keyboard.
Is there an accent on the u?
Dominic Mitchell
Phoenix Visual Designer
http://www.phnxthunder.com

Dominic Mitchell

Thanks Patrice.

The following is what I had put together using images of French keyboards, GetKeyNameText,
and Wikipedia.

BackSpace = Ret Arr
Tab = Tab
Enter = Entrée
Shift = Maj
Ctrl = Ctrl
Alt = Alt
Pause = Pause
Caps Lock = Verr Maj
Esc = Echap
Space = Espace
Numeric Pad 0 = 0 (Pave Num)
Numeric Pad 1 = 1 (Pave Num)
Numeric Pad 2 = 2 (Pave Num)
Numeric Pad 3 = 3 (Pave Num)
Numeric Pad 4 = 4 (Pave Num)
Numeric Pad 5 = 5 (Pave Num)
Numeric Pad 6 = 6 (Pave Num)
Numeric Pad 7 = 7 (Pave Num)
Numeric Pad 8 = 8 (Pave Num)
Numeric Pad 9 = 9 (Pave Num)
Numeric Pad * = * (Pave Num)
Numeric Pad + = + (Pave Num)
Numeric Pad Enter = Entrée (Pave Num)
Numeric Pad - = - (Pave Num)
Numeric Pad . = . (Pave Num)
Numeric Pad / = / (Pave Num)
Page Up = Pg Prec
Page Down = Pg Suiv
End = Fin
Home = Origine
Left Arrow = Gauche
Up Arrow = Haut
Right Arrow = Droite
Down Arrow = Bas
Print Screen = Impr Ecran
Insert = Ins
Delete = Suppr
Application = Application
Num Lock = Ver Num
Scroll Lock = Attn

Am I correct in assuming that they are abbreviated forms of what you posted?

Also, can I write "Num 9" rather than "9 (Pave Num)"?
By the way, "9 (Pave Num)" is what GetKeyNameText returns for VK_NUMPAD9.
Dominic Mitchell
Phoenix Visual Designer
http://www.phnxthunder.com

José Roca

Quote
Thanks for clearing that up. I was trying to figure out what to do about the Enter
key, because GetKeyNameText returns Entrar(VK_RETURN=Enter on main keyboard) and
Intro(VK_SEPARATOR=Enter on numeric pad).

The Enter key in the main keyboard has no label, but a downwards arrow with corner leftwards, and the one in the numeric keyboard is labeled as "Intro". I remember that, in DOS times, the Enter key in the main keyboard was labeled as "Enter" [sic] and later it was changed to the arrow. Although "Entrar" is a literal translation of "Enter", I don't remember having had any keyboard in which it was used. Therefore, we once used "Enter" and now "Intro" because, otherwise, inexperienced users won't find which key to press. If the menu is unicode aware, we can use the unicode character &H21B5.

Quote
Is there an accent on the u?

No, because it is an abbreviation of "Numérico" (numeric), not of "Número" (number).