COCO3 not able to add SHIFTed characters as input

This forum is dedicated to those who want support programming in ugBASIC.
Questo forum è dedicato a chi desidera supporto per programmare in ugBASIC.
Ce forum est dédié à ceux qui souhaitent prendre en charge la programmation en ugBASIC.
Post Reply
jjarrell
Posts: 36
Joined: Tue Jan 28, 2025 5:35 pm

COCO3 not able to add SHIFTed characters as input

Post by jjarrell »

When running your program, is there a particular reason you can not INPUT characters that are shifted? For example, SHIFT 3 to get the # sign as part of your input. It defaults to the non-shifted character. If I try to enter SHIFT+3, I get 3 instead of # for the input command.

Code: Select all

CLS
INPUT "ENTER SOME TEXT: ",someText
REM trying to enter SHIFT+3 just shows up as 3
PRINT someText
spotlessmind1975
Site Admin
Posts: 200
Joined: Fri Oct 06, 2023 8:25 pm

Re: COCO3 not able to add SHIFTed characters as input

Post by spotlessmind1975 »

Hi jjarrell and thank you for your kind bug report!
jjarrell wrote: Fri Jan 31, 2025 9:59 pm When running your program, is there a particular reason you can not INPUT characters that are shifted?
The main reason is that ugBASIC interfaces directly with the keyboard hardware, reading its matrix. This is done to ensure low response times, and to read multiple keys at once (useful for characters' movements). The association between key and letter belongs, in theory, to a higher level. The INPUT instruction provides a first-order translation between the hardware key and the corresponding letter. Shift management is a second-order management, which is usually delegated to the operating system. However, I have opened a ticket to handle this task, as soon as possible.

Thank you again!
jjarrell
Posts: 36
Joined: Tue Jan 28, 2025 5:35 pm

Re: COCO3 not able to add SHIFTed characters as input

Post by jjarrell »

Thanks for the update.
Post Reply