The keyboard is a living fossil and the alignment of its keys hints at the strange history of its origins. It took app economy darling SwiftKey to innovate it in a powerful new direction.

The seemingly-random arrangement of the letters on the keyboard had little to do with the needs of the typist. The first version of the keyboard, conjured by its inventor Christopher Latham Sholes in the late 1860s, had two simple rows of keys in alphabetical order.

But his original design exposed a problem lurking in the mechanism of these early typewriters. The metal arms - the typebars - on which the letters were mounted could jam if adjacent letters were hit in quick succession, which meant the letters that were most often used together in words had to be kept separate.

And so the arrangement of letters now known as Qwerty emerged. By the late 1870s, the pattern of keys that we still use today was more-or-less settled. Even the way the keys are arranged in staggered columns is an echo of the mechanical underpinnings of the early typewriters.

Qwerty was a compromise from the start. And as such you'd expect it to be swept away as the technology changed. And yet this odd layout became the standard, used since on billions of devices from typewriters to tablets and PCs. Even as the cold steel of the typewriter was replaced by the cool glass of a touchscreen smartphone, Qwerty has continued to dominate.

That is, until now.

Image: Lyndsey Gilpin/TechRepublic

A number of companies are rethinking the keyboard for the digital age, led by a small UK startup called SwiftKey, so that a mere 150 years after it was first created, the keyboard could finally be made to behave just how the user wants it to.

SwiftKey's eponymous keyboard app supercharges the traditional keyboard. It uses an algorithm built by analysing huge amounts of text to predict what you are trying to type, and what you want to type next. For example, take the phrase "how are you?" When you type "how" into Swiftkey, it automatically offers "are" as the next word (before you type a thing). All you have to do is tap it. And if you do tap it, then it will automatically offer "you" as the next word. So you will have typed one word, "how," and then gotten the whole phrase "how are you" with a couple of taps.

The more you use the app the more it learns from your typing to pop up suggestions (which appear above the keyboard) tailored to you - for example, common names you use, or even emojis.

A second element of the SwiftKey app - called Flow - eschews the tip-tap of typing for sliding your finger across the letters on the smartphone keyboard to create words from a colourful, seductive swirl. It's shorthand traced with a sparkler. The aim of all this: to make typing as simple and as human as possible, and to replace 'shrinking typewriters' with something much more useful.

The app has been a runaway success on Android smartphones. It was the best-selling paid app on Google Play in 2012 and 2013 (to put that in context, there are about 200,000 paid apps on Google Play now).SwiftKey's technology features have been built into more than 200 million smartphones, and the company says it has grown revenues five-fold year-over-year. It now has150 staff and offices in Seoul and San Francisco in addition to its London headquarters. The app is available in more than 60 languages, including Japanese, making SwiftKey one of London's hottest startups.

The company calculates its users have written 4.4 trillion characters using its apps and saved over a trillion keystrokes by using its technology, which it reckons is the equivalent of 16,000 years of typing.

Nobody has worked out how many red faces it has saved globally by averting damn-you-autocorrect style howlers, but there's likely to be plenty of that, too.

An app company

But beyond the raw numbers what makes the story of SwiftKey even more interesting is that the rise of the company and its keyboard also embodies some of the key trends in the tech industry right now; the explosive growth of the smartphone and Android and the emergence and evolution of the app economy.

SwiftKey itself also continues to evolve, making a big gamble on the transition from being a paid-for app to embracing the freemium model and -- soon -- finally making an appearance on iOS.

The keyboard might seem like a rather dowdy element of the smartphone, but Jon Reynolds, SwiftKey's founder and CEO, argues that the keyboard has plenty of strategic potential.

"What's interesting is that it's one of those parts of the phone which is used all the time. The phone is used something like 150 times a day and [for] a huge amount of it you have the keyboard open," Reynolds said over coffee at the company's headquarters in London.

SwiftKey's London office is housed in a non-descript squat office block unfashionably south of the river, by the side of a busy, grimy road and far from the glamour of Hoxton's Tech City. Inside, the air is hard working and earnest - developers spill out of meeting rooms (one is called Turing) and work on sofas, fuelled by a steady supply of coffee and sweet treats.

For Reynolds, his eureka moment came in a very different and unlikely setting: a room full of lawyers. Reynolds was then a 22-year-old civil servant.

"We very quickly realised that people have Qwerty wired into their brains." Ben Medlock, SwiftKey CTO

"I had done a physics degree undergrad and a lots of friends were going into banking and management consultancy, so trying to be different, I went off into the civil service," he said.

He was sitting in a meeting and noticed a lawyer ineffectually pecking away on a BlackBerry keyboard. "There was something about that moment which captured something, that typing needed to be improved on phones," he remembers.

Reynolds started working on the problem at home and mentioned it to his friend Ben Medlock, who he had met at Cambridge University and who, as luck would have it, was not only intrigued but also had a background in artificial intelligence and natural language processing, making him an ideal co-founder and CTO for the company.

