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
➜ Bug reports
➜ Removing Accelerator doesn't work in ver 5.05
Removing Accelerator doesn't work in ver 5.05
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| WillFa
USA (525 posts) Bio
|
Date
| Sat 24 Jun 2017 03:59 PM (UTC) |
Message
| Back about 11 years ago, Ked made a request (bbsubject_id=6634) to remove an Accelerator from the AcceleratorList. This change was added in version 3.75.
Setting an Accelerator to an empty string no longer removes it.
What I'm trying to do: my mud gives exits in the room_short description when wandering around. I'm trying to remap some convenient keys to non-standard exits.
a sample room_short: A Vortex (s,w,e,enter)
my code:
acclerators = {"CTRL+PAGEUP", "CTRL+PAGEDOWN", "SHIFT+PAGEUP", "SHIFT+PAGEDOWN"}
StandardDirs = {n=true, nw = true, ne = true, w=true, e=true, s=true, sw=true, se=true, d=true, u=true}
function onRoomShort( t,l,w,sr )
for k,v in ipairs(acclerators) do Accelerator(v,"") end
--tprint(AcceleratorList())
local exitText = l:match("%((.+)%)")
local rooms = utils.split(exitText, ",")
local roomIndex = 1
while rooms[roomIndex] do
if StandardDirs[rooms[roomIndex]] then
table.remove(rooms, roomIndex)
else
roomIndex = roomIndex+1
end
end
--tprint(rooms)
for k,v in ipairs(rooms) do
Accelerator(acclerators[k], v)
end
--tprint(AcceleratorList())
end
shows that Ctrl+PageUp and Ctrl+PageDown are both mapped now. I'm not positive that PageDown was added in a previous buggy version of my code, and not being added each time.
Also, a script entered from the command line: Accelerator("Ctrl+PageDown", "") doesn't get rid of it. I'd like the Accelerators removed so that in the next room, I don't fat finger the wrong key and send bad/deadly commands to the mud. | Top |
|
Posted by
| Fiendish
USA (2,537 posts) Bio
Global Moderator |
Date
| Reply #1 on Sat 24 Jun 2017 04:52 PM (UTC) Amended on Sat 24 Jun 2017 04:53 PM (UTC) by Fiendish
|
Message
| It looks to me like the accelerator does get removed. It just doesn't get changed in whatever display list AcceleratorList() is pulling from.
If I do Accelerator("Ctrl+PageDown", ""), the accelerator stops working, but AcceleratorList still shows the old setting. |
https://github.com/fiendish/aardwolfclientpackage | 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.
11,681 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top