QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: Kernelpanic on October 19, 2020, 05:23:49 pm

Title: German Keyboard
Post by: Kernelpanic on October 19, 2020, 05:23:49 pm
A bug? Well, a hint for users of a German keyboard would be good.

See the screenshot:

Title: Re: German Keyboard
Post by: Kernelpanic on October 19, 2020, 06:32:08 pm
Well it doesn't work. Nothing! Alt Gr is obsolete.



Title: Re: German Keyboard
Post by: RhoSigma on October 19, 2020, 06:44:17 pm
Method 1:
Hold down left Alt Key and enter 94 on the Numpad, then release the Alt Key (Numlock must be active).

Method 2:
Click the Help menu (upper right in the IDE), then ASCII Chart and click the ^
Title: Re: German Keyboard
Post by: Kernelpanic on October 19, 2020, 07:51:36 pm
Method 1:
Hold down left Alt Key and enter 94 on the Numpad, then release the Alt Key (Numlock must be active).
Yeah, thanks! But this can not be the solution. (I know the NumBlock)
QB64 is a great program, an excellant work, really - I like Quick Basic. My first programmin language.
I have tried VirtualBox and VMPlayer for the Orginal . . . my opinion: forget it. I had no contact to the guest system under MS-DOS 6.22.

Ok. But this . . . there are not only users with an US-Keyboard.
Title: Re: German Keyboard
Post by: Kernelpanic on October 19, 2020, 09:23:52 pm
Well, the whole example:

Code: QB64: [Select]
  1. 'Exponent Beispiel - 20. Okt. 2020
  2.  
  3.  
  4. DIM Zahl AS DOUBLE, Expo AS DOUBLE, Ergebnis AS DOUBLE
  5.  
  6. INPUT "Geben Sie eine Zahl ein     : ", Zahl
  7. INPUT "Geben Sie den Exponenten ein: ", Expo
  8.  
  9. Ergebnis = (Zahl ^ Expo)
  10.  
  11. PRINT USING "Das Ergebnis ist: #########"; Ergebnis
  12.  
Title: Re: German Keyboard
Post by: RhoSigma on October 20, 2020, 06:52:05 am
For use in your programs you can use one of the routines provided here:
https://www.qb64.org/forum/index.php?topic=1385.msg105704#msg105704

If it shall be for german only, then you can use my routine from right that mentioned post. If it shall be more international (Western European) then you may also try the routine from the "Best Answer" post, which is provided by forum member "moises".

However, both are INKEY$ replacements only, so you would need to write your own INPUT function, which uses the mentioned routines to collect user input and will concatenate everything in one string until "Enter" is pressed. This will of course make it more difficult to input numbers directly into a numeric variable, as you need to use the VAL function to get a numeric value from a string.

So, there's no perfect solution, the problems with non-US-keyboards and internatinal chars like german umlauts or any AltGr triggered chars are known, but I wait since almost 8 years and nothing has changed yet or will change in the near future.
Title: Re: German Keyboard
Post by: Kernelpanic on October 20, 2020, 07:26:56 pm
Yes, thanks! I think, in this case the easiest way is "Alt+Numblock"

The setting in QB64 is: MICSFT-WINDOWS-CP1250. That is Latin1, West Europe including German umlauts. But it doesn't work.