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
c4bc7bb4
Commit
c4bc7bb4
authored
Jan 20, 2010
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enhancements about hot keys
parent
5861a43d
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
167 additions
and
162 deletions
+167
-162
drawpanel.cpp
common/drawpanel.cpp
+7
-0
hotkeys_basic.cpp
common/hotkeys_basic.cpp
+160
-125
hotkeys.cpp
eeschema/hotkeys.cpp
+0
-9
menubar.cpp
eeschema/menubar.cpp
+0
-8
onrightclick.cpp
eeschema/onrightclick.cpp
+0
-9
hotkeys.cpp
gerbview/hotkeys.cpp
+0
-3
hotkeys.cpp
pcbnew/hotkeys.cpp
+0
-8
No files found.
common/drawpanel.cpp
View file @
c4bc7bb4
...
@@ -1344,6 +1344,13 @@ void WinEDA_DrawPanel::OnKeyEvent( wxKeyEvent& event )
...
@@ -1344,6 +1344,13 @@ void WinEDA_DrawPanel::OnKeyEvent( wxKeyEvent& event )
if
(
event
.
ShiftDown
()
&&
(
key
>
256
)
)
if
(
event
.
ShiftDown
()
&&
(
key
>
256
)
)
localkey
|=
GR_KB_SHIFT
;
localkey
|=
GR_KB_SHIFT
;
/* Normalize keys code to easily handle keys from Ctrl+A to Ctrl+Z
* They have an ascii code from 1 to 27 remapped
* GR_KB_CTRL + 'A' to GR_KB_CTRL + 'Z'
*/
if
(
(
localkey
&
(
GR_KB_CTRL
|
GR_KB_ALT
|
GR_KB_SHIFT
))
==
GR_KB_CTRL
)
localkey
+=
'A'
-
1
;
INSTALL_DC
(
DC
,
this
);
INSTALL_DC
(
DC
,
this
);
BASE_SCREEN
*
Screen
=
GetScreen
();
BASE_SCREEN
*
Screen
=
GetScreen
();
...
...
common/hotkeys_basic.cpp
View file @
c4bc7bb4
...
@@ -61,7 +61,6 @@ struct hotkey_name_descr
...
@@ -61,7 +61,6 @@ struct hotkey_name_descr
int
m_KeyCode
;
int
m_KeyCode
;
};
};
static
struct
hotkey_name_descr
s_Hotkey_Name_List
[]
=
static
struct
hotkey_name_descr
s_Hotkey_Name_List
[]
=
{
{
{
wxT
(
"F1"
),
WXK_F1
},
{
wxT
(
"F1"
),
WXK_F1
},
...
@@ -78,15 +77,15 @@ static struct hotkey_name_descr s_Hotkey_Name_List[] =
...
@@ -78,15 +77,15 @@ static struct hotkey_name_descr s_Hotkey_Name_List[] =
{
wxT
(
"F12"
),
WXK_F12
},
{
wxT
(
"F12"
),
WXK_F12
},
{
wxT
(
"Esc"
),
WXK_ESCAPE
},
{
wxT
(
"Esc"
),
WXK_ESCAPE
},
{
wxT
(
"Del
ete"
),
WXK_DELETE
},
{
wxT
(
"Del
"
),
WXK_DELETE
},
{
wxT
(
"Tab"
),
'\t'
},
{
wxT
(
"Tab"
),
'\t'
},
{
wxT
(
"B
ackspace"
),
WXK_BACK
},
{
wxT
(
"B
kSp"
),
WXK_BACK
},
{
wxT
(
"Ins
ert"
),
WXK_INSERT
},
{
wxT
(
"Ins
"
),
WXK_INSERT
},
{
wxT
(
"Home"
),
WXK_HOME
},
{
wxT
(
"Home"
),
WXK_HOME
},
{
wxT
(
"End"
),
WXK_END
},
{
wxT
(
"End"
),
WXK_END
},
{
wxT
(
"P
age Up"
),
WXK_PAGEUP
},
{
wxT
(
"P
gUp"
),
WXK_PAGEUP
},
{
wxT
(
"P
age Down"
),
WXK_PAGEDOWN
},
{
wxT
(
"P
gDn"
),
WXK_PAGEDOWN
},
{
wxT
(
"+"
),
'+'
},
{
wxT
(
"+"
),
'+'
},
{
wxT
(
"-"
),
'-'
},
{
wxT
(
"-"
),
'-'
},
...
@@ -131,34 +130,68 @@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L'
},
{
wxT
(
"Shift+Ctrl+M"
),
GR_KB_SHIFT
+
GR_KB_CTRL
+
'M'
},
{
wxT
(
"Shift+Ctrl+N"
),
GR_KB_SHIFT
+
GR_KB_CTRL
+
'N'
},
{
wxT
(
"Shift+Ctrl+O"
),
GR_KB_SHIFT
+
GR_KB_CTRL
+
'O'
},
{
wxT
(
"Shift+Ctrl+P"
),
GR_KB_SHIFT
+
GR_KB_CTRL
+
'P'
},
{
wxT
(
"Shift+Ctrl+Q"
),
GR_KB_SHIFT
+
GR_KB_CTRL
+
'Q'
},
{
wxT
(
"Shift+Ctrl+R"
),
GR_KB_SHIFT
+
GR_KB_CTRL
+
'R'
},
{
wxT
(
"Shift+Ctrl+S"
),
GR_KB_SHIFT
+
GR_KB_CTRL
+
'S'
},
{
wxT
(
"Shift+Ctrl+T"
),
GR_KB_SHIFT
+
GR_KB_CTRL
+
'T'
},
{
wxT
(
"Shift+Ctrl+U"
),
GR_KB_SHIFT
+
GR_KB_CTRL
+
'U'
},
{
wxT
(
"Shift+Ctrl+V"
),
GR_KB_SHIFT
+
GR_KB_CTRL
+
'V'
},
{
wxT
(
"Shift+Ctrl+W"
),
GR_KB_SHIFT
+
GR_KB_CTRL
+
'W'
},
{
wxT
(
"Shift+Ctrl+X"
),
GR_KB_SHIFT
+
GR_KB_CTRL
+
'X'
},
{
wxT
(
"Shift+Ctrl+Y"
),
GR_KB_SHIFT
+
GR_KB_CTRL
+
'Y'
},
{
wxT
(
"Shift+Ctrl+Z"
),
GR_KB_SHIFT
+
GR_KB_CTRL
+
'Z'
},
// Do not change this line: end of list
{
wxT
(
""
),
0
}
};
};
...
@@ -175,11 +208,11 @@ wxString ReturnKeyNameFromKeyCode( int keycode )
...
@@ -175,11 +208,11 @@ wxString ReturnKeyNameFromKeyCode( int keycode )
int
ii
;
int
ii
;
if
(
(
keycode
&
GR_KB_CTRL
)
!=
0
)
if
(
(
keycode
&
GR_KB_CTRL
)
!=
0
)
modifier
<<
wxT
(
"Ctrl
"
);
modifier
<<
wxT
(
"Ctrl
+
"
);
if
(
(
keycode
&
GR_KB_ALT
)
!=
0
)
if
(
(
keycode
&
GR_KB_ALT
)
!=
0
)
modifier
<<
wxT
(
"Alt
"
);
modifier
<<
wxT
(
"Alt
+
"
);
if
(
(
keycode
&
GR_KB_SHIFT
)
!=
0
)
if
(
(
keycode
&
GR_KB_SHIFT
)
!=
0
)
modifier
<<
wxT
(
"Shift
"
);
modifier
<<
wxT
(
"Shift
+
"
);
keycode
&=
~
(
GR_KB_CTRL
|
GR_KB_ALT
|
GR_KB_SHIFT
);
keycode
&=
~
(
GR_KB_CTRL
|
GR_KB_ALT
|
GR_KB_SHIFT
);
for
(
ii
=
0
;
;
ii
++
)
for
(
ii
=
0
;
;
ii
++
)
...
@@ -214,7 +247,7 @@ wxString AddHotkeyName( const wxString& text, Ki_HotkeyInfo** List,
...
@@ -214,7 +247,7 @@ wxString AddHotkeyName( const wxString& text, Ki_HotkeyInfo** List,
wxString
keyname
=
ReturnKeyNameFromCommandId
(
List
,
CommandId
);
wxString
keyname
=
ReturnKeyNameFromCommandId
(
List
,
CommandId
);
if
(
!
keyname
.
IsEmpty
()
)
if
(
!
keyname
.
IsEmpty
()
)
msg
<<
wxT
(
"
("
)
<<
keyname
<<
wxT
(
")"
)
;
msg
<<
wxT
(
"
\t
"
)
<<
keyname
;
return
msg
;
return
msg
;
}
}
...
@@ -240,7 +273,7 @@ wxString AddHotkeyName( const wxString& text,
...
@@ -240,7 +273,7 @@ wxString AddHotkeyName( const wxString& text,
keyname
=
ReturnKeyNameFromCommandId
(
List
,
CommandId
);
keyname
=
ReturnKeyNameFromCommandId
(
List
,
CommandId
);
if
(
!
keyname
.
IsEmpty
()
)
if
(
!
keyname
.
IsEmpty
()
)
{
{
msg
<<
wxT
(
"
("
)
<<
keyname
<<
wxT
(
")"
)
;
msg
<<
wxT
(
"
\t
"
)
<<
keyname
;
break
;
break
;
}
}
}
}
...
@@ -304,7 +337,7 @@ static int ReturnKeyCodeFromKeyName( const wxString& keyname )
...
@@ -304,7 +337,7 @@ static int ReturnKeyCodeFromKeyName( const wxString& keyname )
* Displays the current hotkey list
* Displays the current hotkey list
* @param frame = current active frame
* @param frame = current active frame
* @param List = pointer to a Ki_HotkeyInfoSectionDescriptor list
* @param List = pointer to a Ki_HotkeyInfoSectionDescriptor list
*
(Null terminated)
*(Null terminated)
* @return none
* @return none
*/
*/
void
DisplayHotkeyList
(
WinEDA_DrawFrame
*
frame
,
void
DisplayHotkeyList
(
WinEDA_DrawFrame
*
frame
,
...
@@ -595,6 +628,7 @@ wxString ReturnHotkeyConfigFilePath( int choice )
...
@@ -595,6 +628,7 @@ wxString ReturnHotkeyConfigFilePath( int choice )
wxFileName
::
GetPathSeparator
();
wxFileName
::
GetPathSeparator
();
case
1
:
case
1
:
/* TODO: This is broken under a normal Poxis system. Users
/* TODO: This is broken under a normal Poxis system. Users
* generally do no have write permissions to this path
* generally do no have write permissions to this path
* and there is no provision for prompting for the root
* and there is no provision for prompting for the root
...
@@ -634,7 +668,8 @@ void AddHotkeyConfigMenu( wxMenu* aMenu )
...
@@ -634,7 +668,8 @@ void AddHotkeyConfigMenu( wxMenu* aMenu )
/* (Re)create hotkey file */
/* (Re)create hotkey file */
item
=
new
wxMenuItem
(
HotkeySubmenu
,
ID_PREFERENCES_HOTKEY_CREATE_CONFIG
,
item
=
new
wxMenuItem
(
HotkeySubmenu
,
ID_PREFERENCES_HOTKEY_CREATE_CONFIG
,
_
(
"(Re)create Hotkeys File"
),
_
(
"(Re)create Hotkeys File"
),
_
(
"Create or recreate the hotkey configuration file from current hotkey list"
)
_
(
"Create or recreate the hotkey configuration file from current hotkey list"
)
);
);
item
->
SetBitmap
(
save_setup_xpm
);
item
->
SetBitmap
(
save_setup_xpm
);
HotkeySubmenu
->
Append
(
item
);
HotkeySubmenu
->
Append
(
item
);
...
@@ -656,7 +691,7 @@ void AddHotkeyConfigMenu( wxMenu* aMenu )
...
@@ -656,7 +691,7 @@ void AddHotkeyConfigMenu( wxMenu* aMenu )
/* Append HotkeySubmenu to menu */
/* Append HotkeySubmenu to menu */
ADD_MENUITEM_WITH_HELP_AND_SUBMENU
(
aMenu
,
HotkeySubmenu
,
ADD_MENUITEM_WITH_HELP_AND_SUBMENU
(
aMenu
,
HotkeySubmenu
,
ID_PREFERENCES_HOTKEY_SUBMENU
,
_
(
"Hotkeys"
),
ID_PREFERENCES_HOTKEY_SUBMENU
,
_
(
"Hotkeys"
),
_
(
"Hotkeys configuration and preferences"
),
hotkeys_xpm
);
_
(
"Hotkeys configuration and preferences"
),
hotkeys_xpm
);
/* Hotkey path */
/* Hotkey path */
wxMenu
*
HotkeyLocationSubmenu
=
new
wxMenu
();
wxMenu
*
HotkeyLocationSubmenu
=
new
wxMenu
();
...
...
eeschema/hotkeys.cpp
View file @
c4bc7bb4
...
@@ -233,10 +233,6 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
...
@@ -233,10 +233,6 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
wxPoint
MousePos
=
GetScreen
()
->
m_MousePosition
;
wxPoint
MousePos
=
GetScreen
()
->
m_MousePosition
;
// Remap the control key Ctrl A (0x01) to GR_KB_CTRL + 'A' (easier to
// handle...)
if
(
(
hotkey
&
GR_KB_CTRL
)
!=
0
)
hotkey
+=
'A'
-
1
;
/* Convert lower to upper case (the usual toupper function has problem
/* Convert lower to upper case (the usual toupper function has problem
* with non ascii codes like function keys */
* with non ascii codes like function keys */
if
(
(
hotkey
>=
'a'
)
&&
(
hotkey
<=
'z'
)
)
if
(
(
hotkey
>=
'a'
)
&&
(
hotkey
<=
'z'
)
)
...
@@ -640,11 +636,6 @@ void WinEDA_LibeditFrame::OnHotKey( wxDC* DC, int hotkey,
...
@@ -640,11 +636,6 @@ void WinEDA_LibeditFrame::OnHotKey( wxDC* DC, int hotkey,
if
(
hotkey
==
0
)
if
(
hotkey
==
0
)
return
;
return
;
// Remap the control key Ctrl A (0x01) to GR_KB_CTRL + 'A' (easier to
// handle...)
if
(
(
hotkey
&
GR_KB_CTRL
)
!=
0
)
hotkey
+=
'A'
-
1
;
/* Convert lower to upper case (the usual toupper function has problem
/* Convert lower to upper case (the usual toupper function has problem
* with non ascii codes like function keys */
* with non ascii codes like function keys */
if
(
(
hotkey
>=
'a'
)
&&
(
hotkey
<=
'z'
)
)
if
(
(
hotkey
>=
'a'
)
&&
(
hotkey
<=
'z'
)
)
...
...
eeschema/menubar.cpp
View file @
c4bc7bb4
...
@@ -151,11 +151,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
...
@@ -151,11 +151,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
wxMenu
*
editMenu
=
new
wxMenu
;
wxMenu
*
editMenu
=
new
wxMenu
;
/* Undo */
/* Undo */
#if !defined( __WXMAC__)
text
=
AddHotkeyName
(
_
(
"Undo"
),
s_Schematic_Hokeys_Descr
,
HK_UNDO
);
text
=
AddHotkeyName
(
_
(
"Undo"
),
s_Schematic_Hokeys_Descr
,
HK_UNDO
);
#else
text
=
_
(
"Undo
\t
Ctrl+Z"
);
#endif
item
=
new
wxMenuItem
(
editMenu
,
wxID_UNDO
,
text
,
item
=
new
wxMenuItem
(
editMenu
,
wxID_UNDO
,
text
,
_
(
"Undo last edition"
),
wxITEM_NORMAL
);
_
(
"Undo last edition"
),
wxITEM_NORMAL
);
...
@@ -163,11 +159,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
...
@@ -163,11 +159,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
editMenu
->
Append
(
item
);
editMenu
->
Append
(
item
);
/* Redo */
/* Redo */
#if !defined( __WXMAC__)
text
=
AddHotkeyName
(
_
(
"Redo"
),
s_Schematic_Hokeys_Descr
,
HK_REDO
);
text
=
AddHotkeyName
(
_
(
"Redo"
),
s_Schematic_Hokeys_Descr
,
HK_REDO
);
#else
text
=
_
(
"Redo
\t
Shift+Ctrl+Z"
);
#endif
item
=
new
wxMenuItem
(
editMenu
,
wxID_REDO
,
text
,
item
=
new
wxMenuItem
(
editMenu
,
wxID_REDO
,
text
,
_
(
"Redo the last undo command"
),
wxITEM_NORMAL
);
_
(
"Redo the last undo command"
),
wxITEM_NORMAL
);
...
...
eeschema/onrightclick.cpp
View file @
c4bc7bb4
...
@@ -60,16 +60,10 @@ bool WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos,
...
@@ -60,16 +60,10 @@ bool WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos,
return
true
;
return
true
;
}
}
if
(
DrawStruct
)
cout
<<
"Drawstruct Type before: "
<<
DrawStruct
->
Type
()
<<
endl
;
// Try to locate items at cursor position.
// Try to locate items at cursor position.
if
(
(
DrawStruct
==
NULL
)
||
(
DrawStruct
->
m_Flags
==
0
)
)
if
(
(
DrawStruct
==
NULL
)
||
(
DrawStruct
->
m_Flags
==
0
)
)
{
{
DrawStruct
=
SchematicGeneralLocateAndDisplay
(
false
);
DrawStruct
=
SchematicGeneralLocateAndDisplay
(
false
);
if
(
DrawStruct
)
cout
<<
"Drawstruct Type locate : "
<<
DrawStruct
->
Type
()
<<
endl
;
if
(
DrawStruct
&&
(
DrawStruct
->
Type
()
==
DRAW_SHEET_STRUCT_TYPE
)
)
if
(
DrawStruct
&&
(
DrawStruct
->
Type
()
==
DRAW_SHEET_STRUCT_TYPE
)
)
{
{
...
@@ -81,9 +75,6 @@ bool WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos,
...
@@ -81,9 +75,6 @@ bool WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos,
}
}
}
}
if
(
DrawStruct
)
cout
<<
"Drawstruct Type : "
<<
DrawStruct
->
Type
()
<<
endl
;
// If Command in progress: add "cancel" and "end tool" menu
// If Command in progress: add "cancel" and "end tool" menu
if
(
m_ID_current_state
)
if
(
m_ID_current_state
)
{
{
...
...
gerbview/hotkeys.cpp
View file @
c4bc7bb4
...
@@ -84,9 +84,6 @@ void WinEDA_GerberFrame::OnHotKey( wxDC* DC, int hotkey,
...
@@ -84,9 +84,6 @@ void WinEDA_GerberFrame::OnHotKey( wxDC* DC, int hotkey,
wxCommandEvent
cmd
(
wxEVT_COMMAND_MENU_SELECTED
);
wxCommandEvent
cmd
(
wxEVT_COMMAND_MENU_SELECTED
);
cmd
.
SetEventObject
(
this
);
cmd
.
SetEventObject
(
this
);
// Remap the control key Ctrl A (0x01) to GR_KB_CTRL + 'A' (easier to handle...)
if
(
(
hotkey
&
GR_KB_CTRL
)
!=
0
)
hotkey
+=
'A'
-
1
;
/* Convert lower to upper case (the usual toupper function has problem with non ascii codes like function keys */
/* Convert lower to upper case (the usual toupper function has problem with non ascii codes like function keys */
if
(
(
hotkey
>=
'a'
)
&&
(
hotkey
<=
'z'
)
)
if
(
(
hotkey
>=
'a'
)
&&
(
hotkey
<=
'z'
)
)
hotkey
+=
'A'
-
'a'
;
hotkey
+=
'A'
-
'a'
;
...
...
pcbnew/hotkeys.cpp
View file @
c4bc7bb4
...
@@ -218,10 +218,6 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct
...
@@ -218,10 +218,6 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct
MODULE
*
module
=
NULL
;
MODULE
*
module
=
NULL
;
// Remap the control key Ctrl A (0x01) to GR_KB_CTRL + 'A' (just easier to handle...)
if
(
(
hotkey
&
GR_KB_CTRL
)
!=
0
)
hotkey
+=
'A'
-
1
;
/* Convert lower to upper case
/* Convert lower to upper case
* (the usual toupper function has problem with non ascii codes like function keys
* (the usual toupper function has problem with non ascii codes like function keys
*/
*/
...
@@ -676,10 +672,6 @@ void WinEDA_ModuleEditFrame::OnHotKey( wxDC* DC, int hotkey,
...
@@ -676,10 +672,6 @@ void WinEDA_ModuleEditFrame::OnHotKey( wxDC* DC, int hotkey,
wxCommandEvent
cmd
(
wxEVT_COMMAND_MENU_SELECTED
);
wxCommandEvent
cmd
(
wxEVT_COMMAND_MENU_SELECTED
);
cmd
.
SetEventObject
(
this
);
cmd
.
SetEventObject
(
this
);
// Remap the control key Ctrl A (0x01) to GR_KB_CTRL + 'A' (just easier to handle...)
if
(
(
hotkey
&
GR_KB_CTRL
)
!=
0
)
hotkey
+=
'A'
-
1
;
/* Convert lower to upper case (the usual toupper function has problem with non ascii codes like function keys */
/* Convert lower to upper case (the usual toupper function has problem with non ascii codes like function keys */
if
(
(
hotkey
>=
'a'
)
&&
(
hotkey
<=
'z'
)
)
if
(
(
hotkey
>=
'a'
)
&&
(
hotkey
<=
'z'
)
)
hotkey
+=
'A'
-
'a'
;
hotkey
+=
'A'
-
'a'
;
...
...
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