I'm just making a simple painting app for practice using canvas and I can't decide whether or not I want right click to do anything.
For example, in Microsoft Paint you can have two colors and use left click to draw with the primary color and right click to draw with the secondary color.
I googled for online painting apps and I see most opt to only allow left click drawing and have some context menu show up on right click allowing you to save the image and whatnot.
Here are the pros and cons I can think of for having left and right click drawing:
Pros:
- Don't have to switch to eraser tool for simple erasing (can just use right click)
- Don't have to go to the color palette as often to change colors
- Can potentially utilize it for filling rectangles and ellipses with the secondary color
- Might not have to include an eraser tool
- Increases efficiency by providing an accessible hotkey for additional functionality in the app
- There's no reason a user would likely ever need to right click on the canvas for
Cons:
- Some browsers might not abide with the javascript that prevents right click
- It would be difficult for tablets and mobile phones to use the right click functionality
- Most likely primary color and secondary color boxes would have to be added to the UI (as opposed to just highlighting the currently selected color with the mono-color approach)
- More complicated logic and harder to get right in the code and as a result it is likely there will be more bugs
- Potentially not as intuitive/simple as a mono-color approach to the user
- Alters native browser functionality that is unexpected to the user
If I chose not to use right click drawing, what should be done with it? Have it cancel the current brush stroke/shape? Don't do anything with it? Some other painting functionality context menu options the user could choose?