Skip to content

Commit

Permalink
Fix issue with tab key on Google Sheets
Browse files Browse the repository at this point in the history
  • Loading branch information
luongthanhlam committed Nov 7, 2019
1 parent 95672dc commit 9e77053
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
ibus-bamboo (0.6.1-1) stable; urgency=medium

* New upstream release

-- Luong Thanh Lam <[email protected]> Thu, 07 Nov 2019 10:07:52 +0700

ibus-bamboo (0.6.1-0) stable; urgency=medium

* New upstream release
Expand Down
2 changes: 1 addition & 1 deletion src/ibus-bamboo/engine_backspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func (e *IBusBambooEngine) keyPressHandler(keyVal, keyCode, state uint32) {
macText := e.expandMacro(oldText)
e.updatePreviousText(macText, oldText)
} else {
e.commitText("\t")
e.ForwardKeyEvent(keyVal, keyCode, state)
}
e.preeditor.Reset()
return
Expand Down
3 changes: 2 additions & 1 deletion src/ibus-bamboo/engine_preedit.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ func (e *IBusBambooEngine) preeditProcessKeyEvent(keyVal uint32, keyCode uint32,
macText := e.expandMacro(text)
e.commitPreedit(macText)
} else {
e.commitPreedit(e.getComposedString() + "\t")
e.commitPreedit(e.getComposedString())
return false, nil
}
return true, nil
}
Expand Down
5 changes: 4 additions & 1 deletion src/ibus-bamboo/engine_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,10 @@ func (e *IBusBambooEngine) isValidState(state uint32) bool {
}

func (e *IBusBambooEngine) canProcessKey(keyVal uint32) bool {
if keyVal == IBUS_Space || keyVal == IBUS_BackSpace || keyVal == IBUS_Tab {
if keyVal == IBUS_Space || keyVal == IBUS_BackSpace {
return true
}
if e.config.IBflags&IBmarcoEnabled != 0 && keyVal == IBUS_Tab {
return true
}
return e.preeditor.CanProcessKey(rune(keyVal))
Expand Down

0 comments on commit 9e77053

Please sign in to comment.