Medlock said the key breakthrough they had, right at the start, was the realisation that building a better keyboard was not about how to lay out the keys or how to arrange the characters. It was about how to capture the way people use language.

Their first instinct had actually been to dump the Qwerty keyboard and to come up with something radical and optimised for touchscreen devices. They quickly realised this was the wrong approach.

"We very quickly realised that people have Qwerty wired into their brains and that layout is almost as familiar to them as speaking. It really is that fundamental an element of people's communications lives," he said.

Instead, they focused on the problem of how to capture the way we use language and how to build that into the software that sits behind the keyboard and makes predictions.

This meant approaching the problem from two different directions. The first thing Medlock needed was a huge source of information about how people use language, so he used the European Grid - a huge massive parallel computing network built to analyse data from the Large Hadron Collider data -- to extract all the publicly available texts off the internet in different languages. This formed the basis of the background model.

The second element was to build the personalised individual-specific element that recorded and understood the foibles of each individual user - how we hit the keys, the way we commonly misspell things, etc.

"That individual bit is both about what kind of word[s] you use and the context you use them in and how to blend that with this background usage, but it's also about how you interact with your phone. When we capture the ways you tap on your own screen, can we model almost an individual fingerprint of your perception of the keyboard to make the experience more accurate for you," Medlock explained.

For examples, if you regularly tap the "i" a little to the left and it picks up the "u" instead (and you subsequently correct it), then SwiftKey sees that and knows when you makes that tap that you mean to get an "i" so it learns that and starts giving you the "i" when you tap there.

"It's actually phenomenal what you can do; every time you select a word on SwiftKey it's updating all of these geometric models about the way you interact with the touchscreen. It's remembering the use of the language and using that to influence the language models. There's a huge amount going on," he explained.

Image: SwiftKey

SwiftKey also caught a huge break. While Medlock was working on making the keyboard smarter, smartphones, with their vastly greater computing power, were beginning to replace feature phones, which had used a more basic form of predictive text. That meant that the complex personalisation and language processing could now be done on the phone itself.

It took the duo 18 months to go from the idea phase -- at first living off savings and then winning grants from the government's Technology Strategy Board -- to having a prototype that could be shown off at Mobile World Congress, the industry mega-conference in Barcelona. Reynolds says with a smile that in hindsight that phase would now take three to six months "just because of all the experience we've gained from having built a company the first time."

The first version of SwiftKey was built on Android, which was in itself a leap of faith, since in 2010 it was not the huge player it is today.

"Whatever company you look at there's brilliance and skill but there's also the element of luck and timing," said Reynolds. And the company's debut would feature all of those elements.

SwiftKey's timing was nothing short of perfect. Making the early bet on Android meant that as Google's mobile operating system took off, SwiftKey was carried along too.

If they had started work on SwiftKey a year earlier they might have built the first version on Windows Mobile or Symbian, says Reynolds. If they had been a year later SwiftKey would have been just another Android app desperate for attention.

"It was pretty obvious Android was going to be big. The question was how quickly would it scale?" said Reynolds.

The initial plan was to license SwiftKey's predictive technology to handset vendors, but vendors wanted some proof that their users were really interested in this sort of add-on, which meant SwiftKey also had to build a paid-for app, even though it was still relatively early days for the app economy.

"SwiftKey was almost built out of the necessity that we could show these partners the value of our technology, and so then we launched SwiftKey as a consumer app, and incredibly, it ended up being a top ten app almost straight away," said Reynolds.

This also made conversations with vendors a lot easier - the company now has licensing deals with more than 20 manufacturers including Android giant Samsung.

"Often people look from the outside and just see an app company they don't realise we've got a sophisticated B2B team and business alongside the consumer business. It actually makes the business probably more complex at its size than lots of other businesses," Reynolds said. It is this B2B focus that has given Swiftkey the scale it has because many of its customers will be using white-labeled versions of its predictive technology.

Changing the business model

But since SwiftKey's breakthough, the mobile market has changed again. While SwiftKey's initial success came through its paid-for app, now the momentum is with free apps that allow users to buy additional elements later on. According to app analytics company App Annie, 98% of total worldwide Google Play revenue in May 2014 came from free apps.

"The freemium business model [has] advanced its domination of Google Play app revenue, and represents a growing proportion of downloads," it notes.

"Every time you select a word on SwiftKey it's updating all of these geometric models about the way you interact with the touchscreen." Ben Medlock, CTO

As such perhaps it's not surprising that in June, SwiftKey decided to join the freemium world, ditching the $3.99 app price and instead aiming to making money from in-app purchases like custom keyboards known as 'themes'. (At the same time the app was updated so it can now predict the emojis you are likely to want to use too :).

The move is also aimed at targeting a new audience in developing economies like India or Brazil, who might be more wary about paying upfront. So far it has seen more than 12 million downloads of the new themes.

It might seem to be a gamble to give up a guaranteed revenue stream in the hope that users can be persuaded to spend money on upgrades. But Reynolds says that customised keyboards are one of the top requests the company gets, and points out that when SwiftKey first got started, in-app purchases weren't even an option.

