Home Forums HTBasic Forum keyboard disable

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #9149
    ZeRider
    Participant

      Hi,
      Do you know if there is the possibility to disable keyboard inputs with HTBasic (or other …) to force the user to click on a BPLUS icon?

      #9150
      Ralph Wilson
      Keymaster

        CONTROL KBD,7;3 ! disables all keyboard keys
        CONTROL KBD,7;0 ! enables all keyboard keys
        CONTROL KBD,7;1 ! disables all keys except RESET
        CONTROL KBD,7;2 ! disables RESET key only

        Is this what you mean?

        #9151
        ZeRider
        Participant

          Hi Ralph,
          thank for proposal but seem to not work on my computer (HTBasic 10.1.3 + Windows 11) … 🙁
          When I press “ENTER” it’s still like I click on “YES”

          CLEAR SCREEN
          KEY LABELS OFF
          CONTROL KBD,7;3
          !
          !**************
          ! MESSAGE BOX :
          !**************
          Btn=0
          !
          P$(1)=”File Storage ?” ! Button 0=YES / Button 1=NO

          DIALOG “QUESTION”,P$(1),Btn
          !
          IF Btn=0 THEN PRINT “Storage File : YES”
          IF Btn=1 THEN PRINT “Storage File : NO”
          !
          KEY LABELS ON
          CONTROL KBD,7;0
          END

          #9152
          Ralph Wilson
          Keymaster

            Setting the DEFAULT BUTTON attribute to -1 is supposed to disable Enter/Return:

            DIALOG “QUESTION”,P$(1),Btn;SET (“DEFAULT BUTTON”:-1)

            However, this did not work for me. I tried setting it to 1, which did work to make “No” the default button. So, I assume -1 not working must be a bug. I will get this submitted and we should be able to fix it.

            If you want to discuss this further, you can reach me at htbsupport@transera.com

            #9153
            ZeRider
            Participant

              Hi Ralph,
              I confirm the button is correctly parameterized by the -1/+1 but no change with the keyboard input.
              The default button is always validated par the “ENTER/RETURN”
              Thanks for reporting the bug.

            Viewing 5 posts - 1 through 5 (of 5 total)
            • You must be logged in to reply to this topic.
            Scroll to Top
            HTB icon

            Please Sign In