Si lo único que quieres es capturar unas cuantas teclas fuera del form puedes crear hotkeys globales:
#Region " GlobalHotkeys Class "
Class Shortcut
Inherits NativeWindow
Implements IDisposable
#Region " GlobalHotkeys Declarations "
Protected Declare Function UnregisterHotKey Lib "user32.dll" (ByVal handle As IntPtr, ByVal id As Integer) As Boolean
Protected Declare Function RegisterHotKey Lib "user32.dll" (ByVal handle As IntPtr, ByVal id As Integer, ByVal modifier As Integer, ByVal vk As Integer) As Boolean
Event Press(ByVal sender As Object, ByVal e As HotKeyEventArgs)
Protected EventArgs As HotKeyEventArgs, ID As Integer
Enum Modifier As Integer
None = 0
Alt = 1
Ctrl = 2
Shift = 4
End Enum
Class HotKeyEventArgs
Inherits EventArgs
Property Modifier As Shortcut.Modifier
Property Key As Keys
End Class
Class RegisteredException
Inherits Exception
Protected Const s As String = "Shortcut combination is in use."
Sub New()
MyBase.New(s)
End Sub
End Class
#End Region
#Region " GlobalHotkeys IDisposable "
Private disposed As Boolean
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
If Not disposed Then UnregisterHotKey(Handle, ID)
disposed = True
End Sub
Protected Overrides Sub Finalize()
Dispose(False)
MyBase.Finalize()
End Sub
Sub Dispose() Implements IDisposable.Dispose
Dispose(True)
GC.SuppressFinalize(Me)
End Sub
#End Region
#Region " GlobalHotkeys debugger "
<DebuggerStepperBoundary()>
Sub New(ByVal modifier As Modifier, ByVal key As Keys)
CreateHandle(New CreateParams)
ID = GetHashCode()
EventArgs = New HotKeyEventArgs With {.Key = key, .Modifier = modifier}
If Not RegisterHotKey(Handle, ID, modifier, key) Then Throw New RegisteredException
End Sub
Shared Function Create(ByVal modifier As Modifier, ByVal key As Keys) As Shortcut
Return New Shortcut(modifier, key)
End Function
Protected Sub New()
End Sub
Protected Overrides Sub WndProc(ByRef m As Message)
Select Case m.Msg
Case 786
RaiseEvent Press(Me, EventArgs)
Case Else
MyBase.WndProc(m)
End Select
End Sub
#End Region
End Class
#End Region
Ejemplos de uso:
' Declare the GlobalHotkey
Dim WithEvents GlobalHotkey_CTRL_E As Shortcut
Dim WithEvents GlobalHotkey_ALT_E As Shortcut
Dim WithEvents GlobalHotkey_ALT_SHIFT_E As Shortcut
' Create the GlobalHotkey into a sub
GlobalHotkey_CTRL_E = Shortcut.Create(Shortcut.Modifier.Ctrl, Keys.E)
GlobalHotkey_ALT_E = Shortcut.Create(Shortcut.Modifier.Alt, Keys.E)
GlobalHotkey_ALT_SHIFT_E = Shortcut.Create(Shortcut.Modifier.Alt Or Shortcut.Modifier.Shift, Keys.E)
Private Sub GlobalHotkey_CTRL_E_Press(ByVal s As Object, ByVal e As Shortcut.HotKeyEventArgs) Handles GlobalHotkey_CTRL_E.Press
MessageBox.Show("Youve pressed [CTRL + E]")
End Sub
Private Sub GlobalHotkey_ALT_E_Press(ByVal s As Object, ByVal e As Shortcut.HotKeyEventArgs) Handles GlobalHotkey_ALT_E.Press
MessageBox.Show("Youve pressed [ALT + E]")
End Sub
Private Sub GlobalHotkey_ALT_SHIFT_E_Press(ByVal s As Object, ByVal e As Shortcut.HotKeyEventArgs) Handles GlobalHotkey_ALT_SHIFT_E.Press
MessageBox.Show("Youve pressed [ALT +SHIFT + E]")
End Sub
Aquí te peudes descargar el snippet:
[APORTE] Snippets (ACTUALIZADO 21/12/2012)