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
Expand all
Hide 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
This diff is collapsed.
Click to expand it.
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