Mercurial > 510Connectbot
comparison src/com/five_ten_sg/connectbot/service/TerminalKeyListener.java @ 48:1e931ef5f776 tn5250
start tn5250 integration
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Wed, 11 Jun 2014 10:11:29 -0700 |
parents | 80dcebe51af2 |
children | 8887bff45dee |
comparison
equal
deleted
inserted
replaced
47:a3fd10a8c0de | 48:1e931ef5f776 |
---|---|
15 * limitations under the License. | 15 * limitations under the License. |
16 */ | 16 */ |
17 package com.five_ten_sg.connectbot.service; | 17 package com.five_ten_sg.connectbot.service; |
18 | 18 |
19 import java.io.IOException; | 19 import java.io.IOException; |
20 import java.nio.charset.Charset; | |
20 import java.lang.ref.WeakReference; | 21 import java.lang.ref.WeakReference; |
21 import java.util.List; | 22 import java.util.List; |
22 | 23 |
23 import com.five_ten_sg.connectbot.R; | 24 import com.five_ten_sg.connectbot.R; |
24 import com.five_ten_sg.connectbot.TerminalView; | 25 import com.five_ten_sg.connectbot.TerminalView; |
81 | META_SHIFT_ON; | 82 | META_SHIFT_ON; |
82 | 83 |
83 private final TerminalManager manager; | 84 private final TerminalManager manager; |
84 private final TerminalBridge bridge; | 85 private final TerminalBridge bridge; |
85 private final vt320 buffer; | 86 private final vt320 buffer; |
87 private String encoding; | |
86 | 88 |
87 private String keymode = null; | 89 private String keymode = null; |
88 private boolean hardKeyboard = false; | 90 private boolean hardKeyboard = false; |
89 private String customKeyboard = null; | 91 private String customKeyboard = null; |
90 | 92 |
96 private ClipboardManager clipboard = null; | 98 private ClipboardManager clipboard = null; |
97 | 99 |
98 private boolean selectingForCopy = false; | 100 private boolean selectingForCopy = false; |
99 private final SelectionArea selectionArea; | 101 private final SelectionArea selectionArea; |
100 | 102 |
101 private String encoding; | |
102 | 103 |
103 private final SharedPreferences prefs; | 104 private final SharedPreferences prefs; |
104 | 105 |
105 private Toast debugToast = null; | 106 private Toast debugToast = null; |
106 private Toast metakeyToast = null; | 107 private Toast metakeyToast = null; |
900 | 901 |
901 public void setCharset(String encoding) { | 902 public void setCharset(String encoding) { |
902 this.encoding = encoding; | 903 this.encoding = encoding; |
903 } | 904 } |
904 | 905 |
905 public String getCharset() { | 906 public Charset getCharset() { |
906 return encoding; | 907 return Charset.forName(encoding); |
907 } | 908 } |
908 | 909 |
909 private void ctrlKeySpecial() { | 910 private void ctrlKeySpecial() { |
910 if (selectingForCopy) { | 911 if (selectingForCopy) { |
911 if (selectionArea.isSelectingOrigin()) | 912 if (selectionArea.isSelectingOrigin()) |