Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added font size actions to hardware button function list #98

Open
wants to merge 1 commit into
base: stable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
<item>@string/list_hwbutton_ctrlaspace</item>
<item>@string/list_hwbutton_ctrla</item>
<item>@string/list_hwbutton_esc_a</item>
<item>@string/list_hwbutton_font_inc</item>
<item>@string/list_hwbutton_font_dec</item>
<item>@string/list_hwbutton_none</item>
</string-array>

Expand All @@ -60,6 +62,8 @@
<item>Ctrl+A then Space</item>
<item>Ctrl+A</item>
<item>Esc+A</item>
<item>Increase font size</item>
<item>Decrease font size</item>
<item>None</item>
</string-array>

Expand Down
4 changes: 4 additions & 0 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,10 @@
<string name="list_hwbutton_ctrla">"Ctrl+A"</string>
<!-- Selection to indicate pressing a hardware button should send "Esc+A". -->
<string name="list_hwbutton_esc_a">"Esc+A"</string>
<!-- Selection to indicate pressing a hardware button should increase font size . -->
<string name="list_hwbutton_font_inc">"Increase font size"</string>
<!-- Selection to indicate pressing a hardware button should decrease font size . -->
<string name="list_hwbutton_font_dec">"Decrease font size"</string>
<!-- Selection to indicate pressing a hardware button should send nothing at all. -->
<string name="list_hwbutton_none">"None"</string>

Expand Down
4 changes: 4 additions & 0 deletions src/sk/vx/connectbot/service/TerminalKeyListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,10 @@ private boolean handleShortcut(View v, String shortcut) {
} else if(PreferenceConstants.HWBUTTON_ESC_A.equals(shortcut)) {
((vt320)buffer).keyTyped(vt320.KEY_ESCAPE, ' ', 0);
bridge.transport.write('a');
} else if(PreferenceConstants.HWBUTTON_FONT_INC.equals(shortcut)) {
bridge.increaseFontSize();
} else if(PreferenceConstants.HWBUTTON_FONT_DEC.equals(shortcut)) {
bridge.decreaseFontSize();
} else {
return(false);
}
Expand Down
2 changes: 2 additions & 0 deletions src/sk/vx/connectbot/util/PreferenceConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ public class PreferenceConstants {
public static final String HWBUTTON_ESC_A = "Esc+A";
public static final String HWBUTTON_CTRL = "CTRL";
public static final String HWBUTTON_TAB = "Tab";
public static final String HWBUTTON_FONT_INC = "Increase font size";
public static final String HWBUTTON_FONT_DEC = "Decrease font size";

public static final String KEEP_ALIVE = "keepalive";

Expand Down