Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use key Tab to show pixel raw bytes #193

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chaosink
Copy link
Contributor

@chaosink chaosink commented Oct 16, 2022

Shift+Ctrl should be held to show pixel raw bytes.
But this keybinding conflicts with others, like reference image selection.
A usage case prevented by this is that: keep showing pixel raw bytes, and switch between images by number keys for comparison.

This commit changes the keybinding to Tab.
@Tom94 Maybe you want another key.
Thanks!

@Tom94
Copy link
Owner

Tom94 commented Oct 16, 2022

This is a good idea. I've been bothered by the overlap in hold-keybindings for a while... although what kept me away from Tab so far is how easy it'd make it to press Ctrl+Tab or Alt+Tab accidentally.

However, now that I think about this a bit more deeply: the spacebar is currently unused in tev, and I can't think of typical OS-wide shortcuts that it might cause conflicts with (other than Cmd+Space on macOS, but I don't think tev uses Cmd for any hold action). What's your opinion on using space instead of tab?

(That aside, for the PR, could you also change the listed keybinding in HelpWindow.cpp?)

@chaosink
Copy link
Contributor Author

Forgot to change the keybinding in HelpWindow.cpp. Thanks for pointing it out. Will do it later.

Agree on the disadvantage of Tab.

Space is used for image play.
Just notice that the 3 keybindings (Space, Home, End) for image play are not listed in HelpWindow.cpp.

What about key B (raw 'B'ytes)?

We may also distinguish between left and right Shift/Ctrl/Alt and use the right ones (they are the most useless keys) to show pixel raw bytes.
Though we may need to move the right hand from the mouse to the keyboard (of course we can still use the left hand), I think it's OK due to the enough keybindings.

What do you think?

@Tom94
Copy link
Owner

Tom94 commented Oct 16, 2022

Oh wow, I totally forgot about playback -- thanks for pointing it out. You're right, I need to add those to the help window. And while at that make it scrollable... IIRC it's already pushing the default size of the window.

I do like 'B'. While it conflicts with Ctrl+B (which hides/shows the sidebar), that shortcut is only triggered when Ctrl is already held at the point when B is pressed. Which I suppose happens rarely enough. Please feel free to make the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants