Skystrick, I've posted some time ago about the fact that FB for Linux does not read tons of keys and combinations (including F11 and F12, Shift+Function keys, etc.). Looks like this will take time to fix. I've found two temporary solutions: one is to combine InKey with MultiKey and the other one is to directly read from X using Xlib functions. If you only need Shift+Tab and maybe a couple more special keys, the first option is simpler. If you want everything to be detected, including extended characters, then you should go for the second one.
You can detect Shift+Tab like this:
Code: Select all
Dim mykey As String
Do
mykey = InKey
Select Case mykey
Case Chr(27) : Exit Do 'Escape
Case Chr(9)
If MultiKey(2) Or MultiKey(3) Then 'I think scancodes 2 and 3 are the Shift keys
'Shift+Tab was pressed and we're in Linux
Else
'Tab was pressed
End If
Case Chr(255, 15)
'Shift+Tab was pressed and we're on DOS or Windows
End Select
Loop
This method is not perfect. For example, if you press Tab and for some reason, the loop does not get to the Inkey part because it's busy with something else and then, when it goes on, you happen to be holding the Shift key, but not the Tab key, it will think you've pressed Shift+Tab. But most of the time, it's OK. So for example, be careful if you're using a delay in your loop to avoid hogging the CPU, because that could cause those combinations not to be detected correctly in this fashion.