Comment: Change 'shift+enter' to 'ctrl|cmd+enter' for quick submit.

ctrl+enter is generally used for this action, while shift+enter generally used to insert a <br>.
This commit is contained in:
infiinte-persistence 2020-10-06 13:50:36 +08:00 committed by Sean Yesmunt
parent c159f34b24
commit 329f6b3da6
3 changed files with 10 additions and 2 deletions

View file

@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Added ### Added
- Add Publish Preview dialog _community pr!_ ([#4620](https://github.com/lbryio/lbry-desktop/pull/4620)) - Add Publish Preview dialog _community pr!_ ([#4620](https://github.com/lbryio/lbry-desktop/pull/4620))
- "ctrl/cmd+enter" can now be used to directly submit a comment ([#4809](https://github.com/lbryio/lbry-desktop/pull/4809))
### Changed ### Changed

View file

@ -994,6 +994,7 @@
"%duration% seconds ago": "%duration% seconds ago", "%duration% seconds ago": "%duration% seconds ago",
"%duration% second ago": "%duration% second ago", "%duration% second ago": "%duration% second ago",
"%duration% ago": "%duration% ago", "%duration% ago": "%duration% ago",
"Just now": "Just now",
"Message received! Thanks for helping.": "Message received! Thanks for helping.", "Message received! Thanks for helping.": "Message received! Thanks for helping.",
"Report an issue or request a feature": "Report an issue or request a feature", "Report an issue or request a feature": "Report an issue or request a feature",
"Please describe the problem you experienced or the feature you want to see and any information you think might be useful to us. Links to screenshots are great!": "Please describe the problem you experienced or the feature you want to see and any information you think might be useful to us. Links to screenshots are great!", "Please describe the problem you experienced or the feature you want to see and any information you think might be useful to us. Links to screenshots are great!": "Please describe the problem you experienced or the feature you want to see and any information you think might be useful to us. Links to screenshots are great!",
@ -1056,7 +1057,7 @@
"minute": "minute", "minute": "minute",
"hours": "hours", "hours": "hours",
"hour": "hour", "hour": "hour",
"Lbry.tv uploads are limited to 1 GB. Download the app for unrestricted publishing.": "Lbry.tv uploads are limited to 1 GB. Download the app for unrestricted publishing.", "%SITE_NAME% uploads are limited to 1 GB. Download the app for unrestricted publishing.": "%SITE_NAME% uploads are limited to 1 GB. Download the app for unrestricted publishing.",
"Connected": "Connected", "Connected": "Connected",
"Not connected": "Not connected", "Not connected": "Not connected",
"this link": "this link", "this link": "this link",
@ -1314,6 +1315,11 @@
"Downvote": "Downvote", "Downvote": "Downvote",
"Hide %number% Replies": "Hide %number% Replies", "Hide %number% Replies": "Hide %number% Replies",
"Show %number% Replies": "Show %number% Replies", "Show %number% Replies": "Show %number% Replies",
"Unable to create comment, please try again later.": "Unable to create comment, please try again later.",
"Your channel is still being setup, try again in a few moments.": "Your channel is still being setup, try again in a few moments.",
"Unable to delete this comment, please try again later.": "Unable to delete this comment, please try again later.",
"Unable to edit this comment, please try again later.": "Unable to edit this comment, please try again later.",
"Channel cannot be anonymous, please select a channel and try again.": "Channel cannot be anonymous, please select a channel and try again.",
"Change to list layout": "Change to list layout", "Change to list layout": "Change to list layout",
"Change to tile layout": "Change to tile layout", "Change to tile layout": "Change to tile layout",
"Create a channel": "Create a channel", "Create a channel": "Create a channel",

View file

@ -63,7 +63,8 @@ export function CommentCreate(props: Props) {
} }
function altEnterListener(e: SyntheticKeyboardEvent<*>) { function altEnterListener(e: SyntheticKeyboardEvent<*>) {
if (e.shiftKey && e.keyCode === 13) { const KEYCODE_ENTER = 13;
if ((e.ctrlKey || e.metaKey) && e.keyCode === KEYCODE_ENTER) {
e.preventDefault(); e.preventDefault();
buttonref.current.click(); buttonref.current.click();
} }