Allow Ctrl+c to copy and update readme
This commit is contained in:
parent
0be5f4207c
commit
60e0819f68
|
@ -10,7 +10,7 @@ vibreoffice currently supports:
|
|||
- Movement keys: `hjkl`, `w`, `W`, `b`, `B`, `e`, `$`, `^`, `{}`, `()`, `C-d`, `C-u`
|
||||
- Search movement: `f`, `F`, `t`, `T`
|
||||
- Number modifiers: e.g. `5w`, `4fa`
|
||||
- Deletion: `x`, `d`, `c`, `dd`, `cc`
|
||||
- Deletion: `x`, `d`, `c`, `C`, `D`, `dd`, `cc`
|
||||
- Plus movement and number modifiers: e.g. `dw`, `c$`, `5dd`, `c3j`
|
||||
- More to come!
|
||||
|
||||
|
|
|
@ -276,7 +276,10 @@ function KeyHandler_KeyPressed(oEvent) as boolean
|
|||
|
||||
' Show terminal-like cursor
|
||||
oTextCursor = getTextCursor()
|
||||
If MODE = "NORMAL" Then
|
||||
If oEvent.Modifiers = 2 Or oEvent.Modifiers = 8 And oEvent.KeyChar = "c" Then
|
||||
' Allow Ctrl+c for Copy, so don't change cursor
|
||||
' Pass
|
||||
ElseIf MODE = "NORMAL" Then
|
||||
cursorReset(oTextCursor)
|
||||
ElseIf MODE = "INSERT" Then
|
||||
oTextCursor.gotoRange(oTextCursor.getStart(), False)
|
||||
|
@ -328,8 +331,10 @@ End Function
|
|||
|
||||
|
||||
Function ProcessModeKey(oEvent)
|
||||
dim bIsModified
|
||||
bIsModified = oEvent.Modifiers > 1 ' If Ctrl or Alt is held down. (Shift=1)
|
||||
' Don't change modes in these circumstances
|
||||
If MODE <> "NORMAL" Or getSpecial <> "" Or getMovementModifier() <> "" Then
|
||||
If MODE <> "NORMAL" Or bIsModified Or getSpecial <> "" Or getMovementModifier() <> "" Then
|
||||
ProcessModeKey = False
|
||||
Exit Function
|
||||
End If
|
||||
|
@ -388,10 +393,17 @@ Function ProcessNormalKey(oEvent)
|
|||
Exit Function
|
||||
End If
|
||||
|
||||
|
||||
' --------------------
|
||||
' 2. Check Delete Key
|
||||
' --------------------
|
||||
|
||||
' There are no delete keys with modifier keys, so exit early
|
||||
If oEvent.Modifiers > 1 Then
|
||||
ProcessNormalKey = False
|
||||
Exit Function
|
||||
End If
|
||||
|
||||
' Only 'x' or Special (dd, cc) can be done more than once
|
||||
If oEvent.KeyChar <> "x" and getSpecial() = "" Then
|
||||
iIterations = 1
|
||||
|
|
Loading…
Reference in New Issue