(12-31-2025, 06:43 AM)SMcNeill Wrote: Careful with just automatically substituting CHR$(10) for chr$(13) with CTRL. It’s true for CTRL-J, but 13 is *also* the code for ENTER.@SMcNeill
You just remapped Ctrl-Enter to Ctrl-J.
Honestly, I don’t know how you’d easily distinguish between the two with GLUT screwing up crap with you.
It should be fine, as coded.
INKEY$: Ctrl + Enter returns Chr$(10), not 13.
Extracted from post 1 and made so just ctrl + J, Ctrl + Enter, and Enter by itself are output.
Code: (Select All)
Do
_Limit 30
k = _KeyHit
Select Case k
Case -100306 To -100305, 100305 To 100306 ' Ctrl
If k > 0 Then ctrl = 1 Else ctrl = 0
End Select
If ctrl And k = 13 Then k$ = Chr$(10) ' Convert here, but use k$ for visual.
b$ = InKey$
If b$ = Chr$(10) Then Print "b$ = Chr$(10)"
If b$ = Chr$(13) Then Print "b$ = Chr$(13)"
If Len(k$) Then Print "_Keyhit Conversion = Chr$(10)": k$ = ""
Loop
Pete

