[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Suggestions
. . -> [Subject]  Ctrl+Arrow Key (not numeric keypad)
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Ctrl+Arrow Key (not numeric keypad)

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Welcomb   (14 posts)  [Biography] bio
Date Tue 29 Apr 2003 09:43 AM (UTC)
Message
There was a suggestion to include customised macros. I wonder if it would be customised to include the arrow keys, not the one on the numeric keypad.

I am usually on the go with my laptop so there's no keypad for me to use to move about. I would like therefore to be able to bind Ctrl+Arrow to movement. The one implemented right now still uses the arrows on the keypad with numlock on.
[Go to top] top

Posted by Nick Gammon   Australia  (21,652 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Wed 30 Apr 2003 02:54 AM (UTC)
Message
Most of the arrow keys have predefined meanings, eg. up/down/left/right to scroll through the command window, ctrl+up, ctrl+down to scroll the output window up and down.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Shadowfyr   USA  (1,783 posts)  [Biography] bio
Date Reply #2 on Wed 30 Apr 2003 04:17 AM (UTC)
Message
Hmm. Tab doesn't currently appear to do anything... If you added support for Tab, Shift-Tab and Ctrl-Tab then you could also add an option for toggling the normal arrows between mirroring the keypad and there normal function. Then you could do:

Tab = ToggleMode

Alias: ToggleMode
SendtoScript
Send: /setvariable "Mode", NOT CBool(getvariable("Mode"))
/if getvariable("Mode") = vbTrue then SetOption "ArrowMode",0 else SetOption "ArrowMode",1 end if

Or even without being able to use Tab, you could change modes using existing macros, but I do find the absence of Tab to be slightly odd and for people stuck without number pads having a way to switch over would probably be a good idea.
[Go to top] top

Posted by Nick Gammon   Australia  (21,652 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Wed 30 Apr 2003 05:19 AM (UTC)
Message
If the focus is in the output (upper) window, Tab moves the focus to the command window.

If the focus is in the command window, you use it for tab-completion. eg.

Tell Sha<tab>

becomes

Tell Shadowfyr

I actually find tab-completion very handy when you are in busy environment and want to reply to a tell - you just type the first couple of characters of the name of the person you want and press Tab.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Magnum   Canada  (580 posts)  [Biography] bio
Date Reply #4 on Wed 30 Apr 2003 06:54 AM (UTC)
Message
I find tab completion so convenient, I often find myself trying to use it in other applications... LOL.

Get my plugins here: http://www.magnumsworld.com/muds/

Constantly proving I don't know what I am doing...
Magnum.
[Go to top] top

Posted by Nick Gammon   Australia  (21,652 posts)  [Biography] bio   Forum Administrator
Date Reply #5 on Wed 30 Apr 2003 07:05 AM (UTC)
Message
I understand the problem with not having a numeric keypad, and not being able to customise keys in general, so what I have done as a compromise is this:

Previously there were no Alt+X keys excepting where X was one of the menu keys. eg. Alt+F opened the File menu, same as in any Windows application.

In version 3.42, I have added 17 new programmable keys, namely Alt+X where X is any key except those on the menu (ie. except F, E, V, C, I, D, G, W, H - for the File, Edit, View, Connection, Input, Display, Game, Window and Help menus respectively).

This means, for instance, you can now make Alt+A do anything you want (see configuration -> Macros section).

Unfortunately there doesn't seem to be a group of keys that naturally suggest movement where one isn't in the group above, however O, K, L and M are pretty close (M is slightly to one side).

So, all you need to do is program O = north, K = west, L = east and M = south, and then press Alt whilst hitting them.

Thus with the 14 extra keys on the numeric keypad introduced recently, and these extra 17, you have quite a few keys you can program for your own use.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Krenath   USA  (76 posts)  [Biography] bio
Date Reply #6 on Wed 30 Apr 2003 03:01 PM (UTC)
Message
A program I use frequently for web development, Macromedia HomeSite, has a configuration screen in which nearly every in-built menu option and many actions that aren't on the menus can be remapped to whatever keystroke the user desires.

Perhaps some future version of MUSHclient could include such a screen to allow users to map keys to whatever function (or lack thereof) the user chooses, be they scripts, simple macros, or internal functions.

- Krenath from
bDv TrekMUSH
ATS TrekMUSH
TNG TrekMUSE
TOS TrekMUSE
[Go to top] top

Posted by Shadowfyr   USA  (1,783 posts)  [Biography] bio
Date Reply #7 on Wed 30 Apr 2003 07:23 PM (UTC)
Message
Hmm. Forgot about the tab completion stuff... :p

Reason I thought of it was because a coder on the mud I play mentioned an odd feature of the KMud client, where you can use tab to switch between two seperate input windows (seperated by a faint and almost invisible line). Apparently he finds it useful to have this ability and my suggestion that he could use GetCommand and SetCommand along with a macro-alias combo was rejected because the text in one virtual command box would disappear while typing in the other. He wanted to keep both visible.

I must admit that there have been a few times being able to switch out something I am typing to deal with something else would have been very useful. If I didn't already use 5 lines for a basic input window, I might even find KMud's ability to have two input windows to be a nice trick. Though, initially my reaction to them was, "Why?". lol

Nice to know we are getting a few more macros though. ;)
[Go to top] top

Posted by Neva   USA  (117 posts)  [Biography] bio
Date Reply #8 on Wed 30 Apr 2003 07:28 PM (UTC)
Message
I'd definitely like to see it configurable. There are a lot of keystrokes belonging to commands I don't use... and more than a few places where the things I *would* use either have a keystroke combination I can never remember, or don't have one at all. And macros, too. Would be very useful. :)
[Go to top] top

Posted by Nick Gammon   Australia  (21,652 posts)  [Biography] bio   Forum Administrator
Date Reply #9 on Wed 30 Apr 2003 09:04 PM (UTC)
Message
I started doing this before Xmas, however I had to abandon it for a while because it was such a big job, and it was holding up other improvements that people wanted.

The problem is that there are a whole lot of aspects to customisable keys:


  • There is not just one menu to be customised (because keys affect menus, like Ctrl+C), there are four:

    • The menu if no world, or anything, is open
    • The menu for a normal MUD world
    • The menu for the notepad
    • The menu for the activity view

    That means four lots of customisations - for instance, you might want Ctrl+M to do different things in the Notepad to the MUD world.
  • Currently the keystroke equivalent is hard-coded into each menu item - that would have to be replaced by program-generated codes which represent the current mappings - you couldn't very well have Copy ... Ctrl+C when it was really Ctrl+D to copy.
  • All these mappings have to be stored in a file somewhere
  • The file has to be read in
  • The file has to be saved when you change it
  • You need a GUI interface to change mappings
  • Inbuilt commands (like Copy, Open, Save, Print, Configure) have to be identified in some way so you can map keys to them
  • As you switch windows (eg. go to a notepad, switch worlds) the mappings have to be switched too
  • It has to integrate with the existing "macro" settings, so that things like F2, for instance, continue to work as programmed - this means some sort of integration between "global" settings (which would apply to every world) and local settings (where F2 might mean a different thing per world)


Hopefully you can see from this that it isn't a five-minute job.

However the recent changes where you can use DoCommand to execute internal MUSHclient menu commands is working towards this goal - and indeed borrows from some of my preliminary work on it (the mapping of internal commands to a name).

All I can say at present is, you can partially do it. You could make, for instance, Alt+A bring up the chat dialog by simply mapping it to:

/world.DoCommand "chatsessions"

(As I write that I see that I had forgotten "chatsessions" in the list - it will appear in 3.42).

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Welcomb   (14 posts)  [Biography] bio
Date Reply #10 on Fri 02 May 2003 03:30 PM (UTC)
Message
Yes I know that currently the arrow keys or some other keys do have functions attached to them. But would it be possible to allow the user to override these functions and assign marcos to them?

I don't use the Ctrl+Arrow to scroll the screen so I would like to override them with my own commands.
[Go to top] top

Posted by Cknight19   (1 post)  [Biography] bio
Date Reply #11 on Tue 10 May 2005 09:35 AM (UTC)
Message
The code below demonstrates how to override the default browser menu alt shortcut keys, so u can use them for your own actions. Press <alt+f> for demo. Works in both Firefox and IE.

Hope this is off some use.


<html>
<head>
<title>All <ALT> keys</title>
<script>
function keyPress(e)
{
if ( !e.altKey ) return;
status='altkey + ' + e.keyCode;
if ( e.keyCode==70 ) alert("alt f");
e.returnValue = false;
e.cancelBubble=true;
return false;
}
</script>
</head>

<body onkeydown='keyPress(event);'>
<a href=# accesskey='f' style='height:1px; FILTER : PROGID:DXIMAGETRANSFORM.MICROSOFT.BASICIMAGE( OPACITY=0.30);moz-opacity:0.30;'>I use accesskeys to block menu shortcut keys. Make me invisible and float me off the screen.</a>
</body>
</html>
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


10,078 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]