On 7/8/05 02:48:09, in gmane.comp.windows.power-pro you wrote:
Ok... I've been following this with interest, because I have a Dvorak
keyboard layout (since I had problems with RSI) and while this is very
good, my trusted Ctrl-z/x/c/v keys are now in really awkward positions.
So I bought a ViewSonic keyboard that has among others some extra keys for
cut and paste etc. But guess what -- these extra keys now send also
CapsLock-q instead of Ctrl-x and so on. And the driver that came with it is
of so little help that I got rid of it.
Because of this, what you guys have been discussing here really caught my
eye. But I can't get it to work. (One thing I got to work is that I used PP
to capture e.g. Windows-q and send Ctrl-x instead, which is ok. But I would
like to get the extra keys on my keyboard to work...)
So I installed the PP plugin keytrap, because it seems to be able to
capture something like CapsLock-q (which PP seems not to be able to) and
send Ctrl-x instead. I think I installed it correctly, but I don't seem to
have much luck with it. I'd appreciate a step-by-step instruction to get
the first thing working; I guess I can figure out most of the rest. For
those of you that have it working, the answers below are probably pretty
obvious :-/
When I installed it, I got the keytrap.dll in the PP plugins folder and
ktconfig.exe in the PP folder. The text file that came with it says to put
the keytrap configuration file keytrap.ini in the folder where the PP
configuration file is, which I did (this is in my case not the PP program
folder). But this didn't seem to work (ktconfig didn't work correctly, and
when I enabled the plugin, I got an error message that it couldn't find the
ini file). So I tried the PP /program/ folder, and this seems to work now;
at least ktconfig doesn't crash anymore and when I enable the plugin I
don't get an error.
The next hurdle is how to create correctly an entry that captures
CapsLock-q and sends Ctrl-x instead, eating the CapsLock and the q in the
process. This is what I came up with in my keytrap.ini file:
ViewSonic_Cut=20,0,0,45,81,3,,,SendKeys("^x"),0,1,0,0,0,0,,,,,,
I used the capture feature of ktconfig.exe to get the codes that you see in
this line. It seems to trigger on the right key, but the SendKeys("^x")
doesn't do what I want it to do, and it doesn't eat the CapsLock. I changed
things a bit, but I don't seem to be able to get any action done and
neither get the CapsLock keypress eaten. The q keypress seems to get eaten
ok.
> debug start
> window ontop PowerPro Debug
> keytrap.enable(1)
> keytrap.scanmode(1)
Using this, I saw that the Cut key sends the following when pressed and
released:
Q, ScanCode=45, vkcode=81, ext=0
CAPSLOCK, ScanCode=58, vkcode=20, ext=0
Q, ScanCode=45, vkcode=81, ext=0
CAPSLOCK, ScanCode=58, vkcode=20, ext=0
(Key presses and releases from bottom to top, just like it appears in the
debug output.) This seems to be consistent with the keytrap configuration
line above.
So my keytrap questions are (I guess -- with PP this is never so clear :)
- How do I configure keytrap to send Ctrl-x when a keytrigger gets hit (or
do something else, like popping up a message box for debugging purposes)?
- How do I configure keytrap to eat not only the q key, but also the
CapsLock key in this sequence?
- How can I call keytrap functions from within PP? So far, I create script
files (one for example has the single line "keytrap.enable(1)") and run
these with "*Script RunFile <path>". I imagine there is a simpler way for
such simple one-line commandos.
- Is there a way I can see the difference between press and release in the
keytrap.scanmode output? It seems to log both in exactly the same way.
Then there's PP's new scan code logging and triggering feature. I have an
entry "*Exec LogKeys * ! e:\logkeys.txt", and I have PP 4.3.03 installed.
When I press the above key, this is what appears in the log file:
{capslock}q
Seems correct, but doesn't contain all the additional info that I thought
I'd find there with the newer version. What am I doing wrong?
BTW, this is of course with the associated keytrap entry disabled. With it
enabled, PP LogKeys only shows the {capslock} entry, which is consistent
with the observation that the q gets eaten by keytrap, but not the
CapsLock.
I guess I stop now... I hope that this wasn't waaay too long, and that
maybe someone feels inclined to send me a few pointers where to look for
the answers. (Well, if you made it to here, then my chances may not be too
bad... :)
Thanks,
Gerhard
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a
href="http://us.ard.yahoo.com/SIG=12hftqpj5/M=362329.6886308.7839368.1510227/D=groups/S=1706030409:TM/Y=YAHOO/EXP=1123368248/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</a>.</font>
--------------------------------------------------------------------~->
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/