Forum > Webcomic & Art discussion > Ideal drawing program features
Pages: 1 2 3
"The Labyrinth of Shortcuts", One week ago, 1:58 PM #41
ascii man
User avatar
TanteiSakana:Is anyone aware of a single person on the entire planet that actually takes advantage of the computer's ability to distinguish between the left and right shift/control/alt buttons for keyboard shortcuts?

I haven't found any art program which uses this distinction; and I think application software (1) in general should NOT use this distiction as well.

Anyway, I must point out that some non-application software use it, for special reasons. For example, VirtualBox specifically use right Ctrl as a key to escape from an emulation session (and use it as modifier for emulation session operations, like reset and shutdown); and if I remembered correctly, Microsoft Windows' input system also has an option to use L+R Shift as a hotkey combo to switch keyboard layout, together with other combo choices which make distinction between L/R modifiers as well.

^ From these examples; you would see that these L/R modifier distinctions are made, basically to avoid conflict with application software's hotkeys.

GMan003:I could see that being useful. Like Ctrl+P to say "select palette" and then press another key to save/load a color. Actually, you might not even need mod keys - unlike a text editor, you don't use a keyboard for anything except meta commands in an art program, so you could leave off the Ctrl and the Alt prefixes. Like Undo could just be Z, Copy could be just C, Paste could be just V, and so on, with extended sequences being like (P)alette (L)oad (1). That would make it easier to do one-handed, keep the other hand on the mouse or the drawing tablet where it's useful.

Be careful if you are going this route. While the no-modifier key scheme is somewhat common on fullscreen graphical application software from Unix-like world; it is alien to users familiar with Microsoft Windows, and it doesn't mix well with widgets.

(What happens when the user use text tool? Would typing there trigger unwanted edit operations? How "focus" is going to be managed? Which function/mode of the program where it would be acceptable for these hotkeys to be unavailable? And so on)

While I do see advantages about one-hand operation that @GMan003 pointed out on this scheme (2); I would also say that this approach requires a careful planning, including planning ahead for future additions. Else, your program would end up as a labyrinth of modes, which are poorly isolated from, and/or wildly inconsistent with each other.

TanteiSakana:Does anyone have a use case for keyboard shortcuts that are a sequence of keystrokes, like Emacs/Vi, in an art program? (As in, you could set a shortcut to be "alt+x v", which would only trigger the action if you pressed alt+x and then v.)

Believe it or not, most traditional desktop programs (including art programs) already even have these built-in.

Outside of text-mode realm, this hotkey-then-character approach is most commonly used for navigating window's menu bar with keyboard. So, if you decided to utilize this approach, to save users from nasty surprises, I would recommend you to:

- Limit the start combo for this kind of hotkeys to Alt+character
- Display a menu-like visual hint (3) when user is in the middle of the sequence to prevent confusion (and ensure discoverability of subcommands)
- In the visual hint, make sure that sequences which have further keys to press are distinguished properly (4)
- Make sure that pressing ESC at any point in the middle would cancel the entire hotkey sequence

- Consider using alphabet characters, especially when it coincides with name of the command/subcommand (avoid numbers or symbols, unless you know what you are doing)
- Avoiding other modifier keys in the mix, even when it was just Shift (Alt+I G is okay, but avoid Alt+I Shift+G, and definitely steer clear of Alt+I Ctrl+G)
- As a rule of thumb, subcommands should not be nested for more than 2 levels (Alt+I G F, is okay; Alt+I G F A, is likely too much) (5)

And, optionally: also display the menubar or main menu panel while Alt key is first held down.

Examples:

- In text-mode Links: use Alt+F, followed by U to enter an URL to download. (Menu only displays in the middle of hotkey sequence)
- In GIMP: use Alt+C, followed by D to desaturate the picture.
- In Pale Moon: use Alt+F, followed by K to toggle offline mode.
- In lots of programs: use Alt+F, followed by A to save current document as a different file.
- In lots of programs: use Alt+H, followed by A to show program's About dialog.

^ In these real world examples, pressing ESC will also cancel the hotkey sequence. (And each character used for accessing subcommand is visibly highlighted/underlined in the menu)

-----

(1) For the record; art programs are application software.
(2) It is nice (and hygienic) that I could fast-forward the timeshifted show playing in MPlayer, while using my other hand for snacks.
(3) It doesn't have to resemble a traditional window's top menubar; it can look like right-click context menus, or even full-screen OSD you found in older TV or VCR.
(4) Commonly represented by displaying right-pointing arrowhead at the right of that subcommand.
(5) The like of Linux SysRq safe-reset hotkey sequence is a prime example of what to avoid in applications that users use day to day. (The sequence is Alt+SysRq R E I S U B; which Alt+SysRq must be held down for the entire time)

^ Before someone argue that characters in this extreme example are, in fact, 6 separate commands; the most occasions that you are ever going use these, is as a part of this exact sequence.
One week ago, 2:12 PM #42
Botanist
User avatar
alt+character


