Commit 4feef88f authored by CHARRAS's avatar CHARRAS

modify Hotkey.cpp code for eeschema

parent 8a8377ff
...@@ -4,6 +4,11 @@ Started 2007-June-11 ...@@ -4,6 +4,11 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. email address.
2007-aug-11 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+ eeschema
modify hotkeys.cpp code.
2007-aug-10 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> 2007-aug-10 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================ ================================================================================
+ eeschema + eeschema
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
enum hotkey_id_commnand { enum hotkey_id_commnand {
HK_NOT_FOUND = 0, HK_NOT_FOUND = 0,
HK_RESET_LOCAL_COORD,
HK_HELP, HK_HELP,
HK_ZOOM_IN, HK_ZOOM_IN,
HK_ZOOM_OUT, HK_ZOOM_OUT,
...@@ -68,6 +69,7 @@ static Ki_HotkeyInfo HkMoveComponent(wxT("Move Component"), HK_MOVE_COMPONENT, ' ...@@ -68,6 +69,7 @@ static Ki_HotkeyInfo HkMoveComponent(wxT("Move Component"), HK_MOVE_COMPONENT, '
static Ki_HotkeyInfo HkMove2Drag(wxT("Switch move block to drag block"), HK_MOVEBLOCK_TO_DRAGBLOCK, '\t'); static Ki_HotkeyInfo HkMove2Drag(wxT("Switch move block to drag block"), HK_MOVEBLOCK_TO_DRAGBLOCK, '\t');
static Ki_HotkeyInfo HkInsert(wxT("Repeat Last Item"), HK_REPEAT_LAST, WXK_INSERT); static Ki_HotkeyInfo HkInsert(wxT("Repeat Last Item"), HK_REPEAT_LAST, WXK_INSERT);
static Ki_HotkeyInfo HkDelete(wxT("Delete Item"), HK_DELETE, WXK_DELETE); static Ki_HotkeyInfo HkDelete(wxT("Delete Item"), HK_DELETE, WXK_DELETE);
static Ki_HotkeyInfo HkResetLocalCoord(wxT("Reset local coord."), HK_RESET_LOCAL_COORD, ' ');
static Ki_HotkeyInfo HkNextSearch(wxT("Next Search"), HK_NEXT_SEARCH, WXK_F5); static Ki_HotkeyInfo HkNextSearch(wxT("Next Search"), HK_NEXT_SEARCH, WXK_F5);
static Ki_HotkeyInfo HkZoomCenter(wxT("Zoom Center"), HK_ZOOM_CENTER, WXK_F4); static Ki_HotkeyInfo HkZoomCenter(wxT("Zoom Center"), HK_ZOOM_CENTER, WXK_F4);
static Ki_HotkeyInfo HkZoomRedraw(wxT("Zoom Redraw"), HK_ZOOM_REDRAW, WXK_F3); static Ki_HotkeyInfo HkZoomRedraw(wxT("Zoom Redraw"), HK_ZOOM_REDRAW, WXK_F3);
...@@ -79,7 +81,8 @@ static Ki_HotkeyInfo HkHelp(wxT("Help: this message"), HK_HELP, '?'); ...@@ -79,7 +81,8 @@ static Ki_HotkeyInfo HkHelp(wxT("Help: this message"), HK_HELP, '?');
static Ki_HotkeyInfo *s_Schematic_Hotkey_List[] = { static Ki_HotkeyInfo *s_Schematic_Hotkey_List[] = {
&HkHelp, &HkHelp,
&HkZoomIn, &HkZoomOut, &HkZoomRedraw, &HkZoomCenter, &HkZoomIn, &HkZoomOut, &HkZoomRedraw, &HkZoomCenter,
&HkNextSearch, &HkDelete, &HkInsert, &HkMove2Drag, &HkNextSearch, &HkResetLocalCoord,
&HkDelete, &HkInsert, &HkMove2Drag,
&HkMoveComponent, &HkAddComponent, &HkMoveComponent, &HkAddComponent,
&HkRotateComponent, &HkMirrorXComponent, &HkMirrorYComponent, & HkOrientNormalComponent, &HkRotateComponent, &HkMirrorXComponent, &HkMirrorYComponent, & HkOrientNormalComponent,
&HkBeginWire, &HkBeginWire,
...@@ -95,6 +98,7 @@ static Ki_HotkeyInfo *s_LibEdit_Hotkey_List[] = ...@@ -95,6 +98,7 @@ static Ki_HotkeyInfo *s_LibEdit_Hotkey_List[] =
{ {
&HkHelp, &HkHelp,
&HkZoomIn, &HkZoomOut, &HkZoomRedraw, &HkZoomCenter, &HkZoomIn, &HkZoomOut, &HkZoomRedraw, &HkZoomCenter,
&HkResetLocalCoord,
&HkInsertPin, &HkInsertPin,
NULL NULL
}; };
...@@ -138,6 +142,10 @@ wxString keyname, modifier, fullkeyname; ...@@ -138,6 +142,10 @@ wxString keyname, modifier, fullkeyname;
keyname.Printf(wxT("F%d"), keycode - WXK_F1 + 1); keyname.Printf(wxT("F%d"), keycode - WXK_F1 + 1);
break; break;
case ' ':
keyname = wxT("space");
break;
case '\t': case '\t':
keyname = wxT("Tab"); keyname = wxT("Tab");
break; break;
...@@ -174,7 +182,7 @@ wxString keyname; ...@@ -174,7 +182,7 @@ wxString keyname;
if ( hk_decr->m_InfoMsg.IsEmpty() ) break; if ( hk_decr->m_InfoMsg.IsEmpty() ) break;
msg += _("key "); msg += _("key ");
keyname = ReturnKeyNameFromKeyCode(hk_decr->m_KeyCode); keyname = ReturnKeyNameFromKeyCode(hk_decr->m_KeyCode);
msg += keyname + wxT(": ") + hk_decr->m_InfoMsg + wxT("\n"); msg += keyname + wxT(": ") + hk_decr->m_InfoMsg + wxT("\n");
} }
DisplayInfo(frame, msg); DisplayInfo(frame, msg);
} }
...@@ -234,6 +242,7 @@ wxPoint MousePos = m_CurrentScreen->m_MousePosition; ...@@ -234,6 +242,7 @@ wxPoint MousePos = m_CurrentScreen->m_MousePosition;
case HK_ZOOM_OUT: case HK_ZOOM_OUT:
case HK_ZOOM_REDRAW: case HK_ZOOM_REDRAW:
case HK_ZOOM_CENTER: case HK_ZOOM_CENTER:
case HK_RESET_LOCAL_COORD:
break; break;
case HK_MOVEBLOCK_TO_DRAGBLOCK: // Switch to drag mode, when block moving case HK_MOVEBLOCK_TO_DRAGBLOCK: // Switch to drag mode, when block moving
...@@ -419,6 +428,7 @@ wxPoint MousePos = m_CurrentScreen->m_MousePosition; ...@@ -419,6 +428,7 @@ wxPoint MousePos = m_CurrentScreen->m_MousePosition;
case HK_ZOOM_OUT: case HK_ZOOM_OUT:
case HK_ZOOM_REDRAW: case HK_ZOOM_REDRAW:
case HK_ZOOM_CENTER: case HK_ZOOM_CENTER:
case HK_RESET_LOCAL_COORD:
break; break;
case HK_REPEAT_LAST: case HK_REPEAT_LAST:
......
...@@ -18,14 +18,10 @@ ...@@ -18,14 +18,10 @@
/* Etat des touches speciales du clavier */ /* Etat des touches speciales du clavier */
#define GR_KB_RIGHTSHIFT 0x0100 /* Keybd states: right shift key depressed */ #define GR_KB_RIGHTSHIFT 0x10000000 /* Keybd states: right shift key depressed */
#define GR_KB_LEFTSHIFT 0x0200 /* left shift key depressed */ #define GR_KB_LEFTSHIFT 0x20000000 /* left shift key depressed */
#define GR_KB_CTRL 0x0400 /* CTRL depressed */ #define GR_KB_CTRL 0x40000000 /* CTRL depressed */
#define GR_KB_ALT 0x0800 /* ALT depressed */ #define GR_KB_ALT 0x80000000 /* ALT depressed */
#define GR_KB_SCROLLOCK 0x1000 /* SCROLL LOCK active */
#define GR_KB_NUMLOCK 0x2000 /* NUM LOCK active */
#define GR_KB_CAPSLOCK 0x4000 /* CAPS LOCK active */
#define GR_KB_INSERT 0x8000 /* INSERT state active */
#define GR_KB_SHIFT (GR_KB_LEFTSHIFT | GR_KB_RIGHTSHIFT) #define GR_KB_SHIFT (GR_KB_LEFTSHIFT | GR_KB_RIGHTSHIFT)
#define GR_KB_SHIFTCTRL (GR_KB_SHIFT | GR_KB_CTRL) #define GR_KB_SHIFTCTRL (GR_KB_SHIFT | GR_KB_CTRL)
#define MOUSE_MIDDLE 0x10000 /* flag indiquant bouton central souris */ #define MOUSE_MIDDLE 0x10000 /* flag indiquant bouton central souris */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment