Skip to content
This repository has been archived by the owner on Apr 7, 2019. It is now read-only.

Commit

Permalink
V1.0.9.12
Browse files Browse the repository at this point in the history
- Fix mistakes in keyboard mapping, Issue #84
  • Loading branch information
gerritv committed Jan 22, 2017
1 parent b8dbb53 commit a5bdfee
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 19 deletions.
2 changes: 2 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
This file documents changes made:
V1.0.9.12 - 2017 Jan 22
- Fix mistakes in keyboard shortcuts, Issue #84
V1.0.9.11 - 2017 Jan 15
- Handle exception for port in use, Issue #73
- Fix Reset behaviour to prevent sending more data, Issue #83
Expand Down
2 changes: 2 additions & 0 deletions Grbl-Panel/CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
This file documents changes made:
V1.0.9.12 - 2017 Jan 22
- Fix mistakes in keyboard shortcuts, Issue #84
V1.0.9.11 - 2017 Jan 15
- Handle exception for port in use, Issue #73
- Fix Reset behaviour to prevent sending more data, Issue #83
Expand Down
36 changes: 19 additions & 17 deletions Grbl-Panel/GrblGui.vb
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Public Class GrblGui
''' <param name="msg"></param>
''' <returns>True if key msg was handled</returns>
<DebuggerStepThrough()> Private Function PreFilterMessage(ByRef msg As Message) As Boolean Implements IMessageFilter.PreFilterMessage
Dim handled As Boolean
Dim handled As Boolean = False

If msg.Msg = &H100 Then ' We have a KeyDown event

Expand All @@ -158,9 +158,7 @@ Public Class GrblGui
_gui.btnZMinus.PerformClick()
handled = True
End Select
If handled Then
Return True
End If
Return handled
End If
End If

Expand All @@ -169,6 +167,8 @@ Public Class GrblGui
Not _gui.gbEditor.ContainsFocus Then ' in case user is working in MDI
Select Case msg.WParam
' Act on Distance Increment keyboard requests
Case Keys.Shift
Dim m As IntPtr = msg.WParam
Case Keys.Add
_gui.changeDistanceIncrement(True)
handled = True
Expand All @@ -177,10 +177,10 @@ Public Class GrblGui
handled = True

' Act on Feed Rate keyboard requests
Case Keys.Divide
Case Keys.Divide, &HBF
_gui.changeFeedRate(True)
handled = True
Case Keys.Multiply
Case Keys.Multiply, Keys.D8 And My.Computer.Keyboard.ShiftKeyDown
_gui.changeFeedRate(False)
handled = True

Expand Down Expand Up @@ -211,13 +211,15 @@ Public Class GrblGui
handled = True

' Grbl State
Case Keys.H And Keys.ControlKey
Case Keys.H And My.Computer.Keyboard.CtrlKeyDown 'Keys.ControlKey
_gui.btnHold.PerformClick()
handled = True
Case Keys.U And Keys.ControlKey
Case Keys.U And My.Computer.Keyboard.CtrlKeyDown 'Keys.ControlKey
_gui.btnUnlock.PerformClick()
Case Keys.R And Keys.ControlKey
handled = True
Case Keys.X And My.Computer.Keyboard.CtrlKeyDown 'Keys.ControlKey
_gui.btnReset.PerformClick()
handled = True

' Overrides
Case Keys.F And My.Computer.Keyboard.ShiftKeyDown
Expand All @@ -226,7 +228,7 @@ Public Class GrblGui
Case Keys.F
_gui.btnFeedMinus.PerformClick()
handled = True
Case Keys.F And My.Computer.Keyboard.AltKeyDown
Case Keys.F And My.Computer.Keyboard.CtrlKeyDown
_gui.btnFeedOverrideReset.PerformClick()
handled = True
Case Keys.S And My.Computer.Keyboard.ShiftKeyDown
Expand All @@ -235,24 +237,24 @@ Public Class GrblGui
Case Keys.S
_gui.btnSpindleMinus.PerformClick()
handled = True
Case Keys.S And My.Computer.Keyboard.AltKeyDown
Case Keys.S And My.Computer.Keyboard.CtrlKeyDown
_gui.btnSpindleOverrideReset.PerformClick()
handled = True
Case Keys.R And My.Computer.Keyboard.ShiftKeyDown
_gui.btnRapidOverrideReset.PerformClick()
handled = True
Case Keys.R And My.Computer.Keyboard.CtrlKeyDown
_gui.btnRapidOverride25.PerformClick()
handled = True
Case Keys.R
_gui.btnRapidOverride50.PerformClick()
handled = True
Case Keys.R And My.Computer.Keyboard.AltKeyDown
_gui.btnRapidOverride25.PerformClick()
handled = True

End Select
End If
If handled = True Then
Return True
End If

Return handled

End If

' We didn't handle event so pass it along
Expand Down
4 changes: 2 additions & 2 deletions Grbl-Panel/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("1.0.9.11")>
<Assembly: AssemblyFileVersion("1.0.9.11")>
<Assembly: AssemblyVersion("1.0.9.12")>
<Assembly: AssemblyFileVersion("1.0.9.12")>

<Assembly: NeutralResourcesLanguageAttribute("en-CA")>

0 comments on commit a5bdfee

Please sign in to comment.