i believe thats a win32 paradigm. even though most programs hide the menu bar these days, if you lacked a mouse you could activate it with a press of alt, then File Edit Tools appears and you press the underlined key to activate the menu you want, and then youll see more underlined letters.
i just tested alt function in paint3d and didnt get very far, the shortcuts appear but it seems very broken...
i think this is the biggest benefit of the ms office ribbon, alt+h reveals the key shortcuts for every button available in the home toolbar. not all of them are straight forward, but its a thing.
One week ago, 10:24 PM #43
User avatar
This site is a handy database of key shortcuts for all kinds of kit:

https://defkey.com/category/imaging

Many people map the right ALT key differently for typing in other languages:

https://en.wikipedia.org/wiki/AltGr_key
6 days ago, 12:42 AM #44
New Member
User avatar
Wow this is long sorry

Anyway, think I got the canvas transformation matrixes figured out :p

image

Details:

That takes care of a lot of my practical concerns of using OpenGL directly in my program. Next up, I'm likely going to try to get Dear ImGui working in this test program before I start trying to merge this stuff into my existing code.

And responses:

Robotwin.com:Not sure how you should code this, but when importing raster art into vector programs for lettering and cleanup, I do lots of boolean operations with rectangle objects to create gutters. In the end, I have one object, like a giant rectangular swiss cheese with the raster art peeking through the holes.

Yeah, the problem with panels is sort of similar to the problem with text—drawing them is fairly easy. Nondestructively editing them in a way that is intuitive and flexible is difficult.

In general, though, it seems that nondestructive boolean operations should be a priority for any vector tools designed for comic work, as they have a lot of use cases for both panels and word balloons.

xwindows:I haven't found any art program which uses this distinction; and I think application software (1) in general should NOT use this distiction as well. [...]



xwindows:Be careful if you are going this route. While the no-modifier key scheme is somewhat common on fullscreen graphical application software from Unix-like world; it is alien to users familiar with Microsoft Windows, and it doesn't mix well with widgets. [...]



xwindows:Believe it or not, most traditional desktop programs (including art programs) already even have these built-in.

Outside of text-mode realm, this hotkey-then-character approach is most commonly used for navigating window's menu bar with keyboard.



xwindows:(5) The like of Linux SysRq safe-reset hotkey sequence is a prime example of what to avoid in applications that users use day to day. (The sequence is Alt+SysRq R E I S U B; which Alt+SysRq must be held down for the entire time)

…yeah, kernel level overrides are pretty much the only excuse for those contortions, and even then I'd probably try to look for a way to bind that to something else. (Surely NumLuck+SysRq would be equally as hard to trigger by accident as Alt+SysRq while being less physically painful? :|)

Robotwin.com:This site is a handy database of key shortcuts for all kinds of kit:

https://defkey.com/category/imaging

Oh, that looks nice, will keep in mind.

Also, for the tech people here…
_______________________
Current project: 2 Guys 1 Laptop (pretty much just NSFW, arguably)
Other accounts: Patreon | itch.io | Twitter | DeviantART | YouTube
6 days ago, 4:04 PM #45
User avatar
face will remain visible and in the center of the window. I'm not sure if any other drawing programs do this, but it sounds useful :p

If I understand what you wrote, I think other programs do that and it IS very useful!

So, I made my code manually set that cell to -1 after my transforms, and now everything seems to work

When you do transformations do you have to calculate them in orthographic projection? Maybe that has something to do with perspective versus orthographic?

https://stackoverflow.com/questions/50671462/opengl-z-value-why-negative-value-in-front

And, as for how to handle turning control into ⌘ on macs… I'll cross that bridge when I come to it lol


I plugged my Mac keyboard into my Windows PC and checked the key codes with https://keycode.info/

The key codes are identical on both keyboards except the physical position is switched around a bit. Macs already have Ctrl so no need to mess with it. The Mac command (⌘) key codes are identical to the Windows key codes, OSLeft and OSRight. The Mac "option" keys are identical to the PC "alt" key codes, returning AltLeft and AltRight. Ctrl keys are labeled and coded the same on both. (P.S. BUT ControlRight is omitted on portable Macs and compact keyboards).

Anyone super into this project sticking with C?

I'm in favor of sticking to C (if it's milliseconds faster), but the open source community seems to favor C++. If you want code contributors to join the project you might have more volunteers for C++.

https://madnight.github.io/githut/#/pull_requests/2019/4

Any opinions on scripting languages and stuff?

If you support Python and/or Javascript, then you can maybe drop in the pre-existing wealth of scripts for Inkscape (Python) and Adobe Illustrator (Javascript), depending on how close your object data matches theirs.

https://gitlab.com/inkscape/extensions
"Alt+character menu, courtesy of IBM", 5 days ago, 6:55 AM #46
ascii man
User avatar
Side point:

killersteak:
alt+character


i believe thats a win32 paradigm