"In the short term we'll experiment with having the SwiftKey store, in-app purchasing and see how that goes and our sense is that as the business grows and as the user base grows that revenue should surpass what we were getting previously from having a top paid app."

Another big change is coming too. Right now SwiftKey isn't able to offer a standalone keyboard on iOS, because Apple hasn't allowed it. Earlier this year the start-up launched a note taking app - SwiftKey Note - which allowed it to show off at least some of its predictive technology on iPhones, with the aim of showing off the potential of its technology to iPhone users (and to other developers). But -- fortunately for SwiftKey -- this was superseded by Apple's announcement that iOS 8 will allow third-party keyboards on iOS devices.

The new operating system, due later this year opens the way for SwiftKey and others to offer the same keyboard options to Apple fans as it has been for Android. It's a new market of hundreds of millions of potential new customers who download billions of apps.

And while there are still many more Android devices around, for a company like SwiftKey a more relevant metric is that Apple fans spend more on apps. According to App Annie, in the second quarter of this year iOS App Store provided around 80 percent more revenue than Google Play.

Image: SwiftKey

"For us this is a really huge opportunity," admits Reynolds. "It's great news for us and we are working hard to be ready for that launch. We've always thought there's a huge opportunity to improve typing on every device. We are very confident we'll bring a high quality product to the iOS platform as well as Android."

But it's not all good news. iOS 8 will also see the debut of Apple's own predictive keyboard called -- ahem -- QuickType, which it promises "the biggest changes to the keyboard since the very ﬁrst iPhone." As such, Apple may have opened the door, only to slam it in the faces of eager rivals.

Perhaps wisely, it's not just iOS that SwiftKey is looking at. It's also signed deals to put its keyboard on other devices. Earlier this year it announced a deal to put its keyboards on the AX1, an in-car entertainment system built by Clarion, and it has also launched a version of SwiftKey for healthcare.

"Would we love to be on every device in cars, on TVs, wearables, phones, PCs. Obviously, we want to be everywhere. Right now while we have deployed our technology in markets like the healthcare market and cars, I think most of our focus stays on smartphones," said Reynolds.

The future of the keyboard

But if changes in the technology world are boosting the potential for SwiftKey, another development threatens it: voice control is finally coming of age. Smartphone users are increasingly comfortable with talking to Siri or Google Now rather than typing in every question. Could the keyboard be running out of time?

Unsurprisingly, both Reynolds and Medlock say no.

"No one is still using a quill but we're still using pens and we're still writing. So it may not look exactly the same as it does today but will we still have something that we gesture or tap to input text into an electronic device? Probably yes," said Reynolds.

"Whatever company you look at there's brilliance and skill but there's also the element of luck and timing." Jon Reynolds, SwiftKey CEO

There are certain situations where voice makes sense - when you are driving for example. But equally, there are plenty of situations where talking to a smartphone isn't very productive. For example, in a noisy room or on a train. (One very modern vision of hell is forever being trapped on a train listening to someone asking their phone the same question over and over again.)

Medlock has a more thoughtful take on the survival of the keyboard: that it will stick around because we've been using our hands to create language for thousands of years.

There's lots of debate about whether handwriting or typing is better for creativity. Some writers insist on handwriting or typewriting because it requires them to create sentences fully formed since re-writing and editing is so laborious. They say that the deficiencies of the technology can be harnessed as a way of policing the creative process.

But perhaps anything that lets you get the ideas out onto paper - or onto a screen - faster is probably making the creative process easier, or at least more likely.

"If you think about the evolution from handwriting to typing cognitively there's not a huge leap there, you are still effectively processing text which your eyes are watching being written. Your brain is able to focus on the language as it's being created, whereas you can imagine the move from typing to voice is a much more significant one in terms of the way the brain processes it," Medlock says.

The next evolution of SwiftKey

In September last year, SwiftKey added $17.5m in a series B investment round led by Index Ventures, adding to the $4m in equity funding it had received to that point, with the aim of launching new products and expanding further into the US. Reynolds has relocating to San Francisco to oversee the company's US rollout.

There is certainly a sense that SwiftKey is preparing to flex its muscles. Many of its customers up until now have been as the result of white-labelling its technology to smartphone vendors. It wants to go beyond that and use the keyboard and its machine learning smarts to provide more services based on natural language processing.

Image: SwiftKey

Reynolds talks of SwiftKey as a "platform" with the keyboard offering the company a beachhead, allowing it to offer other services on top. It's an interesting and ambitious proposition, but with no control over the rest of the operating system it is a slender base -- a finger-tip hold -- on which to build, while aiming to reach a billion users.

Perhaps this is why Reynolds echoes Winston Churchill, someone else who found themselves with a slender beachhead, when asked about the future: "The sense we have now is that we really are only at the end of the beginning and this business model change [to freemium] is a real opportunity to accelerate further."

He added, "I think that success for us would look like having everyone using our software but actually delivering a lot more value to those users through the keyboard and the services we can offer to them. That vision feels a lot more tangible and achievable than it did five years ago."