|
Post by Stefan on Mar 18, 2023 4:31:58 GMT -5
George,
I'm a clumsy clot at times, especially when it comes to the keyboard.
To make the SPFlite keyboard behave like the rest of Windows in respect of text highlited with the mouse, I mapped CTRL-C to (Copy), CTRL-X to (Lift) and CTRL-V to (Paste). On most keyboards, the X, C and V keys are adjacent. Great for simple "left-hand-only" activation, but it's also easy to hit the wrong one.
So, left hand on keyboard, right on the mouse, I... - highlite text with the mouse, - press CTRL-C,
- click mouse to reposition the cursor to the target location, - and then promptly miss and hit CTRL-C again instead of CTRL-V to paste the data.
This is awkward because the second (Copy) replaces the first, even though no bytes are marked/highlited at the target location.
The Suggestion is that the (Copy) and (Lift) primitives behave like Windows' Copy/Cut and do NOT update the clipboard when there is no 'marked' data to be ingested.
|
|
|
Post by George on Mar 19, 2023 10:16:05 GMT -5
Stefan: Yes, I've been caught by this many times as well. And if someone really wants the CB cleared, then just assign (ClipClear) to a key - like Alt-C ?
George
|
|
|
Post by Robert on Mar 19, 2023 12:06:20 GMT -5
It does seem that in most cases, attempting to copy into the clipboard when no text is highlighted is a mistake. I have no objection to this change, as long as one aspect of mouse/keyboard handling is not changed.
That is, if I issue a primitive like a case change or a color change, if no text is highlighted, the current behavior is to use the single character located where the cursor is. SPFLite works this way because I asked for it many years ago. The rationale was that highlighting a single character alone, either with mouse or keyboard, is remarkably hard to do. This is what happens now if Ctrl-C (Copy) is used for a single un-highlighted character.
Before you make this change, consider all of the side effects. Please don't break a good solution to one problem in order to fix another one.
|
|
|
Post by George on Mar 20, 2023 10:42:37 GMT -5
Robert: Well, that little 'fudge' from years ago cost me about 2 hrs debugging yesterday. Not remembering what it was for at all, when I spotted it, I ripped it out and solved my problem. But that leaves you without the fudge. So I've created a macro that gives it back. Attached is a CCL.MACRO. Replace your (Copy), (Cut) and (Lift) with CCL Copy, CCL Cut and CCL Lift and you'll be back. Note: Make sure you grab the latest Beta (23079) at the same time as I had to fix a minor quirk of SPF_Post_Do. George CCL.MACRO (1004 B)
|
|
|
Post by Robert on Mar 20, 2023 12:26:03 GMT -5
I will check out this macro as soon as I can. However, one of the reasons for the original change was to be able to do things like highlight a single character with the need to highlight it, because highlighting one character is quite difficult to do. SPFLite's screen handling isn't really up to the task.
|
|
|
Post by Robert on Mar 20, 2023 12:47:18 GMT -5
I did some experimentation. If there is nothing currently highlighted, the function (MarkRight) would work. But if there is highlighting in effect, it will either cancel the 'marking' action, or extend it.
I have an idea that would remove the need for a macro and would basically restore the old functionality.
Suppose there were a primitive named (cMarkRight). It would be a 'conditional Mark Right' and behave as follows:
1. If there is NO active highlighting, (cMarkRight) would work the same as (MarkRight) 2. If there IS active highlighting, (cMarkRight) would do nothing, neither remove existing highlighting or change the size of the current highlighted area.
There would be corresponding functions for left, up and down.
In practice, these functions (usually just Right) would precede any keymapping where a previous highlight were required.
Example: My Ctrl Shift R is now defined as (Pen/Red)
With these new functions, Ctrl Shift R would be changed to (cMarkRight)(Pen/Red)
|
|
|
Post by George on Mar 20, 2023 13:32:46 GMT -5
Robert: OK, I gave you back what was taken away, does it not do what the previous fudge did?
Or is this request for 4 new primitives a whole new ask?
George
|
|
|
Post by Robert on Mar 20, 2023 14:30:06 GMT -5
OK, allow me to summarize.
1. I don't feel that the macro restores everything that was lost.
2. I will admit that what was lost isn't THAT big a deal. I will miss it if it's gone, but oh well.
3. What does it not do? As an example, I can apply a highlighting pen to a single character without highlighting it. I don't see how the macro can fix that, not directly. I may be misunderstanding it. It applies to (Copy) etc. but not to other primitives that depend on a text selection. I suppose the macro might be greatly enlarged by trying to simulate every primitive that needs selected text. That would take some doing but not impossible.
4. Is this a new ask? Since you mention it, it does indeed seem to be a new ask. However, it would also seem to be a relatively small ask. Example pseudo-code:
FUNCTION cMarkRight() '/ "_active_selection()" must be replaced with your function name
IF ISFALSE (_active_selection()) THEN MarkRight() '/ highlight one character ELSE '/ do nothing END IF END FUNCTION 5. Will I be broken hearted if you don't do it? No. Your choice. I will accept your decision.
R
|
|
|
Post by George on Mar 20, 2023 14:54:11 GMT -5
What exactly does this macro NOT do? Maybe it can be fixed. (Given that a macro can never completely replace a built-in) There's no reason it can't 'front-end' any other primitives.
My concern is really, are these new functions ever going to be used by anyone? I'm trying to picture their description and whether anyone reading them would do more than go "Huh! What's the point?". They really are very specifically tuned to your exact requirements.
George
|
|
|
Post by George on Mar 21, 2023 9:50:38 GMT -5
Robert: Try Beta 23080, cMarkLeft etc are there. Let me know how they look
George
|
|
|
Post by Robert on Mar 21, 2023 10:14:12 GMT -5
George, about cMarkLeft etc:
1. Having a late start, just woke up. I will check the beta asap.
2. Remembering that we had a function CondLineNo, the names probably should have been CondMarkLeft etc. No big.
3. I owe you an apology. Your changes to help Stefan avoid erasing the clipboard for an errant Ctrl-C did NOT prevent a 1-character colorization using a key mapped to (Pen/Red) etc.
You were right. Will anyone reading the Help for them ever do more than go "Huh! What's the point" (and never use them)? NO.
I totally blew this. I never should have asked for these functions. I'm sorry. This is totally my bad. Unless someone (Stefan?) wants to speak up now and thinks they are of some use, you can shoot these (or shoot me, your choice), or leave them in if they work. (I am still waking up, still have to download the beta.)
Sigh.
|
|
|
Post by Robert on Mar 21, 2023 11:43:37 GMT -5
OK, downloaded the 080 beta. Hmm ...
The CMarkRight does in fact work. It turns out that (Pen/...) was not the only thing affected.
1. Before, I could change case of a single letter with (LowerCase), (UpperCase) etc. Now, that works with (LowerCase) but NOT (UpperCase). Huh?
2. That's not all. Try this:
---test case 1---
data: ABCD-WXYZ
Highlight the WXYZ
Press Ctrl L mapped to (LowerCase)
data is changed to ABCD-wxyz [correct]
now, immediately press Ctrl U mapped to (UpperCase)
data is not changed [correct ... so far]
---test case 2---
data: ABCD-wxyz
Highlight the wxyz
Press Ctrl U
data is changed to ABCD-WXYZ [correct]
now, immediately press Ctrl L
data is changed to ABCD-wxyz [*** INCORRECT ***]
There was nothing highlighted, so (LowerCase) shouldn't have done anything.
Hmm again ...
George, how about we have an old-fashioned Mexican standoff and shoot each other? It would hurt a lot, but at least it would be over sooner.
|
|
|
Post by George on Mar 21, 2023 15:19:09 GMT -5
Well, that's baffling. There's been nothing changed in Upper or Lower case support (why would I?).
Nothing changed in the normal Mark(L/R/U/D) routines either.
But something is different. This kind of thing is simply infuriating. Tracing this kind of thing is just so labor intensive and soul destroying. I'm truly tempted to just chuck the whole thing, this is getting ridiculous.
Maybe shooting each other is the best solution.
George
|
|
|
Post by Robert on Mar 21, 2023 17:04:55 GMT -5
At least we can agree on that much. What'ya say we go online and pick out matching caskets, and makeup to cover over the bullet holes.
That should about do it. Yep-er, I done thinks that'd just 'bout do it, yes-sir-re.
|
|
|
Post by George on Mar 22, 2023 9:01:14 GMT -5
Robert: OK, it turned out to be trivial. LC didn't test for an active MARK area.
Phew!
George
P.S. If I set Ctrl-U and Ctrl-L to have a (cMarkRight) inserted, it works fine.
|
|