AHHH!!!! Sorry, I forgot the [DBP] at the top. It might work with DBC too though, if someone could test it that'd be great

.
I made some functions to help get more data specific data about keyboard and mouse input. There are four functions:
GetLeftMouseState( )
GetMiddleMouseState( )
GetRightMouseState( )
GetKeyState( Key as Integer )
All four of these functions will return one of four values: _PRESSED, _DOWN, _RELEASED, or _UP.
_PRESSED is returned once when the button/key is initially pressed.
After that _DOWN is returned while the button/key is down.
Once the button/key is released _RELEASED is returned once.
After that _UP is returned until the next time the mouse/key is pressed.
This is useful if you only want to register individual clicks/key presses or want to check if a mouse button was just released.
Here's the constants and arrays required, this stuff will probably go near the top of your code:
#Constant _PRESSED 1
#Constant _DOWN 2
#Constant _RELEASED 3
#Constant _UP 4
#Constant _LEFT 0
#Constant _MIDDLE 1
#Constant _RIGHT 2
Dim MouseState( 2 ) as Integer
Dim KeyStates( 256 ) as Integer
For I = 0 to 2
MouseState( I ) = _UP
Next I
For I = 0 to 256
KeyStates( I ) = _UP
Next I
And here are the functions:
Function GetLeftMouseState( )
If MouseClick( ) = 0
If MouseState( _LEFT ) = _RELEASED
MouseState( _LEFT ) = _UP
EndIf
If MouseState( _LEFT ) = _DOWN or MouseState( _LEFT ) = _PRESSED
MouseState( _LEFT ) = _RELEASED
EndIf
EndIf
If MouseClick( ) = 1
If MouseState( _LEFT ) = _PRESSED
MouseState( _LEFT ) = _DOWN
EndIf
If MouseState( _LEFT ) = _UP or MouseState( _LEFT ) = _RELEASED
MouseState( _LEFT ) = _PRESSED
EndIf
EndIf
TEMP = MouseState( _LEFT )
EndFunction TEMP
Function GetMiddleMouseState( )
If MouseClick( ) = 0
If MouseState( _MIDDLE ) = _RELEASED
MouseState( _MIDDLE ) = _UP
EndIf
If MouseState( _MIDDLE ) = _DOWN or MouseState( _MIDDLE ) = _PRESSED
MouseState( _MIDDLE ) = _RELEASED
EndIf
EndIf
If MouseClick( ) = 4
If MouseState( _MIDDLE ) = _PRESSED
MouseState( _MIDDLE ) = _DOWN
EndIf
If MouseState( _MIDDLE ) = _UP or MouseState( _MIDDLE ) = _RELEASED
MouseState( _MIDDLE ) = _PRESSED
EndIf
EndIf
TEMP = MouseState( _MIDDLE )
EndFunction TEMP
Function GetRightMouseState( )
If MouseClick( ) = 0
If MouseState( _RIGHT ) = _RELEASED
MouseState( _RIGHT ) = _UP
EndIf
If MouseState( _RIGHT ) = _DOWN or MouseState( _RIGHT ) = _PRESSED
MouseState( _RIGHT ) = _RELEASED
EndIf
EndIf
If MouseClick( ) = 2
If MouseState( _RIGHT ) = _PRESSED
MouseState( _RIGHT ) = _DOWN
EndIf
If MouseState( _RIGHT ) = _UP or MouseState( _RIGHT ) = _RELEASED
MouseState( _RIGHT ) = _PRESSED
EndIf
EndIf
TEMP = MouseState( _RIGHT )
EndFunction TEMP
Function GetKeyState( Key as Integer )
If KeyState( Key ) = 1
If KeyStates( Key ) = _PRESSED
KeyStates( Key ) = _DOWN
EndIf
If KeyStates( Key ) = _UP or KeyStates( Key ) = _RELEASED
KeyStates( Key ) = _PRESSED
EndIf
Else
If KeyStates( Key ) = _RELEASED
KeyStates( Key ) = _UP
EndIf
If KeyStates( Key ) = _DOWN or KeyStates( KEY ) = _PRESSED
KeyStates( Key ) = _RELEASED
EndIf
EndIf
TEMP = KeyStates( Key )
EndFunction TEMP
If you have any questions about how to use it or want some example code just ask.