TextView: Update navigation shortcuts
* Command+Left goes to beginning of line, ignoring softwrap * Command+Right goes to the end of line, ignoring softwrap * Home goes to beginning of line, accounting for softwrap * End goes to end of line, accounting for softwrap * Option+Left goes to previous word * Option+Right goes to next word * Command+Home and Command+Up go to beginning of document * Command+End and Command+Down go to end of document Shift with any of the above also selects the text. This is similar to how the text editor Eddie works.
This commit is contained in:
@@ -292,10 +292,10 @@ private:
|
||||
|
||||
void _HandleBackspace();
|
||||
void _HandleArrowKey(uint32 arrowKey,
|
||||
bool commandKeyDown = false);
|
||||
int32 modifiers = -1);
|
||||
void _HandleDelete();
|
||||
void _HandlePageKey(uint32 pageKey,
|
||||
bool commandKeyDown = false);
|
||||
int32 modifiers = -1);
|
||||
void _HandleAlphaKey(const char* bytes,
|
||||
int32 numBytes);
|
||||
|
||||
@@ -382,6 +382,9 @@ private:
|
||||
int32 _NextInitialByte(int32 offset) const;
|
||||
int32 _PreviousInitialByte(int32 offset) const;
|
||||
|
||||
int32 _PreviousLineStart(int32 offset);
|
||||
int32 _NextLineEnd(int32 offset);
|
||||
|
||||
int32 _PreviousWordBoundary(int32 offset);
|
||||
int32 _NextWordBoundary(int32 offset);
|
||||
|
||||
@@ -449,9 +452,15 @@ private:
|
||||
float fMinTextRectWidth;
|
||||
LayoutData* fLayoutData;
|
||||
int32 fLastClickOffset;
|
||||
|
||||
bool fInstalledNavigateLinewiseShortcuts;
|
||||
bool fInstalledNavigateWordwiseShortcuts;
|
||||
bool fInstalledNavigateDocwiseShortcuts;
|
||||
bool fInstalledNavigateToTopOrBottomShortcuts;
|
||||
|
||||
bool fInstalledSelectLinewiseShortcuts;
|
||||
bool fInstalledSelectWordwiseShortcuts;
|
||||
bool fInstalledSelectDocwiseShortcuts;
|
||||
bool fInstalledSelectToTopOrBottomShortcuts;
|
||||
|
||||
uint32 _reserved[6];
|
||||
|
||||
Reference in New Issue
Block a user