Repository navigation
Conversation
|
How is this supposed to work? I'm trying |
That's what I was referring to in my above comment, maybe not clear enough. As it is, scrot requires an additional flag to not exit with keyboard input: -i/--ignorekeyboard. Didn't want to touch things I wasn't directly working on but I wonder if it is in fact necessary. |
I see, that's certainly confusing. I'd expect ignore keyboard to... well ignore keyboard. I suggest adding a separate --keyboard/-K flag to enable keyboard control.
|
|
I was wondering if diagonal movement would be nice as well? |
|
This PR would break the current behavior of being able to correct the start of the selection via keyboard and mouse, which is the most important part, in my opinion. In other words, in the master branch you can correct the start of the selection: scrot_select_master.mp4 |
Fixing that on my end, big oversight on my end, thanks. Should that functionality also be present in keyboard controls? Say holding alt will correct the start? |
|
Yes, I think it should work, that is, we'll have to test it thoroughly.
… *hew02* left a comment (resurrecting-open-source-projects/scrot#427)
<#427 (comment)>
Fixing that on my end, big oversight on my end, thanks. Should that
functionality also be present in keyboard controls? Say holding alt
will correct the start?
Message ID:
***@***.***>
|
5e0682d to
55f1a97
Compare
|
Thank you for the feedback thus far |
|
I encountered a strange situation; if I run the command In short:
The solution to this behavior would be to ignore the Alt key until the first selection is made. I'm not sure if I've explained myself clearly :-) |
Makes perfect sense and I'm going through and trying different combinations of possible inputs. Is it worth keeping the distinction between a button press and a keyboard key to start the selection? As I see it what matters is that a selection has started and some behavior should be gated until that occurs. |
I’m not sure if I understood you correctly, but the idea is that if the user employs the Something like that. diff --git a/src/scrot_selection.c b/src/scrot_selection.c
index 71fe6a0..d376a9e 100644
--- a/src/scrot_selection.c
+++ b/src/scrot_selection.c
@@ -226,6 +226,9 @@ static bool scrotSelectionGetUserSel(struct SelectionRect *selectionRect)
}
while (done == WAIT) {
+ if (opt.useKeyboard)
+ isButtonPressed = false;
+
XNextEvent(disp, &ev);
switch (ev.type) {
case MotionNotify:
@@ -338,7 +341,7 @@ static bool scrotSelectionGetUserSel(struct SelectionRect *selectionRect)
scrotSelectionMotionDraw(rx, ry, p.x, p.y);
}
}
- else {
+ else if (isButtonPressed) {
rx = r.x; ry = r.y;
scrotSelectionMotionDraw(rx, ry, ev.xkey.x, ev.xkey.y);
}:-) That is just my opinion, of course; if you have other ideas, we can try them out. |
Yes that makes sense to me, my question, if I remember correctly, is stemming from the possibility to start with mouse select and begin an area select then pressing space would start a keyboard select and create a new origin point. The opposite is true as well. My question then being should there only be on one chance to create a new origin point, either keyboard or mouse? |
Sorry, just reading your response again and realizing you answered my question haha! |
…or selection resizing when using mouse. Finally, when keyboard is enabled however the selection started, the alternate method can complete it.
|
Great. Thanks. :-) git diff --name-only master
man/scrot.txt
src/options.c
src/options.h
src/scrot.c
src/scrot_selection.c
src/scrot_selection.h@hew02 we need you to do it because it's the first collaboration, and some users prefer different names/emails. @N-R-K , it is up to you to decide whether this PR resolves what you indicated in #369 ; if so, you can go ahead and merge it into |
I've only looked thru the changes at a glance. I want to go thru them more thoroughly before merging. But it'll take me some time before I'm free to do so, around a week or so. |
|
Thank you guys for working through this with me. Hopefully can make more contributions further down the line :) |
I wasn't sure if the ignore keyboard option, as it stands, should now be enabled by default, for now I have kept the original intent. Obviously borrows for
selx. Let me know if there need to be further adjustments. #369.