Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Possible to disable these mush client specific shortcuts?

Possible to disable these mush client specific shortcuts?

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


Posted by LucianDK   (23 posts)  Bio
Date Mon 26 Mar 2012 09:44 PM (UTC)
Message
Ctrl+w
Ctrl+t
Ctrl+r
Ctrl+f
Ctrl+g
Ctrl+u
Ctrl+l
Ctrl+n

Problem is that I find myself often hitting the ctrl button with my palm when I write, having a keyboard with a large and wide wrist support, and having those events pop up often is irritating. I dont recall having such problems with shortcuts in earlier versions of mushclient.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Tue 27 Mar 2012 04:53 AM (UTC)
Message
I don't think that has changed recently, but just go into the World configuration -> Macros, and edit each one of those, replacing "take" or whatever by an empty string (ie. delete what is there).

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by LucianDK   (23 posts)  Bio
Date Reply #2 on Tue 27 Mar 2012 07:36 AM (UTC)

Amended on Tue 27 Mar 2012 07:53 AM (UTC) by LucianDK

Message
Nick Gammon said:

I don't think that has changed recently, but just go into the World configuration -> Macros, and edit each one of those, replacing "take" or whatever by an empty string (ie. delete what is there).


Managed to stop the macros that would pop up words like whisper and take as I saw there was specific ones for those commands.

Ctrl+r Repeats last send to the world
Ctrl+f Finds text

is however still a problem, no macros present with them in the list, nor is it possible to add new ones to make blank commands.


Edit: Seems as soon I shutdown the client and restarts, the macros reverts to standard, ignoring all the edits made. Been trying to save them after Ive removed the text strings from those having them and set it as the default macros file to load upon startup, no worky.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #3 on Tue 27 Mar 2012 08:01 PM (UTC)
Message
Hmm. They should save. But anyway. To cater for the ones not in the list you can make your own accelerators. For example:


AcceleratorTo ("Ctrl+R" , "", sendto.script )


This says if you type Ctrl+R send an empty string to the script engine (ie. do nothing).

You would need one such for each of the ctrl keys you want to suppress.

These won't save either, but see:

Template:faq=39 Please read the MUSHclient FAQ - point 39.


That shows a small plugin you can make which will remember the accelerator keys. Just amend the middle to be like what I showed above, save that as a plugin and install it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by LucianDK   (23 posts)  Bio
Date Reply #4 on Wed 28 Mar 2012 08:36 PM (UTC)
Message
Created the accelerators.xml file

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<muclient>
<plugin
name="Accelerators"
author="Nick Gammon"
id="bcd4c85623b51c11ec643123"
language="Lua"
purpose="Add custom keystrokes"
date_written="2007-04-17 16:16:25"
requires="3.80"
version="1.0"
>
</plugin>
<script>
<![CDATA[
function OnPluginInstall ()

AcceleratorTo ("Ctrl+w" , "", sendto.script )
AcceleratorTo ("Ctrl+t" , "", sendto.script )
AcceleratorTo ("Ctrl+r" , "", sendto.script )
AcceleratorTo ("Ctrl+f" , "", sendto.script )
AcceleratorTo ("Ctrl+g" , "", sendto.script )
AcceleratorTo ("Ctrl+u" , "", sendto.script )
AcceleratorTo ("Ctrl+l" , "", sendto.script )
AcceleratorTo ("Ctrl+n" , "", sendto.script )

-- add more here ...

-- list them
for _, v in ipairs (AcceleratorList ()) do Note (v) end

end -- function OnPluginInstall
]]>
</script>
</muclient>


But upon installing the plugin, this message appears:

Error number: 0
Event: Run-time error
Description: [string "Plugin"]:15: bad argument #1 to 'ipairs' (table expected, got nil)

stack traceback:

[C]: in function 'ipairs'

[string "Plugin"]:15: in function <[string "Plugin"]:1>
Called by: Function/Sub: OnPluginInstall called by Plugin Accelerators

Reason: Executing plugin Accelerators sub OnPluginInstall
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #5 on Thu 29 Mar 2012 12:36 AM (UTC)
Message
Looks like you have to have a space between the quotes. This worked OK for me:

Template:saveplugin=Accelerators To save and install the Accelerators plugin do this:
  1. Copy between the lines below (to the Clipboard)
  2. Open a text editor (such as Notepad) and paste the plugin into it
  3. Save to disk on your PC, preferably in your plugins directory, as Accelerators.xml
  4. Go to the MUSHclient File menu -> Plugins
  5. Click "Add"
  6. Choose the file Accelerators.xml (which you just saved in step 3) as a plugin
  7. Click "Close"



<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<muclient>
<plugin
  name="Accelerators"
  author="Nick Gammon"
  id="bcd4c85623b51c11ec643123"
  language="Lua"
  purpose="Add custom keystrokes"
  date_written="2007-04-17 16:16:25"
  requires="3.80"
  version="1.0"
>
</plugin>

<script>

<![CDATA[

function OnPluginInstall ()

  AcceleratorTo ("Ctrl+W" , " ", sendto.script )
  AcceleratorTo ("Ctrl+T" , " ", sendto.script )
  AcceleratorTo ("Ctrl+R" , " ", sendto.script )
  AcceleratorTo ("Ctrl+F" , " ", sendto.script )
  AcceleratorTo ("Ctrl+G" , " ", sendto.script )
  AcceleratorTo ("Ctrl+U" , " ", sendto.script )
  AcceleratorTo ("Ctrl+L" , " ", sendto.script )
  AcceleratorTo ("Ctrl+N" , " ", sendto.script )
  
  -- add more here ...

end -- function OnPluginInstall

]]>
</script>
</muclient>


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by LucianDK   (23 posts)  Bio
Date Reply #6 on Thu 29 Mar 2012 12:38 PM (UTC)
Message
That did the trick and they are saved on restart :)

no more bothersome shortcuts. Thank you.
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.


25,702 views.

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

Go to topic:           Search the forum


[Go to top] top

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