I replaced CustomisingLogitechKeyboards.zip
with CustomisingLogitechKeyboards2.zip

The only change in it is:
The second byte in the LParam value should be the hex
of the free scan code one wishes to use, not the sc-2
which is what I wrote in the firat version.
Thanks to Alex Peters for pointing out my error.

The method I described for programming these extra keys
happens to work in practice but I don't really know
why it works or what is happening.

Setting the virtual key code is simple and direct.
The number you set in the VirtualKey value for a key
in the registry is exactly what is sent and it reliably
triggers a PowerPro hotkey which is set for that vk.
Clearly, for this vk code, it is important to choose a
number which is not already in use.

The scan code is more of a mystery. Clearly it is specified
in the LParam value for a key's entry in Logitech's part
of the registry, but the more I experiment with different
settings there, the more it puzzles me.

As Alex has discovered, which also works here, it does not
seem necessary to use a unique scan code for every extra key
which one customises in the registry. As long as the vk codes
are unique for each key, several of them can share the same
SC specified in the LParam value.

One mystery is how much faith to put in KeyTrap's scanmode.
I get the impression that the VK number it returns is always true
but the scan code might not be.

If, in the registry, I set VirtualKey to send the VK of a
known normal key such as z and in LParam I set a random
choice from my list of unused SCs, KeyTrap scanmode returns
the correct vk for z which I set. However for the SC, it returns
the SC which would normally be attached to the z key, which
is not the SC which I set for this extra key in the registry.

Two possible theories:
[A] Maybe that is because scanmode really senses the vk sent,
but for the sc it only looks up in a table what scan code
would normally be used to send that vk, rather than actually
being aware of the scan code(s) as they are executed.

[B]On the other hand, if the sc reported by scanmode really
is what has been sent through the system when I press that
extra key, then we must conclude that Logitech's LParam value
does not represent the sc which is actually sent by the driver.

One thing which makes me think [A] might be true is that some
keys, such as RightAlt, actually send more than one byte as
their scan codes but scanmode always reports only one byte.


If the aim is to have a practical solution, rather than trying
to fully understand the LParam value and what actually happens
when you press a key, then the recipe described in my
CustomisingLogitechKeyboards2.doc is adequate.

It would be nice to also have a better understanding
but I think that will be difficult to obtain.



Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to