Welcome Guest.   Make a donation to an author on the site November 23, 2014, 09:54:26 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
The N.A.N.Y. Challenge 2014! Download dozens of custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Req: Ctrl+backspace to delete from cursor position  (Read 4795 times)
lanux128
Global Moderator
*****
Posts: 6,132



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« on: January 06, 2010, 05:43:26 AM »

currently when using Ctrl+backspace to delete the previous word, Farr starts from the end of the line regardless of the cursor position. can Farr be made aware of the cursor position and delete from that position?
Logged

ewemoa
Honorary Member
**
Posts: 2,491



View Profile Give some DonationCredits to this forum member
« Reply #1 on: May 11, 2010, 07:39:26 AM »

I would like this too.  I think something similar was mentioned at:

  http://www.donationcoder....m/index.php?topic=18120.0

Here's a little hack to demo the desired behavior:

  http://ewemoa.dcmembers.c.../tmp/FARRCtrlBSDelFix.exe

SHA1: 8cbc04eaf82a8b403657e94366afe887d4a08a70

Control+Delete behavior is also changed.  It's a quick hack so be warned smiley

(It's done using AutoHotkey_L in case you feel like decompiling, messing around and recompiling.)
Logged
mouser
First Author
Administrator
*****
Posts: 33,692



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: May 11, 2010, 07:47:01 AM »

can you fellows truly be planning to use such an odd feature?
Logged
skajfes
Honorary Member
**
Posts: 204


View Profile Give some DonationCredits to this forum member
« Reply #3 on: May 11, 2010, 08:06:07 AM »

can you fellows truly be planning to use such an odd feature?
Why not? It is standard behavior for all text boxes in windows (as far as i can tell) and I use it very often, along with other shortcuts (ctrl + del, ctrl + left, ctrl + right, ctrl + shift + del...), so it is a bit confusing when FARR (launcher for keyboard manics) doesn't work as expected.
Logged

It is impossible to make anything foolproof because fools are so ingenious.
ewemoa
Honorary Member
**
Posts: 2,491



View Profile Give some DonationCredits to this forum member
« Reply #4 on: May 11, 2010, 08:49:25 AM »

I agree with skajfes and present exhibit A:

  http://www.donationcoder....21712.msg195526#msg195526
Logged
lanux128
Global Moderator
*****
Posts: 6,132



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #5 on: May 11, 2010, 08:04:24 PM »

I would like this too.

thanks ewemoa, much appreciated. Cool
Logged

ewemoa
Honorary Member
**
Posts: 2,491



View Profile Give some DonationCredits to this forum member
« Reply #6 on: May 12, 2010, 08:37:09 AM »

Hope it works out ok for you.

Logged
lanux128
Global Moderator
*****
Posts: 6,132



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #7 on: May 12, 2010, 10:40:45 AM »

Hope it works out ok for you.

thanks again for this script as it comes in handy when i'm using a live search plugin in Farr (e.g. Google Plus or FarrWebMetaSearch).

btw, you dropped a hint when you mentioned AutoHotkey_L since it has the #If command. smiley but i wonder if this works with multi-line edit control?

Logged

ewemoa
Honorary Member
**
Posts: 2,491



View Profile Give some DonationCredits to this forum member
« Reply #8 on: May 12, 2010, 04:41:46 PM »

As I understand it, the way this works has to do with the class of the control (and now also that of the window the control lives in).  If those match, it seems like it may work.  For reference:

  http://www.autohotkey.net/~Lexikos/AutoHotkey_L/docs/commands/_If.htm

« Last Edit: May 12, 2010, 05:35:53 PM by ewemoa » Logged
lanux128
Global Moderator
*****
Posts: 6,132



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #9 on: May 12, 2010, 07:56:45 PM »

thanks for the source.. i'm already using your "Select All" script, this one is also within that scope. soon we can have an ewemoa's compendium for better text editing. smiley
Logged

lanux128
Global Moderator
*****
Posts: 6,132



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #10 on: May 13, 2010, 09:09:17 AM »

i found a program (mIRC) where this scripts doesn't work.. Sad as you can see in the screenshot. it's focused on the edit control but Ctrl+Backspace doesn't work. maybe you can work your magic here. smiley

Logged

ewemoa
Honorary Member
**
Posts: 2,491



View Profile Give some DonationCredits to this forum member
« Reply #11 on: May 13, 2010, 09:23:29 AM »

i found a program (mIRC) where this scripts doesn't work.. Sad
Well it is not surprising to me smiley  The current code is deliberately made to be a bit focused on where it's supposed to work.

FWIW, the code from which this descends only checked controls with class "Edit".  FARR doesn't use that for its main edit box IIUC, so I changed what it checks for.  I also modified it to check the window class as the original request was for FARR and I didn't want this to affect too many other things.

I agree that a more general tool would be interesting, but haven't given it much consideration yet.

« Last Edit: May 13, 2010, 09:30:27 AM by ewemoa » Logged
ewemoa
Honorary Member
**
Posts: 2,491



View Profile Give some DonationCredits to this forum member
« Reply #12 on: May 13, 2010, 07:31:36 PM »

Perhaps a new topic is in order?

FWIW, the following is something that tries to work with a wider selection of controls:

  http://ewemoa.dcmembers.com/tmp/CtrlBSDelHack.exe

SHA1: 7e808d15300c9bfb40e6b66d09f0893a112a6432
Logged
ewemoa
Honorary Member
**
Posts: 2,491



View Profile Give some DonationCredits to this forum member
« Reply #13 on: May 15, 2010, 11:29:14 PM »

lanux128, I am not finding the hack to work in the following situation.



Without the hack running, Control+LeftArrow at the end of the path field will move the cursor to the beginning of the field.

Before:
  C:\WINDOWS\System32|

After:
  |C:\WINDOWS\System32

where | shows the cursor position.

Contrast this with Windows Explorer's address field where the result is that the cursor moves to the right of the last backslash.

Before:
  C:\WINDOWS\System32|

After:
  C:\WINDOWS\|System32

Without the hack running, do you happen to know some general keystrokes that would move the cursor to the right of the last backslash in the Extraction Wizard dialog?  More generally, moving the cursor to the first backslash to the left of the current cursor position smiley

I'd rather not do things that involve copying the text, analyzing the content, and sending arrow keys to get this to work...
Logged
lanux128
Global Moderator
*****
Posts: 6,132



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #14 on: May 16, 2010, 04:47:19 AM »

i noticed this too on a installer dialog (can't remember if it was InstallShield or NSIS). they do not seem identify the backslash as a delimiter, unlike the way windows explorer does. i believe this is the default in most text editors and word processors. i'll let you know if i find out anything. smiley
Logged

Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.172s | Server load: 0.04 ]