Not originated from Win32 really, the convention already permeated DOS programs from the beginning of 90s, and is already in wide use in the era of Win16.

As far as I know, this Alt+character menu shortcut was originally devised by IBM in their effort to standardize business applications on various platforms (including DOS, and OS/2); published circa 1987 in their Common User Access specification.

^ F1 for help also came from this, as well as ESC for form dismissal, Enter for form submission, Tab to go to next item (Shift+Tab to go back to previous item).

P.S. This is also the same spec which defined Shift+Del for cut, Ctrl+Ins for copy, and Shift+Ins for paste. While these three are no longer well-known as their modern counterparts (Ctrl+X, Ctrl+C, Ctrl+V as devised by Xerox PARC GUI team, popularized by Apple); they are still continue to be supported on modern Microsoft Windows and GUI toolkits on Unix-like platforms.
2 days ago, 12:39 AM #47
New Member
User avatar
Well, after much finagling, I have C++ compiling and linking with the C code of my OpenGL test the way I want.


Now I can actually start porting this over to my existing code, which will be… fun. Still have to decide exactly how to do that. This is basically the last step before I release a simple demo version my program, though :p

Also, I found some interesting things relevant to this thread.


Robotwin.com:When you do transformations do you have to calculate them in orthographic projection? Maybe that has something to do with perspective versus orthographic?

https://stackoverflow.com/questions/50671462/opengl-z-value-why-negative-value-in-front

To the best of my knowledge, I can transform things exactly the same way as one would in 3D, so long as I ignore the Z axis. And I'm not using a depth buffer or anything, so I think things are just drawn in whatever order I send them to the GPU.

Robotwin.com:I plugged my Mac keyboard into my Windows PC and checked the key codes with https://keycode.info/ [...]

Well, the thing is, for Macs, the key codes themselves aren't necessarily the problem—it's that Mac convention is to use ⌘ instead of control for keyboard shortcuts. (e.g. Ctrl+S becones ⌘-S.) So if ⌘ is reported as OSLeft/Right, I have to make my app respond to that instead of control. I believe most cross-platform GUI frameworks do this for you, but I'm, you know, not using one :p

It's possible Dear ImGui has some code to handle this, though, and I might handle keyboard shortcuts on the Dear ImGui side to take advantage of this. Although, since I don't actually have any way of compiling or running the program on a Mac, and there's so many other obstacles there (OpenGL deprecation, notarization…), I'm not sure how much I should really worry about this right now :p

Robotwin.com:I'm in favor of sticking to C (if it's milliseconds faster), but the open source community seems to favor C++. If you want code contributors to join the project you might have more volunteers for C++.

https://madnight.github.io/githut/#/pull_requests/2019/4

Well, maybe C projects get less pull requests because more of them are already perfect :p

Seriously, though… for me, the benefit of C isn't necessarily raw execution speed, but just that I have an easier time wrapping my head around it than C++. But I do think I want to use C++ where it makes sense (e.g. using C++ libraries), and I am trying to study it a little more.

Robotwin.com:If you support Python and/or Javascript, then you can maybe drop in the pre-existing wealth of scripts for Inkscape (Python) and Adobe Illustrator (Javascript), depending on how close your object data matches theirs.

https://gitlab.com/inkscape/extensions

_______________________
Current project: 2 Guys 1 Laptop (pretty much just NSFW, arguably)
Other accounts: Patreon | itch.io | Twitter | DeviantART | YouTube
2 days ago, 11:29 PM #48
User avatar
There's a couple of YT videos of AzPainter on Linux.

This drawing is 3300 x 6400 pixels and the strokes are instant with no lag, just as we'd expect based on performance of the old windows release.



But this one shows significant lag with the eraser tool starting around 2:44:
https://www.youtube.com/watch?v=65CkRDQUZcI

How massive an image did you wanna test?
Yesterday, 12:45 AM #49
New Member
User avatar
Personally, my main goal is to edit 6071x8598 comic pages smoothly, so that video actually gets pretty close.

For me, the best test would probably be scribbling around on two layers of a 6071x8598 image in the Az programs vs. other programs on the same system. And really messing with the zoom/rotate canvas functions during this. I use both many times in quick succession while drawing, and my hand gets quite uncomfortable if I don't, so those responding quickly is one of my biggest priorities in an art program.

I'm pretty sure the Az programs are completely software rendered, so if their performance can seriously compete against GPU accelerated graphics programs, that'd be pretty cool :p
_______________________
Current project: 2 Guys 1 Laptop (pretty much just NSFW, arguably)
Other accounts: Patreon | itch.io | Twitter | DeviantART | YouTube
Yesterday, 7:29 PM #50
User avatar
FireAlpaca can easily handle that. I tested a 6400 x 9500 pixel image with 2 layers, and it's pretty slick (fast rotate and zoom). The more complex brushes like airbrush and watercolor can lag a bit, though.
Forum > Webcomic & Art discussion > Ideal drawing program features
Pages: 1 2 3