Commit Graph

111 Commits

Author SHA1 Message Date
Fredrik Fornwall
8d00f22d4c Catch KEYCODE_MOVE_HOME and not KEYCODE_HOME
The KEYCODE_HOME event is handled by the system and never delivered
to applications, it's KEYCODE_MOVE_HOME (FN+LeftArrow) we want to
handle ourselves and send as an escape sequence.

Fixes #138.
2016-08-12 04:18:09 +02:00
Fredrik Fornwall
5532421ab2 Check arches in order of preference
The documentation for Build.SUPPORTED_ABIS says:
"An ordered list of ABIs supported by this device. The most preferred
ABI is the first element in the list."

Respect that preference when checking for which arch to install
packages for.

Fixes #131.
2016-08-08 23:22:47 +02:00
Michał Bednarski
c350318c77 Make ExtraKeysView work on Android 5
This is done by explicitly specifying alignment as GridLayout.FILL
as I have figured out that this was fixed in Android 6 in commit
6dafd87fb4%5E%21/#F0
which set default alignment to FILL if weight is nonzero
2016-08-08 10:16:47 +02:00
Fredrik Fornwall
f9c642c672 Support Unicode 9 for wcwidth (don't squash emojis) 2016-08-04 23:58:09 +02:00
Fredrik Fornwall
c0a5e5f57a Switch to TYPE_NULL as input type
This fixes #126 where the previous input type put some keyboards into
word mode (no direct echo). The workaround for Google Pinyin does not
seem to be necessary no more.

Also fix backspace after entering emojis on some keyboards (Swype).
2016-08-04 23:56:17 +02:00
Fredrik Fornwall
dfdc9b37e1 Allow predictive text area input to remove session
Fixes #124
2016-08-04 23:27:42 +02:00
Fredrik Fornwall
dfb22e6050 Make user-configurable shortcuts case insensitive 2016-08-04 18:11:50 +02:00
Fredrik Fornwall
b95d84fe13 Use absolute reference for android.R (lint check) 2016-08-02 17:34:13 +02:00
Fredrik Fornwall
a73228b109 Fix Enter to finish session in more cases
Detect the Enter key to finish a session not only on KeyEvent:s,
but also when the IME uses InputConnection.commitText() to send
\n. This seems to be triggered more after switching to the Uri
input type. Closes #124

Also bump app version for a quick release.
2016-08-01 06:37:49 +02:00
Fredrik Fornwall
95a50096cb Remove attempt of icons at popup menu actions 2016-08-01 00:30:11 +02:00
Fredrik Fornwall
8caeab470e Tweak the IME mode (from password to URI)
This makes more sense and avoids the extra number row when using
the Google keyboard. Closes #87.
2016-07-31 22:55:54 +02:00
Fredrik Fornwall
6b62e65154 Some minor AS lint warnings tweaks 2016-07-31 22:28:17 +02:00
Fredrik Fornwall
d0abd17091 Add version check before field usage 2016-07-31 22:13:24 +02:00
Fredrik Fornwall
0550dbff9d Fix backspace in combination with Alt and Ctrl 2016-07-27 00:27:21 +02:00
Fredrik Fornwall
9d7ed21f27 Fix Ctrl+/ to send same as Ctrl+_ 2016-07-27 00:26:50 +02:00
Fredrik Fornwall
2bf9e7b205 Do not send mouse up event after scrolling
This fixes an issue where e.g. in tmux, when pressing the finger
on an upper pane and dragging it down to scroll and releasing it
further down on another pane, the upper pane lost focus to to a
mouse click being sent to the pane below.
2016-07-22 00:47:47 +02:00
Fredrik Fornwall
bc158252d6 Use static imports throughout 2016-07-22 00:23:23 +02:00
Fredrik Fornwall
2db6923bc4 Reformat code project-wide (getting rid of tabs) 2016-06-28 01:03:03 +02:00
Fredrik Fornwall
d72fd579ee Various updates mainly for extra keys 2016-06-28 00:56:30 +02:00
Fredrik Fornwall
964c0b7b4f Cleanup imports 2016-06-26 22:39:46 +02:00
Fredrik Fornwall
9519727f38 Enable installation of x86-64 packages 2016-06-22 01:31:21 +02:00
Fredrik Fornwall
33d1477d4a Remove KeyboardModifiers 2016-06-22 00:24:42 +02:00
Fredrik Fornwall
2104252244 Change session exit detection
Previously we waited for all opened file descriptors to the terminal
to be closed. This caused problem when e.g. running "sleep 900 &"
and then exiting the shell, with sleep keeping the session alive and
had to be killed manually (killing the process group did not help -
the shell had already exited and was in zombie state). This is also
what most other terminal emulators do.

Relatedly, switch to sending SIGKILL to force quit a session instead
of SIGHUP, since SIGHUP can be ignored.
2016-06-08 01:37:08 +02:00
Fredrik Fornwall
a2ebcdcf49 Extra keys view: Implement sending text 2016-06-06 00:56:42 +02:00
Fredrik Fornwall
0861be363b Remove some inspect code warnings 2016-05-20 10:46:48 +02:00
Fredrik Fornwall
d1c0b6abdc Add initial support for extra keys 2016-05-20 10:44:23 +02:00
Fredrik Fornwall
8714800c6b Add an extra keys view 2016-05-20 10:41:38 +02:00
Fredrik Fornwall
042fbfaea3 TerminalView: Start support for extra keys 2016-05-20 10:41:07 +02:00
Fredrik Fornwall
08d6d1706d Add pref for showing extra keys 2016-05-20 10:36:20 +02:00
Fredrik Fornwall
bdd5c80fca Commit the text on finishComposingText()
This handles e.g. text written with hand writing input methods
as mentioned in #91.
2016-05-09 15:39:11 +02:00
Fredrik Fornwall
cc7b6cba13 Change minimum cols&rows from 8 to 4
This avoids e.g. the keyboard overlapping the terminal in setups
that can actually happen. Closes #88.
2016-05-04 22:44:38 +02:00
Fredrik Fornwall
ff2f77c427 Mark reset() private 2016-05-04 22:27:43 +02:00
Fredrik Fornwall
7db1f6c5a1 Add explicit handling of switch constant 2016-04-22 03:30:09 +02:00
Fredrik Fornwall
6e7f777d04 Remove support for ACTION_GET_CONTENT
As we have a document provider now we can remove ACTION_GET_CONTENT.

"The ACTION_OPEN_DOCUMENT intent is only available on devices running
Android 4.4 and higher. If you want your application to support
ACTION_GET_CONTENT to accommodate devices that are running Android 4.3
and lower, you should disable the ACTION_GET_CONTENT intent filter in
your manifest for devices running Android 4.4 or higher. A document
provider and ACTION_GET_CONTENT should be considered mutually exclusive.
If you support both of them simultaneously, your app will appear twice
in the system picker UI, offering two different ways of accessing your
stored data. This would be confusing for users."

- http://developer.android.com/guide/topics/providers/document-provider.html#43
2016-04-22 03:26:23 +02:00
Fredrik Fornwall
fc15bd2355 Documents provider: Remove FLAG_SUPPORTS_RECENTS 2016-04-22 02:51:13 +02:00
Fredrik Fornwall
a87cbdd70c Make VolumeUp+x send Alt+x 2016-04-22 02:20:10 +02:00
Fredrik Fornwall
fb7f7d249e Ignore warnings about setExecutable(true) failing 2016-04-22 02:17:41 +02:00
Fredrik Fornwall
026d0b495e Expose files through the Storage Access Framework
This allows e.g. external editors to edit files in the Termux home
folder. Fixes #79.
2016-04-22 02:13:50 +02:00
Fredrik Fornwall
533fa60516 Remove unused imports 2016-04-22 02:00:36 +02:00
Fredrik Fornwall
dc086a1e0b Tweak button ordering on the file received dialog 2016-04-16 23:02:20 +02:00
Fredrik Fornwall
9686127f81 Fix installer to check supported abi:s
This fixes installation on e.g. the Samsung Galaxy S5 Neo which has
a 64-bit cpu but no 64-bit runtime available (closes #69).
2016-04-16 21:18:21 +02:00
Fredrik Fornwall
906ff24e76 Avoid repetition of home path constant 2016-04-11 14:12:21 +02:00
Fredrik Fornwall
481339e2f5 Do not force chooser when opening url 2016-04-11 14:05:31 +02:00
Fredrik Fornwall
421dfcca39 Do not fail with NPE when scheme is null
Also remove some debug logging left by mistake.
2016-03-23 18:31:03 +01:00
Fredrik Fornwall
3aaa0ab267 Remove unused imports 2016-03-21 15:24:02 +01:00
Fredrik Fornwall
e7f9647beb Remove unused variable 2016-03-21 15:19:08 +01:00
Fredrik Fornwall
0882ed6470 Keep the EXTERNAL_STORAGE environment variable
The EXTERNAL_STORAGE environment variable is needed on at least the
Samsung Galaxy S7 for /system/bin/am to function.
2016-03-20 23:57:34 +01:00
Fredrik Fornwall
5c02448521 Install 64-bit arm packages on capable devices
This will only affect new installations. Existing users wishing to
install 64-bit packages can re-install the app completely, or just
'rm -Rf $PREFIX' and exit all sessions, which will cause Termux to
re-install all packages at next startup.
2016-03-20 22:24:05 +01:00
Fredrik Fornwall
17382fb190 Do not have /system/bin in the PATH
By appending the old system PATH environment variable to the paths
setup by Termux system binaries are found as a fallback.

This causes problems with system binaries not working (due to
LD_LIBRARY_PATH) and causing a lot of confusion for new users when
e.g. an Android system provides a system version of e.g. curl, ssh
and other programs. It's better for these users to be prompted to
install the proper Termux package, and advanced users can still
add /system/bin to the PATH themselves.

Certain programs such as 'am' and 'pm' are already setup in
$PREFIX/bin to clear LD_LIBRARY_PATH and launch the binaries in
/system/bin - if there are some more popular ones they could be
added in the same way.
2016-03-20 22:17:21 +01:00
Fredrik Fornwall
d6eea83bfc Make it possible to receive files
The files are saved to $HOME/downloads/, after which the user
may choose to open the downloads/ folder or edit the file with
the $HOME/bin/termux-file-editor program.

It's also possible to receive URL:s, in which case the
$HOME/bin/termux-url-opener program will be called.
2016-03-19 00:17:38 +01:00