Code Monkey home page Code Monkey logo

keyboard-component's Introduction

Ubuntu Keyboard

This is a QML and C++ based Keyboard Plugin for Maliit, based on the Maliit Reference plugin, taking into account the special UI/UX requests of Ubuntu Phone.

Updating presage language models

If the source material used for presage's prediction models is update the databases can be regenerated by running "make lang_db_$lc" within the plugin's "src" directory (where $lc is the language code for the updated language, e.g. "make lang_db_en" for English)

Updating translations

After building the keyboard (such as with dpkg-buildpackage -us -uc), run make pot from the po directory to rebuild the translation source file.

On-device testing

To test a pull request on your device, type

sudo ubports-qa install keyboard-component X

where X is the code of a merge request to this repository.

Logs are saved in ~/.cache/upstart/maalit-server.log. They can be viewed directly on-device with a log viewer.

Options

To list available options (in UBports), type

gsettings list-recursively com.canonical.keyboard.maliit

and to set them

gsettings set com.canonical.keyboard.maliit option value 

keyboard-component's People

Contributors

aury88 avatar billfiller avatar caybro avatar cherojeong avatar cibersheep avatar dandrader avatar daniel20000522 avatar dobey avatar dplanella avatar elleo avatar flohack74 avatar fuseteam avatar gunchleoc avatar ivoxavier avatar kenvandine avatar kugiigi avatar lduboeuf avatar m-shibata avatar mardy avatar mariogrip avatar mikix avatar neothethird avatar peat-psuwit avatar roman2861 avatar sil2100 avatar sverzegnassi avatar tjyrinki avatar turanmahmudov avatar universalsuperbox avatar weblate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

keyboard-component's Issues

Switch correction language while maintaining keyboard layout

  • Device: LGE Nexus 5
  • Channel: Ubuntu Touch 15.04 (r3)
  • Build: (no idea, sorry!)

