Author |
Topic: Shift+Tab can not be seen by LBB (Read 640 times) |
|
SarmedNafi
Junior Member
member is offline


Posts: 93
|
 |
Re: Shift+Tab can not be seen by LBB
« Reply #2 on: Apr 28th, 2015, 4:56pm » |
|
Quote:it was better to generate the correct data, as documented |
|
Thank you Richard,
Where it was documented, can you please point to a course or a link.
Regards
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: Shift+Tab can not be seen by LBB
« Reply #3 on: Apr 28th, 2015, 5:47pm » |
|
on Apr 28th, 2015, 4:56pm, SarmedNafi wrote:| Where it was documented, can you please point to a course or a link. |
|
In the LB 4.04 help under 'Keywords in Alphabetical Order... Inkey$', where it says this:
"When a key is pressed, the information is stored in the variable Inkey$. This special variable holds either a single typed character or multiple characters including a Windows virtual keycode.... If Inkey$ holds more than one character, the first character will indicate whether the Shift, Ctrl, or Alt keys was depressed".
You can find the relevant Virtual Keycode as follows:
Code: which will print 9 (not 7!).
If it's not already there, perhaps somebody would add this bug to the Liberty BASIC Bug Tracker Wiki.
Richard.
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: Shift+Tab can not be seen by LBB
« Reply #5 on: Apr 28th, 2015, 8:20pm » |
|
on Apr 28th, 2015, 7:45pm, SarmedNafi wrote:| I think it is up to the programmer. |
|
No it is not. The LB 4.04 docs say that the second character is the Virtual Keycode of the key that was pressed. In this case the key pressed was the Tab key, for which the Virtual Keycode is VK_TAB (9).
Also note that when the Tab key is pressed on its own (without the shift key) both LB4 and LBB set Inkey$ to:
Code: So in this case the correct code is used by LB4. If you think Carl deliberately chose to use the wrong code, why didn't he use it for this case as well?
In my opinion it's a bug in LB 4.04, pure and simple.
Richard.
|
|
|
|
SarmedNafi
Junior Member
member is offline


Posts: 93
|
 |
Re: Shift+Tab can not be seen by LBB
« Reply #6 on: Apr 28th, 2015, 8:55pm » |
|
I see Richard, It is clear thank you.
Regards
|
|
Logged
|
|
|
|
|