Additional Keyboard Map Option Needed

Post any comments, suggestions, annoyances or ideas for future releases here. Please do not post bug reports or questions here.
Post Reply
avenger
Posts: 18
Joined: Wed Aug 03, 2016 11:56 am

Additional Keyboard Map Option Needed

Post by avenger » Tue Aug 23, 2016 7:07 pm

Greetings,

I think there should be an additional keyboard map option: Paste Removes Mark.

Currently, when I copy something, double-click to select a word/term and then paste, there is still a selection remaining. This is rather annoying and incongruent with other popular editors. I believe this option should be kept separate from the similar Cut/Copy Removes Mark option.

Thank you for listening. :D

jussij
Site Admin
Posts: 2512
Joined: Fri Aug 13, 2004 5:10 pm

Re: Additional Keyboard Map Option Needed

Post by jussij » Wed Aug 24, 2016 1:52 am

I am not seeing this behaviour :?

For me all pastes remove the selection mark, so it probably comes down to which function you are using for the paste or how you have configured your new mapping.

Firstly, make sure your new keyboard mapping has the Cut/copy removes mark option set. You will see that option at the top of the Edit Keyboard Mapping dialog.

If that does not fix the issue, you need to determine the function you are using for the paste.

To find out the function use the Macros menu to start a recording, do the paste and stop the recording.

Then use the Macros menu to view the source of the macro just recorded.

Post the name of that function to this thread.

Cheers Jussi

avenger
Posts: 18
Joined: Wed Aug 03, 2016 11:56 am

Re: Additional Keyboard Map Option Needed

Post by avenger » Wed Aug 24, 2016 11:44 am

Actually, when copying something, I like to see the selection remain after I copy it. This is congruent with many (most?) other Windows-based text editors, Excel, etc. To me, it is distracting to see my selection suddenly disappear after I press [Ctrl]+[C]. Cutting, though, is another matter entirely. My selection and the cut text should both disappear after a "cut" take place. It puzzles me why cut and copy were ever grouped together and not implemented as separate options.

Cheers :)

jussij
Site Admin
Posts: 2512
Joined: Fri Aug 13, 2004 5:10 pm

Re: Additional Keyboard Map Option Needed

Post by jussij » Wed Aug 24, 2016 2:02 pm

It puzzles me why cut and copy were ever grouped together and not implemented as separate options.
The answer to that is hidden in the distant past when Zeus was first developed.

But as Zeus started out life as Brief like clone it might be something that it got from Brief :?

For a long time Zeus only did Brief and the ability to actually change the mappings was only added on the request of other non Brief users.

Cheers Jussi

avenger
Posts: 18
Joined: Wed Aug 03, 2016 11:56 am

Re: Additional Keyboard Map Option Needed

Post by avenger » Wed Aug 24, 2016 5:16 pm

MarkPasteSmart is the function assigned to [Ctrl]+[V].

You are correct - when Cut/copy removes mark is selected, pasting also removes mark. I did not have this option selected because I like/expect to see my selection after copying until I press some navigation or input key. THanks for the tip. I guess I'll have to endure the remaining selection post-paste because I don't want to give up seeing my selection immediately after a [Ctr]+[C] combination.

Best regards. :)

jussij
Site Admin
Posts: 2512
Joined: Fri Aug 13, 2004 5:10 pm

Re: Additional Keyboard Map Option Needed

Post by jussij » Thu Aug 25, 2016 12:16 am

Actually, when copying something, I like to see the selection remain after I copy it.
...
I guess I'll have to endure
Naturally you could just put up with these things sort of things that are not to your liking.

But as Zeus is scriptable, another option is to just write a macro and make Zeus do exactly what you want ;)

Here's a macro for the copy behaviour you're looking for:

Code: Select all

function key_macro()
    if is_window() > 0 then
        if is_marked() > 0 then
            local marked_text = macro_tag("$Marked")

            set_clipboard_text(marked_text )

            message("The marked text has been added to clipboard.")
        else
            message("No text area has been marked!")
            beep()
        end
    else
        message("To run this macro you need an active window.")
        beep()
    end
end

key_macro() -- run the macro
In fact that macro already exist :)

It can be found here:

Code: Select all

zScript\copy_to_clipboard.lua
Cheers Jussi

Post Reply
kuchnie warszawa opinie

Who is online

Users browsing this forum: No registered users and 4 guests