Steps to reproduce

  1. open messages app
  2. start writing a message (eg: in German)
  3. switch language to English (let's say you need the word "cool" in English, but your message is basically written in German)
  4. "cool" is recognized in English, but unfortunately the keyboard layout changes -> this makes it unusual to find the letters (in my case 'y' and 'z' switch places, but my mind and fingers are used to have them where they usually are -> QWERTZ layout)

Expected behavior

Eg: using the messages app, it should be possible to change the language and keep the keyboard layout the same. Keyboard layout and language should not be fixed to one another.

Actual behavior

Eg: using the messages app, you can switch language (for auto-correction feature), but the keyboard layout also changes.

autoCapitalization is activated also after `:`

Steps to reproduce

set true autoCapitalization from system-settings (or gsettings set com.canonical.keyboard.maliit auto-capitalization true if you prefer).
Start typing and press the : char followed by a space

Expected behavior

I'd expect to be able to continue typing the next word without a capital letter

Actual behavior

autoCaps is triggered after : and the next word will automatically start with a capital letter (which shouldn't happen in western layouts imho)

If this issue needs to be fixed, I'd like to work on this, just I wanted to know your opinion about this before start working

Swiss-French keyboard layout does not load

When the Swiss-French keyboard layout is selected in the keyboard and loaded, the keyboard goes all-white. The following appears in the logs.

WARNING: file:///usr/share/maliit/plugins/com/ubuntu/lib/fr-ch/Keyboard_fr-ch.qml:51:48: Expected token `,'
CRITICAL: Couldn't find word engine plugin for  "fr-ch"

Improve layout/language switching performance

Description

Currently the layouts/languages are loaded on-demand via a single Loader. This means that the layouts are loaded every time you switch to them. To make it worse, the Loader does not use asynchronous loading. Perhaps this can be improved so that switching layout will feel faster and smoother.

Editing text in WebApps and in Web browser gets tricky with suggestions

Hello,
if I insert text into a text input field in a web browser or a web app (eg. Google search) the suggestion engine may lead to some unwanted behavior issues.

So for example if I insert something like "Hello World" the last word "World" is underlined as I have text suggestions turned on. Then if I put my cursor let's say right after the word "Hello" and then type in anything ... (eg. space) the underlined word "World" gets inserted right after the word "Hello" and then the space is inserted after it. So I end up with "HelloWorld World".

This is especially unpleasant when filling in my credit card info when paying something online as this gets preserved even when switched to a different field. So I first type in my credit card number and since the number is underlined if I click to the next field and start typing in anything my card number is duplicated in that field and I have to delete it all in that second field and start typing again.

I have reported this some time ago in Launchpad but it was too late for it to get fixed apparently: https://bugs.launchpad.net/ubuntu/+source/ubuntu-keyboard/+bug/1648599

The last-used word is sometimes placed into an empty text box

On some apps (most notably the Telegram webapp, Webtelegram), the word you typed last before sending a message will be placed into the next empty text box you select. This seems to be a bug in correction, as the behavior will not occur if you type a space or period after the final word but before sending a message.

To reproduce:

  1. Open the Telegram webapp
  2. Open a chat and type a message. Do not end the message with a period or space, simply send the message after typing the last word
  3. Begin typing a new message

The word that you entered last will be placed into the text field before what you started typing.

Keyboard help desactivated when switching french-swiss keyboard to emoji and back to french-swiss keyboard

Little annoying bug found. Tested with app "Notes" or "Teleports" on N5, MX4

Steps to reproduce

  1. Display language is "English UK"
  2. Enable 3 keyboard layouts : EN, FR-CH, EMOJI
  3. Spell checking, auto Capitalization, auto Punctuation are set to ON.

With the "earth symbol", select FR-CH -> word suggestion bar is visible:

  • Start typing ".", then "space" -> keyboard is uppercase automatically
  • Type "F", then "space" 2 times -> "." appears automatically

Select EMOJI -> word suggestion bar is not visible (that's ok)

  • type some emoji

Select FR-CH -> word suggestion bar is NOT visible (weird)

  • Start typing ".", then "space" -> keyboard is NOT uppercase automatically
  • Type "F", then "space" 2 times -> "." does NOT appears automatically

Select EN, word suggestion bar is visible again, auto Cap and auto Punct work again
Select FR-CH, word suggestion bar is visible again, auto Cap and auto Punct work again
Then loop to "select EMOJI" to continue reproducing...

Expected behavior
Switch from FR-CH to EMOJI
Type some EMOJI
Switch back to FR-CH, word suggestion bar is still visible , auto Capitalization, auto Punctuation work

Actual behavior
Word suggestion bar, auto Cap and auto Punct are disabled when switching from FR-CH to EMOJI and back to FR-CH
Switching OFF/ON Word suggestion bar, auto Cap and auto Punct in "Language & Text" setting has no effect.
Switch to EN and back to FR-CH makes Word suggestion bar, auto Cap and auto Punct work again.

BR
wilfridd

Add a nub

Sometimes moving where the cursor in a text feild can be tedius, and inaccurate, to try and amend this, we could add a nub like in windows phone.

This would allow people to pull the nub to the left a little to move left by one character, rather then having to tap several times to try and get it right, or delete more then needed.

Pressing space missing vibration

hello,

I want to report a strange behavior when typing and tapping the keyboard space the vibration doesnt work. It does work when pressing the rest of the keys.

Thank you.

Edit: Nexus 5 RC 9

Add Lithuanian keyboard

We are missing Lithuanian keyboard.

I would like to contribute it if some one would give me hints on how to work on it, and how to test it on VM (if that's possible), or try it on my daily driver Aquaris E5 (in works case scenario).

Keyboard as trackpad stay on longer

Steps to reproduce

  1. Hold space down
  2. Let go and put your thumb on top of the keyboard to pull the cursor down
  3. Done

Expected behavoir

The trackpad stays on and the cursor gets pulled down

Actual behavior

The trackpad turns off and turns into a keyboard quickly

additional information

Either there should be a button to turn it off, or it should stay on for a specific amount of time.

Theres options such as tapping the keyboard or multigesture, but they may be better for adding new features such as tapping to start the selection tool to make it easier to copy and paste specific areas of writing, far easier.

auto correct steals blank from entered text

Hey! My first bug report coming up.

Issue in the ubports native Notes app

Using Swedish version ("Anteckningar"), probably doesn't matter but I have swedish, english and emojies. Disabling Swedish produces the same error.
I am not connected to Evernote, only using local mode.

What I want to happen: In a note. When I type a sentence and end it with a period (.) and change my mind pressing backspace. I want just the period to disappear. (Pretty straight forward)

What does happen: Sometimes, the period disappers along with the space introducing the word that was "attached" to the period. I think an example is needed for this to be understood :)

"The cat has nine lives."
Erasing the period here gives me:
"The cat has ninelives"

It does not happen all the time. More often in larger files (though not that large, maybe 20-30 sentences). I haven't found the pattern yet on when it appears, maybe some one else has experienced the same stuff?

System: Notes v 0.10.0
OS: 16.04 (OTA-11)

A T9 lookalike

Description of the feature

A "Single Tap" numeric keyboard for text entry.

This would have some similarities with the Tegic T9 keyboard in that single taps are ambiguous
until the entire word is typed. Unlike T9 there is no need for it to be predictive since prediction is
already available in Maliit as a separate plugin. This keyboard would therefore correctly be termed
reactive rather than predictive. Each keypress would result in a lookup from a word list based on all
the keys pressed till that point. I would propose the use of 8 lookups to make wordlist management
easier, each based on the first key pressed. eg 2dict.json, 3dict.json, .... 9dict.json

Other flavours of linux appear to have attempted to create what they call T9, but in fact all I have
discovered so far are not T9 as described by Tegic in that they require mulitaps on each key to select
individual letters. For this keyboard to avoid any suggestion it is based on T9, IMHO it should be called
S9 ( _S_ingletap on keys 2 to 9).

This keyboard is therefore designed to:

  • provide much larger keys than the standard OSK to prevent mistyping
  • use less screen space because there are fewer rows of keys
  • improve convergence because the proposed keypad has sufficient keys to allow for Ctrl, Alt etc.
    Indeed all keys from a 104 key extended keyboard can be emulated.

Illustrations are shown below to show proposed overlays. The main keyboard consists of 18 keys
arranged as 3x6 (or 6x3 landscape). 10 numeric (with alpha on keys 2 to 9), 2 dedicated keys (Enter
and Backspace/Delete), and 6 modifier/overlay_select.

Hopefuly most keys illustrated are self explanatory but some may require explanation:

  • ">>>"/Alt is used to select the next alternative interpretation of a key sequence. A long keypress replicates Alt on standard PC.
  • "-><-"/Ctrl is a deadspace key to create longer words by terminating the current lookup and starting an adjoined new word. Ctrl replicates Ctrl on a PC.
  • "QikSym"/Esc opens an overlay of punctuation and symbols which returns to the main keypad after a single selection. Esc acts as on a standard PC, and should cancel dialogs without saving any changes.
  • FKeys/Tab opens a FunctionKey overlay to allow replication of keys F1 to F12. Tab should act as on a standard PC.
  • CursorPad/Compose provides similar functionality to longpress on Space on the OSK, but with additional nudge and action keys. Compose allows the creation of accented characters by switching to multitap mode for selecting a character, then offering an accent selector.
  • M9/1 swiches to multitap mode for entry on Pins and passwords. Longpress on 1 could allow a popup for punctuation selection.
  • On the main keypad, a longpress on any numberkey should bring up a popup in a similar fashion to the standard OSK.

Illustrations

Click to embiggen in a separate window (Ctrl + to enlarge)
osk_portrait_overview

And to show why we need a smaller keyboard:

osk_landscape

extract from proposed 2dict.json
"2253","able"
"2253","bake"
"2253","bald"
"2253","bale"
"2253","cake"
"2253","calf"
"2253243","caleche"
"225326","calean"
"22532742","Balearic"
Note the use of numbers as strings. This is because some libraries convert large integers to exponents. Antidisesttablishmentarianism would be corrupted and foreign languages such as German have even longer words.

Keyboard size and position

I have problem with touch screen where is chars equal (picture below).
Is possible in settings add keyboard position and size?
There are several users with this problem.
┍━━━━━━┑
│...........│
│...........│ ┍━━━━━━━━━━━━━┑
│...........│ │.....................=│
│==== │ │.....................=│
┕━━━━━━┙ ┕━━━━━━━━━━━━━┙

feature request: set long press time

It would be great if we had the option to set the time in which the secondary keys pop up with a long press of a button. I guess I type fast and the current setting really slows me down.

the dvorak & flick layouts adapt the dictionary

Currently the dvorak en flick layouts adopt the dictionary of the previous selected layout
for example someone switching from the spanish layout to the english dvorak will be get corrections in spanish

while this seems usefull at first glance this also means switching from dvorak and to the emoji layout will disable autocorrect, autocomplete, spellchecking and autocapitalization

Make the 'Advanced text functions' known with an icon

From the OTA-11 release notes:

Your keyboard, now smarter
Kugi has outdone himself this time. With this update you'll find a new way to edit text via the Ubuntu Touch on-screen keyboard: the Advanced Text Functions. Using this feature, you can move around your typed text, undo and redo actions, move around a text selection rectangle, and use the cut/copy/paste commands, all from the same overlay. To get started, press and hold the space bar!

We are still unsure about the discoverability of this feature, so stay tuned for changes that will make it even easier to find and use!

About that last sentence, why not add an icon the the space bar as is done for e.g. the accents etc. A sketch from Telegram made by YougoChats based on my explanation:

image

anchor loop warning in maliit-server.log

don't know precisely when it occurs but see one of repeatingly logs :
WARNiNG: file:///usr/share/maliit/plugins/com/ubuntu/keys/Magnifier.qml:50:5: QML Rectangle: Possible anchor loop detected on centerIn.

instructions for setting up, building and testing the project

problem

I'd like to add an on-screen keyboard layout for an additional language but until now I am not able to compile nor to test the current state of the repo.

So far I tried to

  • find the missing packages that qtcreator lists to me but still there are some missing
  • use crossbuilder but it ran into problems itself

Still I don't know the intended way of doing this and what I try is also not working. So this situation is quite ... frustating.

proposal

extend the readme

  • either by instructions on setting up the project for development, building as well as testing it
  • or by references that explain those points

Japanese radical characters display issue

Hi,
As a follow up from ubports/ubuntu-touch#556

Initial message from @Dreamsorcerer:

Many of the Japanese radical characters do not display on Ubuntu touch, even if the language is set to Japanese. These display correctly on desktop Ubuntu without a problem.

Examples: ⿴, ⿸, ⿺, ⺈, ⺌
And several others you can see in the first column of the table on this page: https://en.wikipedia.org/wiki/List_of_kanji_radicals_by_frequency

I think a better place to that kind of issue

swiping up from the top row dismisses the keyboard partially

swiping up from the top row dismisses the osk partially
this is rather annoying for flick keyboards( #93 ), but it is also rather difficult to reproduce reliably
the only way i have been able to reproduce this reliably is by opening the osk in portrait and rotating the phone to landscape
it also happens in portrait occasionally but i have not been able to reproduce it
any help finding the files responsible for swipe to dismiss is welcome

Can't use traditional chinese characters with pinyin input

The OSK is missing a switch to allow users to switch between character sets while using the pinyin input method. The OSK does include a way to input traditional characters -- chewing/ZhuYin -- however zhuyin is mainly used by Taiwanese, which excludes the rest of us who need to type traditional Chinese characters. Most would be familiar with pinyin and not so much chewing/zhuyin, so it makes sense that the pinyin IME should include traditional characters.

Add installation instructions

How to test?

As I read on #86 I can give

sudo ubports-qa install PR-X

to rebuild and reinstall on device the packages involved in the PR no. X.

This is really cool and also very practical (if it not breaks the system over time? I suppose one should anyway develop in a VM?)

Logs

Where are logs being saved?

journalctl /usr/bin/maliit-server -f -o cat

does not output anything.

EDIT: found them

Improvements for the Italian keyboard

From @GI9VANNI on January 27, 2018 13:51

Hello!
I would like to point out an improvement for the Italian keyboard.
In Italian there is is written c'è and it would be great if typing ce appeares c'è between the suggestions.
In general it should suggest the words joined by the apostrophes also writing only the letters, without typing them because they waste time.

Copied from original issue: ubports/ubuntu-touch#452

add persion layout

Hi. i am iranian person, how can i find persian layout or do coding for it?

Change globe icon to Ubuntu icon

It'd be nice to change the globe icon to the Ubuntu icon, especially as it's not just for language selection.

From this:

To this or something similar:

Add an option to slightly modify keyboard layout - e.g. from QWERTZ to QWERTY

Hi,
I've been trying to figure out how to add a new layout for my language, as the only available Czech QWERTZ layout is a bit too unpleasant for me, and it seems that currently creating a completely new layout is required duplicating all the language files even if I just need to swap two characters (Y and Z).

So I wonder, would it be perhaps possible to update LanguageMenu like this adding ListView to the po-pup component where alternate layouts could be selected and if triggered each language QML file in plugins/language/qml could do something like this:

	Component.onCompleted: {
		languageMenu.allowAlternateLayouts([
			{
				name: "qwertz"
				action: function() {
					setLayout("qwertz");
				}
			},
			{
				name: "qwerty"
				action: function() {
					setLayout("qwerty");
				}
			}
		]);
		
		setLayout(usedLayout || null);
	}

Keyboard_cs.qml

Of course things like saving the set value, and retaining it in between different layouts (url/email/search/normal) would have to be resolved and what's more it would be great if this could be selected from within the System Setting app but I am afraid a lot more radical change would be needed for that.

I would love to create a QWERTY layout for Czech but it feels bad to duplicate the whole structure for it again.

I am sure there are way better ways to deal with this though.

Add sensitivity adjustment for text selection/cursor movement modes

When moving the cursor or selecting text with the respective mode I find I always overshoot my target and then move the cursor back and forth a few times before I can get the cursor in the intended spot.

It would be really nice if the sensitivity could be turned down (or up for some I suppose) a bit. My fat clumsy fingers could use the help.

Add arrow keys to many layouts

If I remember correctly is it possible to add arrow keys in maliit layouts. I think it would be very useful to have them outside terminal.

I do not know in what position they would best fit, I think it could be feasible to have them in a third symbol level and at the same time in appropriate letter popups.

What do you think?

unable to build keyboard-component with crossbuilder

I am using BQ E5 with RC 16.04 2018-W51.
Fresh install of Ubuntu 18.04, installed lxd as deb, not snap.
Flashed my phone recently with RC 16.04 2018-W51, and earlier RC 16.04 2018-W48.

Steps to reproduce

  • clone the repo xenial branch i.e. by running
    git clone --single-branch --branch xenial https://github.com/ubports/keyboard-component.git
  • download and install crossbuilder as described here
  • plug in your phone, developer mode enabled
  • run crossbuilder
    crossbuilder --password='yourpassword'
  • reboot phone

expected behavior:
the keyboard is working

actual behavior:
the number keyboard at the login screen does show up without numbers (screenshot below), therefore I am not able to log into my phone --> ubport-installer is your friend, just flash your phone and it works again ;-)
Before OTA 6 with master branch the keyboard would show up blank.

It does seem to build a 15.04 deb (terminal output line 1701). That sort of matches the line (terminal output line 10):

dpkg-buildpackage: source version 0.100+15.04+ubportslocal~1545468642

The terminal output is here:
Terminal-output 2018-12-22.txt

Screenshot of disabled keyboard after reboot:

screenshot20181220_180218264

Typing bug. More pronounced on Facebook when 'mentioning' a person. Also a backspace issue.

From @tenleftfingers on June 22, 2017 12:34

I've noticed two problems when typing. It happens most on Facebook via the browser but I've also seen similar in the standard messaging app and other apps that accept text input.

It's hard to describe, so I'll leave a video at this link for now and try to keep it until the bug is closed.
https://www.dropbox.com/s/mvy8osp95isusrh/ut-typing-bug.mp4?dl=0

1: In FB when I mention someone (blue text appears) and press space, rubbish text is appended (always a part of their name). Sometimes waiting a few seconds before pressing space helps.
2: When I backspace, it takes away too much including the friends name I mentioned. Repeating the process doesn't help either and the problem has no workaround I can find.

This is the single biggest annoyance with Ubuntu Touch at the moment for me. It's not just a Facebook issue, but it's the one I remember and can reproduce the easiest. The backspace problem has happened to me when text messaging too where it became impossible to type certain things.

Aquaris E4.5.
Canonical OTA-15.

Copied from original issue: ubports/ubuntu-touch#125

Ghost keyboard also for selections

Would be very nice if the ghost keyboard (long pressed space bar) could appear also when a text is select so moving the limits of the selection would be more precisely.
Maybe the keyboard could be split in two: left for first cursor and right for the second one.
Another thing I thought is the ghost keyboard could remain until I press the space key, because selecting text could take more time imo...
hoping I explained enough well... ;)

Keyboard autocorrection improvals

Description of the feature

Intelligent autocorrection while typing

Illustrations

Ever since I've been using Ubuntu Touch (and it's the only Smartphone OS I#ve ever used, so please don't expect me to know anything about Android or iOS) I've been wondering why autocerrection is so bad. It almost never does help me in tyyping, instead, it appears to be constantly in my way. I have not disabled it, though, because I think it should be improving user experience on the phone – but really, it does not at this time.

Autocorrection on Ubuntu phone seems to be completely context-igrnorant (please correct me, if I'm wrong). Human language is stongly context dependant. Any character typed has certain characters that are more or less likely following. The autocorrection must obviously choose the most likely character for autocompletion. The same holds true for words: The beginning of a sentance very strongly determmines possible endlings. The autocorrection must suggest words that complete the sentence in a sensible way.

Using Ubuntu Phone / Ubuntu Tocuh / UBports I've always had the impression that none of these correlations are used at all for autocorrection? (Please comment, if you are a developer.)

This feature suggestion is about using well-known correlations in characters and words for improving autocorrection.

I'd expect that established OSes (The G-type and the A-type) have done tzzhis form tzhe start (as said above, I never tried them, but I honestly cannot imagine anything other).

Please improve autocorection an Ubuntu Touch to a state where it starts to begin getting userful -- it's rather annoying at this time.

ubuntu-keyboard-autopilot depends on libautopilot-qt

In order to resurrect autopilot tests for the apps (calendar app for example) we need an installable ubuntu-keyboard-autopilot package.
But atm ubuntu-keyboard-autopilot depends on libautopilot-qt which depends on autopilot-qt5 and autopilot-qt4. The latter is causing dependency issues and the further says it would replace libautopilot-qt. Michael Zanetti confirmed that depending on autopilot-qt5 instead of libautopilot-qt seemed to be the right move.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.