File 0103-Consistently-use-for-key-combinations-in-source-code.patch of Package erlang
From ea381d01429b08e4426ef10d168788112d9193d4 Mon Sep 17 00:00:00 2001
From: Richard Carlsson <carlsson.richard@gmail.com>
Date: Thu, 13 Jun 2024 15:46:54 +0200
Subject: [PATCH 2/2] Consistently use `+` for key combinations in source code
and UI
Ensure that the UI is consistent (help messages, menus, etc.) and that
it's easy to grep in the code. Note that the documentation has a
different style and uses `-` to describe key combinations.
---
erts/emulator/beam/break.c | 2 +-
erts/emulator/beam/erl_init.c | 4 +-
erts/emulator/sys/unix/erl_child_setup.c | 2 +-
erts/emulator/sys/unix/sys.c | 12 +++---
erts/emulator/sys/win32/sys_interrupt.c | 2 +-
lib/debugger/test/dbg_ui_SUITE.erl | 8 ++--
.../valid_keymap.config | 8 ++--
lib/observer/src/observer_port_wx.erl | 4 +-
lib/observer/src/observer_pro_wx.erl | 2 +-
lib/observer/src/observer_procinfo.erl | 2 +-
lib/observer/src/observer_sock_wx.erl | 4 +-
lib/observer/src/observer_sys_wx.erl | 2 +-
lib/observer/src/observer_trace_wx.erl | 4 +-
lib/observer/src/observer_tv_table.erl | 8 ++--
lib/observer/src/observer_tv_wx.erl | 4 +-
lib/reltool/test/reltool_manual_gui_SUITE.erl | 2 +-
lib/ssh/src/ssh_connect.hrl | 4 +-
lib/ssl/test/dtls_api_SUITE.erl | 2 +-
lib/stdlib/doc/stdlib_app.md | 2 +-
lib/stdlib/src/edlin_key.erl | 8 ++--
lib/stdlib/src/erl_scan.erl | 2 +-
lib/stdlib/src/shell.erl | 2 +-
lib/wx/examples/simple/menu.erl | 42 +++++++++----------
lib/wx/src/gen/wxKeyEvent.erl | 8 ++--
lib/wx/src/gen/wxMenuBar.erl | 2 +-
lib/wx/src/gen/wxNavigationKeyEvent.erl | 2 +-
26 files changed, 72 insertions(+), 72 deletions(-)
diff --git a/erts/emulator/beam/break.c b/erts/emulator/beam/break.c
index 3e72576bda..35f757b036 100644
--- a/erts/emulator/beam/break.c
+++ b/erts/emulator/beam/break.c
@@ -608,7 +608,7 @@ do_break(void)
case '*': /*
* The asterisk is an read error on windows,
* where sys_get_key isn't that great in console mode.
- * The usual reason for a read error is Ctrl-C. Treat this as
+ * The usual reason for a read error is Ctrl+C. Treat this as
* 'a' to avoid infinite loop.
*/
erts_exit(0, "");
diff --git a/erts/emulator/beam/erl_init.c b/erts/emulator/beam/erl_init.c
index 45c10d1e23..90a2bd7c45 100644
--- a/erts/emulator/beam/erl_init.c
+++ b/erts/emulator/beam/erl_init.c
@@ -553,8 +553,8 @@ void erts_usage(void)
ERTS_MAX_NO_OF_ASYNC_THREADS);
erts_fprintf(stderr, "\n");
- erts_fprintf(stderr, "-B[c|d|i] set break (Ctrl-C) behavior; valid letters are:\n");
- erts_fprintf(stderr, " 'c' to have Ctrl-C interrupt the Erlang shell;\n");
+ erts_fprintf(stderr, "-B[c|d|i] set break (Ctrl+C) behavior; valid letters are:\n");
+ erts_fprintf(stderr, " 'c' to have Ctrl+C interrupt the Erlang shell;\n");
erts_fprintf(stderr, " 'd' (or no extra option) to disable the break handler;\n");
erts_fprintf(stderr, " 'i' to ignore break signals\n");
erts_fprintf(stderr, "\n");
diff --git a/erts/emulator/sys/unix/erl_child_setup.c b/erts/emulator/sys/unix/erl_child_setup.c
index 72a7f77b2e..a0f816a939 100644
--- a/erts/emulator/sys/unix/erl_child_setup.c
+++ b/erts/emulator/sys/unix/erl_child_setup.c
@@ -434,7 +434,7 @@ static int system_properties_fd(void)
#endif /* __ANDROID__ */
/*
- If beam is terminated using kill -9 or Ctrl-C when +B is set it may not
+ If beam is terminated using kill -9 or Ctrl+C when +B is set it may not
cleanup the terminal properly. So to clean it up we save the initial state in
erl_child_setup and then reset the terminal if we detect that beam terminated.
diff --git a/erts/emulator/sys/unix/sys.c b/erts/emulator/sys/unix/sys.c
index 19608ef5c9..9f83357fad 100644
--- a/erts/emulator/sys/unix/sys.c
+++ b/erts/emulator/sys/unix/sys.c
@@ -759,12 +759,12 @@ void erts_set_ignore_break(void) {
* typing certain key combinations at the
* controlling terminal...
*/
- sys_signal(SIGINT, SIG_IGN); /* Ctrl-C */
- sys_signal(SIGQUIT, SIG_IGN); /* Ctrl-\ */
- sys_signal(SIGTSTP, SIG_IGN); /* Ctrl-Z */
+ sys_signal(SIGINT, SIG_IGN); /* Ctrl+C */
+ sys_signal(SIGQUIT, SIG_IGN); /* Ctrl+\ */
+ sys_signal(SIGTSTP, SIG_IGN); /* Ctrl+Z */
}
-/* Don't use Ctrl-C for break handler but let it be
+/* Don't use Ctrl+C for break handler but let it be
used by the shell instead (see user_drv.erl) */
void erts_replace_intr(void) {
struct termios mode;
@@ -772,11 +772,11 @@ void erts_replace_intr(void) {
if (isatty(0)) {
tcgetattr(0, &mode);
- /* here's an example of how to replace Ctrl-C with Ctrl-U */
+ /* here's an example of how to replace Ctrl+C with Ctrl+U */
/* mode.c_cc[VKILL] = 0;
mode.c_cc[VINTR] = CKILL; */
- mode.c_cc[VINTR] = 0; /* disable Ctrl-C */
+ mode.c_cc[VINTR] = 0; /* disable Ctrl+C */
tcsetattr(0, TCSANOW, &mode);
replace_intr = 1;
}
diff --git a/erts/emulator/sys/win32/sys_interrupt.c b/erts/emulator/sys/win32/sys_interrupt.c
index fbbd7a1b76..c039da63c5 100644
--- a/erts/emulator/sys/win32/sys_interrupt.c
+++ b/erts/emulator/sys/win32/sys_interrupt.c
@@ -111,7 +111,7 @@ BOOL WINAPI ctrl_handler_replace_intr(DWORD dwCtrlType)
}
-/* Don't use Ctrl-C for break handler but let it be
+/* Don't use Ctrl+C for break handler but let it be
used by the shell instead (see user_drv.erl) */
void erts_replace_intr(void) {
HANDLE hIn = GetStdHandle(STD_INPUT_HANDLE);
diff --git a/lib/debugger/test/dbg_ui_SUITE.erl b/lib/debugger/test/dbg_ui_SUITE.erl
index 0b519e6a32..b4bee285f2 100644
--- a/lib/debugger/test/dbg_ui_SUITE.erl
+++ b/lib/debugger/test/dbg_ui_SUITE.erl
@@ -192,10 +192,10 @@ Interpret one module").
"Start the debugger and interpret the modules [test, lists1, ordsets1]. Close the Interpret dialog. Set Attach on First Call and Attach on Break.").
?MAN_CASE(all_step3, "Click Step through all evaluation",
- "In the shell, call test:test1(). Use the Step button, the Process->Step menu item and the Ctrl-S shortcut to step through the *entire* execution of the call. (Approx 36 steps). Then close the Attach window. The result printed in the shell should be: {\"peter\",[1,2,4,a,b,c],\"olin\"}").
+ "In the shell, call test:test1(). Use the Step button, the Process->Step menu item and the Ctrl+S shortcut to step through the *entire* execution of the call. (Approx 36 steps). Then close the Attach window. The result printed in the shell should be: {\"peter\",[1,2,4,a,b,c],\"olin\"}").
?MAN_CASE(all_next3,"Click Next through all evaluation",
- "Again call test:test1() in the shell. This time Use the Next button, the Process->Next menu and the Ctrl-N shortcut to quickly step over the execution of the four lines in the test1-function. The result printed in the shell should be: {\"peter\",[1,2,4,a,b,c],\"olin\"}").
+ "Again call test:test1() in the shell. This time Use the Next button, the Process->Next menu and the Ctrl+N shortcut to quickly step over the execution of the four lines in the test1-function. The result printed in the shell should be: {\"peter\",[1,2,4,a,b,c],\"olin\"}").
?MAN_CASE(save3, "Save the debugger state",
"Use File->Save Settings to save the debugger state with the name 'three.state'").
@@ -256,7 +256,7 @@ Interpret one module").
?MAN_CASE(all_step6, "Click Step through all evaluation",
- "In the bar shell, call test:test1().This should open an attach window. Use the Step button, the Process->Step menu item and the Ctrl-S shortcut to step through the *entire* execution of the call. (Approx 36 steps). Then close the Attach window. The result printed in the bar shell should be: {\"peter\",[1,2,4,a,b,c],\"olin\"}").
+ "In the bar shell, call test:test1().This should open an attach window. Use the Step button, the Process->Step menu item and the Ctrl+S shortcut to step through the *entire* execution of the call. (Approx 36 steps). Then close the Attach window. The result printed in the bar shell should be: {\"peter\",[1,2,4,a,b,c],\"olin\"}").
?MAN_CASE(all_next6,"Click Next through all evaluation",
- "Again, in the bar shell, call test:test1(). This time Use the Next button, the Process->Next menu and the Ctrl-N shortcut to quickly step over the execution of the four lines in the test1-function. The result printed in the shell should be: {\"peter\",[1,2,4,a,b,c],\"olin\"}").
+ "Again, in the bar shell, call test:test1(). This time Use the Next button, the Process->Next menu and the Ctrl+N shortcut to quickly step over the execution of the four lines in the test1-function. The result printed in the shell should be: {\"peter\",[1,2,4,a,b,c],\"olin\"}").
diff --git a/lib/kernel/test/interactive_shell_SUITE_data/valid_keymap.config b/lib/kernel/test/interactive_shell_SUITE_data/valid_keymap.config
index 62e4cf38b7..357f6f5dab 100644
--- a/lib/kernel/test/interactive_shell_SUITE_data/valid_keymap.config
+++ b/lib/kernel/test/interactive_shell_SUITE_data/valid_keymap.config
@@ -6,14 +6,14 @@
%% Enter
"\n" => new_line_finish,
"\r" => new_line_finish,
-%%% Alt-Enter or Esc + Enter
+%%% Alt+Enter or Esc + Enter
"\^[\n" => new_line,
"\^[\r" => new_line,
%% Tab ^I
"\t" => tab_expand,
-%% Ctrl-alpha keys 0-31
+%% Ctrl+alpha keys 0-31
"\^A" => beginning_of_line,
"\^B" => history_up,
%"\^C" => sig_term_menu, %% cannot be changed, yet
@@ -53,7 +53,7 @@
"\^[[15~" => clear,
"\^[[15;5~" => clear,
-%% Alt-alpha_key or Esc + alpha_key, can distinguish case
+%% Alt+alpha_key or Esc + alpha_key, can distinguish case
%"\^[A
"\^[B" => backward_word,
"\^[b" => backward_word,
@@ -154,4 +154,4 @@ default => search_quit},
tab_expand => #{
"\t" => tab_expand_full,
-default => tab_expand_quit}}}]}].
\ No newline at end of file
+default => tab_expand_quit}}}]}].
diff --git a/lib/observer/src/observer_port_wx.erl b/lib/observer/src/observer_port_wx.erl
index d39687fbac..18028f1c92 100644
--- a/lib/observer/src/observer_port_wx.erl
+++ b/lib/observer/src/observer_port_wx.erl
@@ -374,9 +374,9 @@ create_menus(Parent) ->
MenuEntries =
[{"View",
[#create_menu{id = ?ID_PORT_INFO_SELECTED,
- text = "Port info for selected ports\tCtrl-I"},
+ text = "Port info for selected ports\tCtrl+I"},
separator,
- #create_menu{id = ?ID_REFRESH, text = "Refresh\tCtrl-R"},
+ #create_menu{id = ?ID_REFRESH, text = "Refresh\tCtrl+R"},
#create_menu{id = ?ID_REFRESH_INTERVAL, text = "Refresh Interval..."}
]},
{"Trace",
diff --git a/lib/observer/src/observer_pro_wx.erl b/lib/observer/src/observer_pro_wx.erl
index 23c082e025..72ff278ba7 100644
--- a/lib/observer/src/observer_pro_wx.erl
+++ b/lib/observer/src/observer_pro_wx.erl
@@ -133,7 +133,7 @@ create_pro_menu(Parent, Holder) ->
type=check,
check=call(Holder, {get_accum, self()})},
separator,
- #create_menu{id=?ID_REFRESH, text="Refresh\tCtrl-R"},
+ #create_menu{id=?ID_REFRESH, text="Refresh\tCtrl+R"},
#create_menu{id=?ID_REFRESH_INTERVAL, text="Refresh Interval"}]},
{"Trace",
[#create_menu{id=?ID_TRACE_PIDS, text="Trace processes"},
diff --git a/lib/observer/src/observer_procinfo.erl b/lib/observer/src/observer_procinfo.erl
index a558546f52..89cd8b1b26 100644
--- a/lib/observer/src/observer_procinfo.erl
+++ b/lib/observer/src/observer_procinfo.erl
@@ -365,7 +365,7 @@ init_log_page(Parent, Pid, Table) ->
create_menus(MenuBar) ->
Menus = [{"File", [#create_menu{id=?wxID_CLOSE, text="Close"}]},
- {"View", [#create_menu{id=?REFRESH, text="Refresh\tCtrl-R"}]}],
+ {"View", [#create_menu{id=?REFRESH, text="Refresh\tCtrl+R"}]}],
observer_lib:create_menus(Menus, MenuBar, new_window).
process_info_fields(Pid, WSz) ->
diff --git a/lib/observer/src/observer_sock_wx.erl b/lib/observer/src/observer_sock_wx.erl
index 90591acac2..031c1dd9f2 100644
--- a/lib/observer/src/observer_sock_wx.erl
+++ b/lib/observer/src/observer_sock_wx.erl
@@ -418,9 +418,9 @@ create_menus(Parent) ->
MenuEntries =
[{"View",
[#create_menu{id = ?ID_SOCKET_INFO_SELECTED,
- text = "Socket info for selected sockets\tCtrl-I"},
+ text = "Socket info for selected sockets\tCtrl+I"},
separator,
- #create_menu{id = ?ID_REFRESH, text = "Refresh\tCtrl-R"},
+ #create_menu{id = ?ID_REFRESH, text = "Refresh\tCtrl+R"},
#create_menu{id = ?ID_REFRESH_INTERVAL, text = "Refresh Interval..."}
]}%% ,
%% {"Debug",
diff --git a/lib/observer/src/observer_sys_wx.erl b/lib/observer/src/observer_sys_wx.erl
index e6ec02f606..25152178b8 100644
--- a/lib/observer/src/observer_sys_wx.erl
+++ b/lib/observer/src/observer_sys_wx.erl
@@ -86,7 +86,7 @@ init([Notebook, Parent, Config]) ->
create_sys_menu(Parent) ->
- View = {"View", [#create_menu{id = ?ID_REFRESH, text = "Refresh\tCtrl-R"},
+ View = {"View", [#create_menu{id = ?ID_REFRESH, text = "Refresh\tCtrl+R"},
#create_menu{id = ?ID_REFRESH_INTERVAL, text = "Refresh interval"}]},
observer_wx:create_menus(Parent, [View]).
diff --git a/lib/observer/src/observer_trace_wx.erl b/lib/observer/src/observer_trace_wx.erl
index 2b727d0a26..376f170a89 100644
--- a/lib/observer/src/observer_trace_wx.erl
+++ b/lib/observer/src/observer_trace_wx.erl
@@ -992,8 +992,8 @@ create_logwindow(Parent, true) ->
LogWin = wxFrame:new(Parent, ?LOG_WIN, "Trace Log", [{size, {750*Scale, 800*Scale}}]),
MB = wxMenuBar:new(),
File = wxMenu:new(),
- wxMenu:append(File, ?LOG_CLEAR, "Clear Log\tCtrl-C"),
- wxMenu:append(File, ?LOG_SAVE, "Save Log\tCtrl-S"),
+ wxMenu:append(File, ?LOG_CLEAR, "Clear Log\tCtrl+C"),
+ wxMenu:append(File, ?LOG_SAVE, "Save Log\tCtrl+S"),
wxMenu:append(File, ?wxID_CLOSE, "Close"),
wxMenuBar:append(MB, File, "File"),
wxFrame:setMenuBar(LogWin, MB),
diff --git a/lib/observer/src/observer_tv_table.erl b/lib/observer/src/observer_tv_table.erl
index 669ee82e3f..1831e5c10f 100644
--- a/lib/observer/src/observer_tv_table.erl
+++ b/lib/observer/src/observer_tv_table.erl
@@ -177,16 +177,16 @@ add_columns(Grid, Start, ColumnNames) ->
create_menus(MB) ->
File = wxMenu:new(),
- wxMenu:append(File, ?ID_TABLE_INFO, "Table Information\tCtrl-I"),
+ wxMenu:append(File, ?ID_TABLE_INFO, "Table Information\tCtrl+I"),
wxMenu:append(File, ?wxID_CLOSE, "Close"),
wxMenuBar:append(MB, File, "File"),
Edit = wxMenu:new(),
wxMenu:append(Edit, ?ID_EDIT, "Edit Object"),
- wxMenu:append(Edit, ?ID_DELETE, "Delete Object\tCtrl-D"),
+ wxMenu:append(Edit, ?ID_DELETE, "Delete Object\tCtrl+D"),
wxMenu:appendSeparator(Edit),
- wxMenu:append(Edit, ?ID_SEARCH, "Search\tCtrl-S"),
+ wxMenu:append(Edit, ?ID_SEARCH, "Search\tCtrl+S"),
wxMenu:appendSeparator(Edit),
- wxMenu:append(Edit, ?ID_REFRESH, "Refresh\tCtrl-R"),
+ wxMenu:append(Edit, ?ID_REFRESH, "Refresh\tCtrl+R"),
wxMenu:append(Edit, ?ID_REFRESH_INTERVAL, "Refresh interval..."),
wxMenuBar:append(MB, Edit, "Edit"),
Help = wxMenu:new(),
diff --git a/lib/observer/src/observer_tv_wx.erl b/lib/observer/src/observer_tv_wx.erl
index 9f9636797c..5649a8986d 100644
--- a/lib/observer/src/observer_tv_wx.erl
+++ b/lib/observer/src/observer_tv_wx.erl
@@ -291,7 +291,7 @@ code_change(_, _, State) ->
create_menus(Parent, #opts{sys_hidden=Sys, unread_hidden=UnR, type=Type}) ->
MenuEntries = [{"View",
- [#create_menu{id = ?ID_TABLE_INFO, text = "Table information\tCtrl-I"},
+ [#create_menu{id = ?ID_TABLE_INFO, text = "Table information\tCtrl+I"},
separator,
#create_menu{id = ?ID_ETS, text = "&Ets Tables",
type=radio, check=Type==ets},
@@ -303,7 +303,7 @@ create_menus(Parent, #opts{sys_hidden=Sys, unread_hidden=UnR, type=Type}) ->
#create_menu{id = ?ID_SYSTEM_TABLES, text = "View &System Tables",
type=check, check=not Sys},
separator,
- #create_menu{id = ?ID_REFRESH, text = "Refresh\tCtrl-R"},
+ #create_menu{id = ?ID_REFRESH, text = "Refresh\tCtrl+R"},
#create_menu{id = ?ID_REFRESH_INTERVAL, text = "Refresh Interval..."}
]}],
observer_wx:create_menus(Parent, MenuEntries).
diff --git a/lib/reltool/test/reltool_manual_gui_SUITE.erl b/lib/reltool/test/reltool_manual_gui_SUITE.erl
index 659c51f23b..4e4fc742f5 100644
--- a/lib/reltool/test/reltool_manual_gui_SUITE.erl
+++ b/lib/reltool/test/reltool_manual_gui_SUITE.erl
@@ -172,7 +172,7 @@ config(Config) ->
{ok,ServerPid} = reltool:get_server(SysPid),
unlink(SysPid),
break("the system window is still alive",
- "terminate reltool by hitting 'Ctrl-Q' (linux) or clicking the "
+ "terminate reltool by hitting 'Ctrl+Q' (linux) or clicking the "
"close box on the top fram when system window is active"),
false = erlang:is_process_alive(SysPid),
false = erlang:is_process_alive(ServerPid),
diff --git a/lib/ssh/src/ssh_connect.hrl b/lib/ssh/src/ssh_connect.hrl
index 7b985451f8..e9e924d128 100644
--- a/lib/ssh/src/ssh_connect.hrl
+++ b/lib/ssh/src/ssh_connect.hrl
@@ -180,8 +180,8 @@
-define(VEOL,6). %% End-of-line character in addition to carriage return
%% or,and). linefeed.
-define(VEOL2,7). %% Additional end-of-line character.
--define(VSTART,8). %% Continues paused output (normally Ctrl-Q).
--define(VSTOP,9). %% Pauses output (normally Ctrl-S).
+-define(VSTART,8). %% Continues paused output (normally Ctrl+Q).
+-define(VSTOP,9). %% Pauses output (normally Ctrl+S).
-define(VSUSP,10). %% Suspends the current program.
-define(VDSUSP,11). %% Another suspend character.
-define(VREPRINT,12). %% Reprints the current input line.
diff --git a/lib/ssl/test/dtls_api_SUITE.erl b/lib/ssl/test/dtls_api_SUITE.erl
index 5f05eb5f56..7616a8b8f3 100644
--- a/lib/ssl/test/dtls_api_SUITE.erl
+++ b/lib/ssl/test/dtls_api_SUITE.erl
@@ -478,7 +478,7 @@ flush() ->
client_restarts_multiple_acceptors(Config) ->
%% Can also be tested with openssl by connecting a client and hit
- %% Ctrl-C to kill openssl process, so that the connection is not
+ %% Ctrl+C to kill openssl process, so that the connection is not
%% closed.
%% Then do a new openssl connect with the same client port.
diff --git a/lib/stdlib/doc/stdlib_app.md b/lib/stdlib/doc/stdlib_app.md
index 257159c93a..01184b36cb 100644
--- a/lib/stdlib/doc/stdlib_app.md
+++ b/lib/stdlib/doc/stdlib_app.md
@@ -55,7 +55,7 @@ For more information about configuration parameters, see the
- **`format_shell_func = {Mod, Func} | string() | default`{: #format_shell_func
}** - Can be used to set the formatting of the Erlang shell output. This has
an effect on commands that have been submitted and how it is saved in history
- or if the formatting hotkey is pressed while editing an expression (Alt-F by
+ or if the formatting hotkey is pressed while editing an expression (Alt+F by
default). You can specify a Mod:Func/1 that expects the whole expression as a
string and returns a formatted expressions as a string. See
`shell:format_shell_func/1` for how to set it from inside the shell.
diff --git a/lib/stdlib/src/edlin_key.erl b/lib/stdlib/src/edlin_key.erl
index d14c443be4..fb3827fed8 100644
--- a/lib/stdlib/src/edlin_key.erl
+++ b/lib/stdlib/src/edlin_key.erl
@@ -197,13 +197,13 @@ normal_map() ->
%% Enter
"\n" => new_line_finish,
"\r" => new_line_finish,
- %%% Alt-Enter or Esc + Enter
+ %%% Alt+Enter or Esc + Enter
"\^[\n" => new_line,
"\^[\r" => new_line,
%% Tab ^I
"\t" => tab_expand,
- %% Ctrl-alpha_key, can not distinguish case
+ %% Ctrl+alpha_key, can not distinguish case
"\^A" => beginning_of_line,
"\^B" => backward_char,
%%"\^C" => sig_term_menu, currently handled by user_drv.erl
@@ -229,7 +229,7 @@ normal_map() ->
%%"\^Z" => sig_stop, currently not handled by edlin.erl
"\^]" => auto_blink, % Ctrl+5 seems to do the same thing,
- %%# Alt-alpha_key or Esc + alpha_key, can distinguish case,
+ %%# Alt+alpha_key or Esc + alpha_key, can distinguish case,
"\^[B" => backward_word,
"\^[b" => backward_word,
"\^[c" => clear_line,
@@ -355,7 +355,7 @@ valid_functions() ->
%% ^V
%% ^@, ^\, ^], ^^, ^_ %% not straightforward how to type these
%%
-%% Alt-Shift-char, Alt-char or Esc + Shift-char, Esc + char
+%% Alt+Shift+char, Alt+char or Esc + Shift+char, Esc + char
%% ^[A, a
%% ^[C
%% ^[E, e
diff --git a/lib/stdlib/src/erl_scan.erl b/lib/stdlib/src/erl_scan.erl
index 9215e2df01..313d89ee11 100644
--- a/lib/stdlib/src/erl_scan.erl
+++ b/lib/stdlib/src/erl_scan.erl
@@ -1718,7 +1718,7 @@ scan_escape([$x,H1], _Col) when ?HEX(H1) ->
more;
scan_escape([$x|Cs], Col) ->
{error,Cs,{illegal,character},incr_column(Col, 1)};
-%% \^X -> Ctrl-X
+%% \^X -> Ctrl+X
scan_escape([$^=C0,C|Cs], Col) when ?CHAR(C) ->
case caret_char_code(C) of
error ->
diff --git a/lib/stdlib/src/shell.erl b/lib/stdlib/src/shell.erl
index da605d522c..1ef20ca155 100644
--- a/lib/stdlib/src/shell.erl
+++ b/lib/stdlib/src/shell.erl
@@ -1981,7 +1981,7 @@ multiline_prompt_func(PromptFunc) ->
Can be used to set the formatting of the Erlang shell output.
This has an effect on commands that have been submitted, and how it is saved in history.
-Or if the formatting hotkey is pressed while editing an expression (Alt-R by default). You
+Or if the formatting hotkey is pressed while editing an expression (Alt+R by default). You
can specify a `Mod:Func/1` that expects the whole expression as a string and
returns a formatted expressions as a string. See
[`stdlib app config`](stdlib_app.md#format_shell_func) for how to set it before
diff --git a/lib/wx/examples/simple/menu.erl b/lib/wx/examples/simple/menu.erl
index 558810ae28..ee4b92a00a 100644
--- a/lib/wx/examples/simple/menu.erl
+++ b/lib/wx/examples/simple/menu.erl
@@ -161,14 +161,14 @@ create_file_menu() ->
])),
ClearLogItem = wxMenuItem:new([
{id, ?menuID_FILE_CLEAR_LOG},
- {text, "Clear &log\tCtrl-L"} %% note mnemonic and accelerator
+ {text, "Clear &log\tCtrl+L"} %% note mnemonic and accelerator
]),
wxMenu:append(FileMenu, ClearLogItem ),
wxMenu:appendSeparator(FileMenu),
wxMenu:append(FileMenu, wxMenuItem:new([
{id, ?menuID_FILE_QUIT} %,
- %{text, "E&xit\tAlt-X"}
+ %{text, "E&xit\tAlt+X"}
])),
FileMenu.
@@ -179,47 +179,47 @@ create_menubar_menu() ->
MenuBarMenu = wxMenu:new(),
wxMenu:append(MenuBarMenu, wxMenuItem:new([
{id, ?menuID_MENUBAR_APPEND},
- {text, "&Append menu\tCtrl-A"},
+ {text, "&Append menu\tCtrl+A"},
{help, "Append a menu to the menubar"}
])),
wxMenu:append(MenuBarMenu, wxMenuItem:new([
{id, ?menuID_MENUBAR_INSERT},
- {text, "&Insert menu\tCtrl-I"},
+ {text, "&Insert menu\tCtrl+I"},
{help, "Insert a menu into the menubar"}
])),
wxMenu:append(MenuBarMenu, wxMenuItem:new([
{id, ?menuID_MENUBAR_DELETE},
- {text, "&Delete menu\tCtrl-D"},
+ {text, "&Delete menu\tCtrl+D"},
{help, "Insert a menu into the menubar"}
])),
wxMenu:append(MenuBarMenu, wxMenuItem:new([
{id, ?menuID_MENUBAR_TOGGLE},
- {text, "&Toggle menu\tCtrl-T"},
+ {text, "&Toggle menu\tCtrl+T"},
{help, "Toggle the first menu in the menubar"},
{kind, ?wxITEM_CHECK}
])),
wxMenu:appendSeparator(MenuBarMenu), %% --------------------------
wxMenu:append(MenuBarMenu, wxMenuItem:new([
{id, ?menuID_MENUBAR_ENABLE},
- {text, "&Enable menu\tCtrl-E"},
+ {text, "&Enable menu\tCtrl+E"},
{help, "Enable or disable the last menu"},
{kind, ?wxITEM_CHECK}
])),
wxMenu:appendSeparator(MenuBarMenu), %% --------------------------
wxMenu:append(MenuBarMenu, wxMenuItem:new([
{id, ?menuID_MENUBAR_GET_LABEL},
- {text, "&Get menu label\tCtrl-G"},
+ {text, "&Get menu label\tCtrl+G"},
{help, "Get the label of the last menu"}
])),
wxMenu:append(MenuBarMenu, wxMenuItem:new([
{id, ?menuID_MENUBAR_SET_LABEL},
- {text, "&Set menu label\tCtrl-S"},
+ {text, "&Set menu label\tCtrl+S"},
{help, "Change the label of the last menu"}
])),
wxMenu:appendSeparator(MenuBarMenu), %% --------------------------
wxMenu:append(MenuBarMenu, wxMenuItem:new([
{id, ?menuID_MENUBAR_FIND_MENU},
- {text, "&Find menu from label\tCtrl-F"},
+ {text, "&Find menu from label\tCtrl+F"},
{help, "Find a menu by searching for its label"}
])),
MenuBarMenu.
@@ -232,46 +232,46 @@ create_menu_menu() ->
MenuMenu = wxMenu:new(),
wxMenu:append(MenuMenu, wxMenuItem:new([
{id, ?menuID_MENU_APPEND},
- {text, "&Append menu item\tAlt-A"},
+ {text, "&Append menu item\tAlt+A"},
{help, "Append a menu item to the last menu"}
])),
wxMenu:append(MenuMenu, wxMenuItem:new([
{id, ?menuID_MENU_APPEND_SUB},
- {text, "&Append sub menu\tAlt-S"},
+ {text, "&Append sub menu\tAlt+S"},
{help, "Append a sub menu to the last menu"}
])),
wxMenu:append(MenuMenu, wxMenuItem:new([
{id, ?menuID_MENU_INSERT},
- {text, "&Insert menu item\tAlt-I"},
+ {text, "&Insert menu item\tAlt+I"},
{help, "Insert a menu item in head of the last menu"}
])),
wxMenu:append(MenuMenu, wxMenuItem:new([
{id, ?menuID_MENU_DELETE},
- {text, "&Delete menu item\tAlt-D"},
+ {text, "&Delete menu item\tAlt+D"},
{help, "Delete the last menu item from the last menu"}
])),
wxMenu:appendSeparator(MenuMenu), %% --------------------------
wxMenu:append(MenuMenu, wxMenuItem:new([
{id, ?menuID_MENU_ENABLE},
- {text, "&Enable menu item\tAlt-E"},
+ {text, "&Enable menu item\tAlt+E"},
{help, "Enable or disable the last menu item"},
{kind, ?wxITEM_CHECK}
])),
wxMenu:append(MenuMenu, wxMenuItem:new([
{id, ?menuID_MENU_CHECK},
- {text, "&Check menu item\tAlt-C"},
+ {text, "&Check menu item\tAlt+C"},
{help, "Check or uncheck the last menu item"},
{kind, ?wxITEM_CHECK}
])),
wxMenu:appendSeparator(MenuMenu), %% --------------------------
wxMenu:append(MenuMenu, wxMenuItem:new([
{id, ?menuID_MENU_GET_INFO},
- {text, "Get menu item in&fo\tAlt-F"},
+ {text, "Get menu item in&fo\tAlt+F"},
{help, "Show the state of the last menu item"}
])),
wxMenu:append(MenuMenu, wxMenuItem:new([
{id, ?menuID_MENU_SET_LABEL},
- {text, "&Set menu label\tCtrl-S"},
+ {text, "&Set menu label\tCtrl+S"},
{help, "Change the label of the last menu"}
])),
wxMenu:appendSeparator(MenuMenu), %% --------------------------
@@ -378,9 +378,9 @@ create_stock_menu() ->
create_dummy_menu() ->
DummyMenu = wxMenu:new(),
- wxMenu:append(DummyMenu, ?menuID_DUMMY_FIRST, "&First item\tCtrl-F1"),
+ wxMenu:append(DummyMenu, ?menuID_DUMMY_FIRST, "&First item\tCtrl+F1"),
wxMenu:appendSeparator(DummyMenu), %% --------------------------
- wxMenu:append(DummyMenu, ?menuID_DUMMY_SECOND, "&Second item\tCtrl-F2"),
+ wxMenu:append(DummyMenu, ?menuID_DUMMY_SECOND, "&Second item\tCtrl+F2"),
DummyMenu.
loop(State) ->
@@ -508,7 +508,7 @@ onMenuAction(#wx{id=?menuID_MENU_APPEND, obj=Frame}, #state{} = State) ->
wxMenu:appendSeparator(Menu),
wxMenu:append(Menu, wxMenuItem:new([
{id, ?menuID_DUMMY_THIRD},
- {text, "&Third dummy item\tCtrl-F3"},
+ {text, "&Third dummy item\tCtrl+F3"},
{kind, ?wxITEM_CHECK}
])),
diff --git a/lib/wx/src/gen/wxKeyEvent.erl b/lib/wx/src/gen/wxKeyEvent.erl
index 958ed7758f..ce437d36bb 100644
--- a/lib/wx/src/gen/wxKeyEvent.erl
+++ b/lib/wx/src/gen/wxKeyEvent.erl
@@ -74,10 +74,10 @@ users to type key events that might be i
Another difference between key and char events is that another kind of translation is
done for the latter ones when the Control key is pressed: char events for ASCII letters in
-this case carry codes corresponding to the ASCII value of Ctrl-Latter, i.e. 1 for Ctrl-A,
-2 for Ctrl-B and so on until 26 for Ctrl-Z. This is convenient for terminal-like
+this case carry codes corresponding to the ASCII value of Ctrl+Latter, i.e. 1 for Ctrl+A,
+2 for Ctrl+B and so on until 26 for Ctrl+Z. This is convenient for terminal-like
applications and can be completely ignored by all the other ones (if you need to handle
-Ctrl-A it is probably a better idea to use the key event rather than the char one). Notice
+Ctrl+A it is probably a better idea to use the key event rather than the char one). Notice
that currently no translation is done for the presses of [, `\`, ], `^` and `_` keys which
might be mapped to ASCII values from 27 to 31. Since version 2.9.2, the enum values `WXK_CONTROL_A`
- `WXK_CONTROL_Z` can be used instead of the non-descriptive constant values 1-26.
@@ -111,7 +111,7 @@ Note: If a key is maintained in a presse
is released so it is wrong to assume that there is one up event corresponding to each down one.
Note: For Windows programmers: The key and char events in wxWidgets are similar to but
-slightly different from Windows `WM_KEYDOWN` and `WM_CHAR` events. In particular, Alt-x
+slightly different from Windows `WM_KEYDOWN` and `WM_CHAR` events. In particular, Alt+x
combination will generate a char event in wxWidgets (unless it is used as an accelerator)
and almost all keys, including ones without ASCII equivalents, generate char events too.
diff --git a/lib/wx/src/gen/wxMenuBar.erl b/lib/wx/src/gen/wxMenuBar.erl
index e90552268a..3969e00140 100644
--- a/lib/wx/src/gen/wxMenuBar.erl
+++ b/lib/wx/src/gen/wxMenuBar.erl
@@ -30,7 +30,7 @@ frame that contains the menu bar.
If you have a toolbar which uses the same identifiers as your EVT_MENU entries, events
from the toolbar will also be processed by your EVT_MENU event handlers.
-Tip: under Windows, if you discover that menu shortcuts (for example, Alt-F to show the
+Tip: under Windows, if you discover that menu shortcuts (for example, Alt+F to show the
file menu) are not working, check any EVT_CHAR events you are handling in child windows.
If you are not calling event.Skip() for events that you don't process in these event
handlers, menu shortcuts may cease to work.
diff --git a/lib/wx/src/gen/wxNavigationKeyEvent.erl b/lib/wx/src/gen/wxNavigationKeyEvent.erl
index 6f6295e509..d621f1bb26 100644
--- a/lib/wx/src/gen/wxNavigationKeyEvent.erl
+++ b/lib/wx/src/gen/wxNavigationKeyEvent.erl
@@ -81,7 +81,7 @@ setDirection(#wx_ref{type=ThisT}=This,Direction)
-doc """
Returns true if the navigation event represents a window change (for example, from
-Ctrl-Page Down in a notebook).
+Ctrl+Page Down in a notebook).
""".
-spec isWindowChange(This) -> boolean() when
This::wxNavigationKeyEvent().
--
2.43.0