Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Keypad Entry
#16
(01-09-2023, 04:18 AM)eoredson Wrote: So, the only remaining solution to coding keypad-5 is the following:

Code: (Select All)
Rem Keypad-5 = 76
Rem Shift-Keypad-5 = 53
Rem Ctrl-Keypad-5 = 143
Do
  X = _KeyHit
  If X Then
      'Print "Keypress="; X
      If X = 27 Then End
      If X < 0 Then
        Select Case X
            Case -12
              Print "keypad-5"
            Case -17
              Print "ctrl-keypad-5"
        End Select
      End If
      If X >= 256 And X <= 65535 Then
        X = (X And &HFF00) / 256
        Print "Ascii2="; X
        Select Case X
            Case 76
              Print "keypad-5"
            Case 53
              Print "shift-keypad-5"
            Case 143
              Print "ctrl-keypad-5"
        End Select
      End If
  End If
Loop
End

I tend to go with:

Code: (Select All)
'$INCLUDE:'Keyboard Library.BI'


Do
    k = KeyHit
    If k <> 0 Then Print k
    _Limit 30
Loop

'$INCLUDE:'Keyboard Library.BM'
Reply


Messages In This Thread
Keypad Entry - by eoredson - 01-07-2023, 05:33 AM
RE: Keypad Entry - by mnrvovrfc - 01-07-2023, 06:22 AM
RE: Keypad Entry - by eoredson - 01-08-2023, 10:55 PM
RE: Keypad Entry - by bplus - 01-09-2023, 02:27 AM
RE: Keypad Entry - by SMcNeill - 01-09-2023, 03:05 AM
RE: Keypad Entry - by JRace - 01-09-2023, 03:37 AM
RE: Keypad Entry - by eoredson - 01-09-2023, 03:48 AM
RE: Keypad Entry - by JRace - 01-09-2023, 04:04 AM
RE: Keypad Entry - by mnrvovrfc - 01-09-2023, 03:54 AM
RE: Keypad Entry - by TerryRitchie - 01-09-2023, 04:08 AM
RE: Keypad Entry - by SMcNeill - 01-09-2023, 04:10 AM
RE: Keypad Entry - by SMcNeill - 01-09-2023, 04:11 AM
RE: Keypad Entry - by JRace - 01-09-2023, 04:17 AM
RE: Keypad Entry - by SMcNeill - 01-09-2023, 04:20 AM
RE: Keypad Entry - by eoredson - 01-09-2023, 04:18 AM
RE: Keypad Entry - by SMcNeill - 01-09-2023, 04:26 AM
RE: Keypad Entry - by eoredson - 01-09-2023, 04:38 AM
RE: Keypad Entry - by SMcNeill - 01-09-2023, 04:53 AM



Users browsing this thread: 1 Guest(s)