*
* The MIT License (MIT)
*
- * Copyright (C) 2017 Kevin Lamonte
+ * Copyright (C) 2019 Kevin Lamonte
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
} else if (keypress.equals(kbRight)) {
document.right();
alignTopLine(true);
+ } else if (keypress.equals(kbAltLeft)
+ || keypress.equals(kbCtrlLeft)
+ ) {
+ document.backwardsWord();
+ alignTopLine(false);
+ } else if (keypress.equals(kbAltRight)
+ || keypress.equals(kbCtrlRight)
+ ) {
+ document.forwardsWord();
+ alignTopLine(true);
} else if (keypress.equals(kbUp)) {
document.up();
alignTopLine(false);
} else if (keypress.equals(kbDel)) {
document.del();
alignCursor();
- } else if (keypress.equals(kbBackspace)) {
+ } else if (keypress.equals(kbBackspace)
+ || keypress.equals(kbBackspaceDel)
+ ) {
document.backspace();
alignTopLine(false);
} else if (keypress.equals(kbTab)) {
&& !keypress.getKey().isCtrl()
) {
// Plain old keystroke, process it
+ // TODO: fix document to use ints, not chars
document.addChar(keypress.getKey().getChar());
alignCursor();
} else {