Skip to content

Commit

Permalink
add Em Space special key for paragraph indent
Browse files Browse the repository at this point in the history
  • Loading branch information
guanglinn committed Aug 22, 2024
1 parent 92b30e1 commit 37871f9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.os.Handler;
import android.text.Editable;
Expand Down Expand Up @@ -973,10 +972,12 @@ public void runSpecialKeyAction() {
_hlEditor.insertOrReplaceTextOnCursor("\u0009");
} else if (callbackPayload.equals(rstr(R.string.zero_width_space))) {
_hlEditor.insertOrReplaceTextOnCursor("\u200B");
} else if (callbackPayload.equals(rstr(R.string.search))) {
onSearch();
} else if (callbackPayload.equals(rstr(R.string.em_space))) {
_hlEditor.insertOrReplaceTextOnCursor("\u2003");
} else if (callbackPayload.equals(rstr(R.string.break_page_pdf_print))) {
_hlEditor.insertOrReplaceTextOnCursor("<div style='page-break-after:always;'></div>");
} else if (callbackPayload.equals(rstr(R.string.search))) {
onSearch();
} else if (callbackPayload.equals(rstr(R.string.ohm))) {
_hlEditor.insertOrReplaceTextOnCursor("Ω");
} else if (callbackPayload.equals(rstr(R.string.continued_overline))) {
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@
<item translatable="false">@string/key_pos_end_document</item>
<item translatable="false">@string/key_ctrl_a</item>
<item translatable="false">@string/key_tab</item>
<item translatable="false">@string/search</item>
<item translatable="false">@string/zero_width_space</item>
<item translatable="false">@string/em_space</item>
<item translatable="false">@string/break_page_pdf_print</item>
<item translatable="false">@string/search</item>
<item translatable="false">@string/ohm</item>
<item translatable="false">@string/char_punctation_mark_arrows</item>
<item translatable="false">@string/shrug</item>
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ work. If not, see <https://creativecommons.org/publicdomain/zero/1.0/>.
<string name="key_pos_end_document">Document End</string>
<string name="key_ctrl_a">Select all (Ctrl+A)</string>
<string name="key_tab">Tabulator</string>
<string name="zero_width_space">Zero-width space</string>
<string name="em_space">Paragraph indent (&amp;emsp;)</string>
<string name="start_on_bottom">Start on bottom</string>
<string name="start_on_bottom_when_loading_document">Upon loading a document, position cursor at its end</string>
<string name="unordered_list_character">Unordered list character</string>
Expand Down Expand Up @@ -274,7 +276,6 @@ work. If not, see <https://creativecommons.org/publicdomain/zero/1.0/>.
<string name="no_calendar_app_is_installed">No calendar app is installed!</string>
<string name="popular_documents">Popular documents</string>
<string name="color">Color</string>
<string name="zero_width_space">Zero-width space</string>
<string name="basic_color_scheme">Basic color scheme</string>
<string name="background_foreground_color_in_editor_works_dark_light">Changes background and foreground color of the text editor. Adjusts to app theme so available in light and dark theme. Syntax highlighting colors remain the same.</string>
<string name="preset">Preset</string>
Expand Down

0 comments on commit 37871f9

Please sign in to comment.