Shift or Ctl keypad - possible

Posted by Neurowiz on Sat 30 Nov 2002 06:58 PM — 5 posts, 20,071 views.

#0
I'm not to up on how Windows processes the keypad... but I have 3 possible modes of walking: flying, swimming and walking. What I would like the keypad to do is:

If nothing is pressed, but keypad, then do the <dir>.
If Ctl and keypad pressed, then "swim " <dir>
If Alt and keypad pressed, then "fly " <dir>

I guess basically that we have the basic keypad, but 2 other options for each key, if Alt or Clt is pressed.

Now if this is doable in a plugin, forgive me, I'm still trying to get the full breadth/width of programming. What I have right now is aliases, but I would much rather just mash the Ctl or Alt key and use the keypad.

Thanks!
USA #1
Yes.. That is one of those additions that Nick has no doubt planned to 'eventually' get to. My own pet peeve is how the system can tell things like 'home' appart when used from the keypad or the second set most now have, but clients insist on having you turn on num-lock because they won't correctly process the directions without it. It should imho work right whether the numlock is on or off, or if it does effect it, the result should be something like you suggest with ctrl and alt.

That said.. A useful solution would be to make both numlock on and off modes work and then also make ctrl-*, alt-*, shift-* and the other combos possibly toggle 'modes' as well. In effect making the keypad commands behave like you where holding the ctrl, alt or shift keys down when using them. In this senario, letting numlock on or off have an effect on what the keypad does would likely only complicate matters, but someone could end up wanting that too. Hmm.. Time to learn property pages Nick.. ;) lol

I do know that the system can tell keypad and the extra duplicates appart.. The question is if you can manage to do so without windows trying to argue with you about it. The standard method of returning keyboard info doesn't I believe work, since windows remaps them all to 'familiar' values, but buried someplace in the OS is I think some way to get the 'real' keys. Unfortunately I haven't a clue what it is. :(
Portugal #2
i use a plugin for a similar thing... my solution is as follow:

i have 2 modes of movement WALK, SWIM and a skill to look at some direction SQUINT.

in the mud i play theres 12 possible directions.

the WALK mode directions are part of the notepad settings ( 8 for north, 6 for east, / for in, + for down, and so on )

then i have 1 alias for each one of the other modes, all of them match the same thing... using regular expression is something like:

^(north|northeast|east|....|up|down)$
where the .... are all other possible directions.

in SWIM mode the alias send SWIM %1
in SQUINT mode the alias send SQUINT %1

i toggle from one mode to another with 3 aliases or 1 alias and a small script..

SW turns SWIM mode on ... enable swim, disable squint
SQ turns SQUINT mode on ... disable swim, enable squint
WA turns WALK mode on ... disable swim, disable squint


this is not as fast as the use of shift and ctrl keys but it works.

Amended on Sun 01 Dec 2002 07:31 PM by Avariel
Australia Forum Administrator #3
Quote:

Yes.. That is one of those additions that Nick has no doubt planned to 'eventually' get to.


I am actually working on that right now, but it is quite complex to implement. Not to get bare keyboard mapping working, but for things like updating the menus to reflect the current mappings, also allow for notepad mappings, and allow for mappings if no world is open.
USA #4
Hmm. For the full keyboard maybe.. Imo a property/style sheet thingy with the tabs is best, since you can then provide one window, with different tabs for the ctrl, alt, shift, ctrl-shift, etc. patterns. For the keypad this would work really nicely. For the full keyboard.. You either end up with something like the Character Map utility that comes with windows (in which case you only display and let them change the last one they clicked on) or a list of all mapped keys like the trigger and alias lists, which while simpler is imho ugly and would be hard to sort through. Good luck figuring it out. ;)