Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
063c56be
Commit
063c56be
authored
Sep 24, 2011
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use accelerators from hot keys in place menu, from the Fabrizio's idea
parent
2d761f30
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
hotkeys_basic.cpp
common/hotkeys_basic.cpp
+8
-5
No files found.
common/hotkeys_basic.cpp
View file @
063c56be
...
@@ -179,17 +179,20 @@ wxString ReturnKeyNameFromKeyCode( int aKeycode, bool* aIsFound )
...
@@ -179,17 +179,20 @@ wxString ReturnKeyNameFromKeyCode( int aKeycode, bool* aIsFound )
* for instance zoom action is ran from the F1 key or the Zoom menu.
* for instance zoom action is ran from the F1 key or the Zoom menu.
* a zoom uses the mouse position from a hot key and not from the menu
* a zoom uses the mouse position from a hot key and not from the menu
* In this case, the accelerator if Shift+<hotkey>
* In this case, the accelerator if Shift+<hotkey>
* But for
some
keys, the Shift modifier is not usable, and the accelerator is Alt+<hotkey>
* But for
many
keys, the Shift modifier is not usable, and the accelerator is Alt+<hotkey>
*/
*/
static
void
AddModifierToKey
(
wxString
&
aFullKey
,
const
wxString
&
aKey
)
static
void
AddModifierToKey
(
wxString
&
aFullKey
,
const
wxString
&
aKey
)
{
{
#if
1
// set to 0 for new behavior, 1 for old
#if
0
// set to 0 for new behavior, 1 for old
aFullKey << wxT( " <" ) << aKey << wxT( ">" );
aFullKey << wxT( " <" ) << aKey << wxT( ">" );
#else
#else
if
(
aKey
.
IsSameAs
(
wxT
(
"/"
)
)
)
if
(
(
aKey
.
Length
()
==
1
)
&&
(
aKey
[
0
]
>=
'A'
)
&&
(
aKey
[
0
]
<=
'Z'
))
aFullKey
<<
wxT
(
"
\t
"
)
<<
MODIFIER_ALT
<<
aKey
;
// We can use Shift+<key> as accelerator ans <key> for hot key
else
aFullKey
<<
wxT
(
"
\t
"
)
<<
MODIFIER_SHIFT
<<
aKey
;
aFullKey
<<
wxT
(
"
\t
"
)
<<
MODIFIER_SHIFT
<<
aKey
;
else
// We must use Alt+<key> as accelerator ans <key> for hot key
aFullKey
<<
wxT
(
"
\t
"
)
<<
MODIFIER_ALT
<<
aKey
;
#endif
#endif
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment