PDA

Click to See Complete Forum and Search --> : sendkeys? SEND THIS! {smack}


Lord Orwell
Feb 23rd, 2001, 11:06 PM
does anyone know where i can find a listing of the keyboard scan codes that tells which key is which, and uses the name of the key? My api listing lists "vkcancel", etc. I don't have a cancel key. And (for example), i can't seem to find the break key in the index. I need to know ALL of the constants for use in a subroutine that replaces the sendkeys function.

Feb 23rd, 2001, 11:16 PM
Not sure if this'll help, but check out this link.

http://www.vbapi.com/ref/other/virtualkeycodes.html

Lord Orwell
Feb 23rd, 2001, 11:49 PM
The problem is i can't find the virtual keys to the break key, the home key, and the cancel key. I hope someone can tell me. If not, i will have to set up some kind of loop and find it the hard way...

KrishnaSantosh
Feb 23rd, 2001, 11:59 PM
The Key Codes Are :

Cancel : 3
Home : 36
End : 35
Pause/Break : 19

For More Codes Please Post A Question Or EMail Me,

Lord Orwell
Feb 24th, 2001, 01:02 AM
Ok that helped. Now my only question is: where is the cancel key on my keyboard?? or the help key?? Or are these just shortcuts to buttons like the mouse constants? I am trying to build in lots of functionality...

Feb 24th, 2001, 08:52 AM
You don't need all of the API constants. Most of them are already in VB.

VK_A = vbKeyA
VK_B = vbKeyB
...
VK_Z = vbKeyZ

vbKeyPause
vbKeyHome
vbKeyCancel
etc.

Lord Orwell
Feb 24th, 2001, 10:18 AM
i know. I've been using the vb ones. But vb ALSO has the help and cancel ones. Are these keys on some keyboards? I have 3 keyboards and none of them have these buttons, and one has so many buttons on it, i still haven't figured out what some of them are for (Example: It has a "turbo" button next to the right shift button)

Feb 24th, 2001, 12:35 PM
Did you take a look at the link I gave? It has cancel key on there.

VK_CANCEL
The Cancel virtual key, used for control-break processing


Const VK_CANCEL = &H3


Const VK_HOME = &H24

Feb 24th, 2001, 01:16 PM
Press the Turbo key and see what outputs on the Form.

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Print KeyCode
End Sub


This will display the keycode of whatever key is pressed.

Lord Orwell
Feb 24th, 2001, 10:30 PM
Im beginning to think the 'turbo' key is there just to make the keyboard look different. I put getasynckeystate in a loop and pressed the key. No effect. The code above didn't detect it either. All other keys were detected. It is one of those "transparent" keyboards where you can see the circuit board, in a weak attempt to disguise a pc as an iMac (in my opinion anyway, but i paid $80 for my computer's case including keyboard, mouse, and 2 speakers ;) so i'm not complaining. That button has me perplexed however. Im thinking about taking the keyboard apart just to see if it is connected to anything. Just its name makes me think it is some kind of system key. But the placement of it is silly if that is the case. I have hit it before in mistake of my spacebar.

Shaun Hall
Oct 23rd, 2001, 01:32 AM
;) I believe the 'Turbo' key is a gimick.

Try pressing another key with this 'Turbo' key down - does it speed up the input rate of that button - kind of like a 'Turbo' fire button on joysticks?

Why on earth would you like your PC to look like an IMAC?

Lord Orwell
Oct 23rd, 2001, 04:50 AM
dont forget that until recently, all pc cases were ugly white squares. The imac started a recent trend.
I no longer use that keyboard. I bought a couple of Dell by Microsoft web keyboards. the ones with the forward/back buttons, etc. on them. Supposedly for sale only with a new pc, i bought them for $20 apiece.

Sorry i havent been doing much posting lately guys.
I got married :D
she takes up most of my free time now...

amitabh
Oct 23rd, 2001, 05:46 AM
Congrats on getting married. :) :) :) :) :D :D :D :D

Are you sure the keyboard is a new one. I hav a keyboard which has a turbo key, but I bought it way back in 1997. Even at that time, I was told that this key was a thing of past when we used to have 386 and 486 computers. Their speed which could be boosted by using this key (something similar to overclocking).

Arbiter
Oct 24th, 2001, 01:43 AM
Bit of trivia...

Older PC's used to have a Turbo button on the front which was supposed to always be set to on.

When it wasn't, it used to slow the PC speed right down. A lot of the old games speed was dependant on the CPU speed so if you played it on a faster machine, the game was faster.

Playing something designed for an 8086 on a 286 rendered the game unplayable because it was going too fast. These buttons actually survived for the first clump of Pentiums (I had one on a P75) until people decided that no-one wanted to play those old games anyway, and if they did - they could use software to slow the machine down.

Piece of history for you there...