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.
Entire forum
➜ MUSHclient
➜ Development
➜ CTRL+Backspace Code
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Samga
(4 posts) Bio
|
Date
| Sun 12 Dec 2010 02:27 PM (UTC) |
Message
| I downloaded the source code for 4.02 and am looking for the key combination code that is CTRL+Backspace taking the last word from the command history and putting it into the command window. I just want to remove it, because I, being a programmer at work, use CTRL+Backspace ALL the time, and sometimes, I'll be playing and need to restart a whole sentence, hitting CTRL+Backspace a lot of times, only to remember what CTRL+Backspace does in MUSHClient.
I was going to suggest adding an option for the way CTRL+Backspace works in Global Preferences or something, but I figured I could just remove it myself.
I'll be sifting through the code to find it, but if one of you knows exactly where it is and can tell me, I'd appreciate it.
Thanks. | Top |
|
Posted by
| Worstje
Netherlands (899 posts) Bio
|
Date
| Reply #1 on Sun 12 Dec 2010 03:10 PM (UTC) |
Message
| Have some examples of apps that use Ctrl-Backspace to remove the last word? I never heard of this before (although it does kinda make sense given the effect of Ctrl-Left and Ctrl-Right. Amusing detail though: in MUSHclient, Ctrl-Delete seems to delete everything on the same line after the cursor.
Reason I ask is that Notepad does not have your Ctrl-Backspace functionality, which means it isn't a 'standard' Windows effect. Although it would seem Opera does have this effect as I just tried it out here.
All in all, I'm not opposed at all to making this change to be the default. The old behaviour makes very little practical sense to me personally. | Top |
|
Posted by
| Samga
(4 posts) Bio
|
Date
| Reply #2 on Sun 12 Dec 2010 03:16 PM (UTC) Amended on Sun 12 Dec 2010 03:22 PM (UTC) by Samga
|
Message
| Visual Studio for one. Chrome, Firefox, IE even. Microsoft Word, OpenOffice, Digsby, Pidgin, Yahoo Messenger, MSN Messenger, AIM...I could go on.
Basically, every other application I use, aside from the few ones, like notepad and the command line, does CTRL+Backspace like mentioned.
edit: Also, the CTRL+Delete function you speak of is the same as Notepad's. | Top |
|
Posted by
| WillFa
USA (525 posts) Bio
|
Date
| Reply #3 on Sun 12 Dec 2010 06:52 PM (UTC) |
Message
| |
Posted by
| Nick Gammon
Australia (23,094 posts) Bio
Forum Administrator |
Date
| Reply #4 on Sun 12 Dec 2010 08:53 PM (UTC) |
Message
|
Samga said:
I'll be sifting through the code to find it, but if one of you knows exactly where it is and can tell me, I'd appreciate it.
In sendvw.cpp:
void CSendView::OnRepeatLastWord()
{
// can't, if no previous command
if (m_msgList.IsEmpty ())
return;
CString strLine = m_msgList.GetTail ();
strLine.TrimRight ();
int iPos = strLine.ReverseFind (' ');
CString strWord = strLine.Mid (iPos + 1);
GetEditCtrl().ReplaceSel (strWord, TRUE);
}
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,094 posts) Bio
Forum Administrator |
Date
| Reply #5 on Sun 12 Dec 2010 09:07 PM (UTC) |
Message
| The idea of the original behaviour was this ...
You did some action with something, eg.
And now you want to do something else to it, eg.
So you type:
That's less keystrokes. It's similar to the Bash shell where you recall the last word with <Esc> .
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Ruckinfok
(7 posts) Bio
|
Date
| Reply #6 on Fri 21 Jun 2013 06:02 PM (UTC) |
Message
| Is there a way to disable behavior and revert to "normal" ctrl+backspace behavior as mentioned without removing source code? | Top |
|
Posted by
| Nick Gammon
Australia (23,094 posts) Bio
Forum Administrator |
Date
| Reply #7 on Sat 22 Jun 2013 07:29 AM (UTC) |
Message
| What is the normal behaviour exactly?
Anyway you can use the Accelerator script function to do something with it, eg.
Accelerator ("Ctrl+Backspace", "foo" )
Or, AcceleratorTo. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Samga
(4 posts) Bio
|
Date
| Reply #8 on Sat 22 Jun 2013 02:14 PM (UTC) |
Message
| He's referring to the way I described it. For instance, if you go to reply to this thread, and type a few words in the message box, then hit CTRL+Backspace, it deletes the word directly behind your cursor. He was practically hoping that something had been implemented for the user to toggle between the two implementations. Keep your implementation, but allow the user to switch it to the "normal" CTRL+Backspace functionality. | Top |
|
Posted by
| Nick Gammon
Australia (23,094 posts) Bio
Forum Administrator |
Date
| Reply #9 on Sun 23 Jun 2013 10:34 AM (UTC) |
Message
| You can always press Shift+Ctrl+Left-arrow followed by Delete.
That's two keys rather than one, but it lets you delete a whole word. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | 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.
41,673 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top