WEBVTT
Kind: captions
Language: en-GB

1
00:00:00.170 --> 00:00:03.220
A lot of techies are surprised when
I say I mostly use Windows.

2
00:00:03.220 --> 00:00:06.480
Why would anyone who writes code
and edits video use Windows?

3
00:00:06.480 --> 00:00:08.800
Two reasons: one, it's cheaper.

4
00:00:08.800 --> 00:00:10.780
And two: it lets me bodge.

5
00:00:10.780 --> 00:00:14.260
So sit back, 'cos, yes, I'll tell
you how I made the emoji keyboard,

6
00:00:14.260 --> 00:00:18.700
but more importantly, I will
tell you about the art of the bodge.

7
00:00:20.520 --> 00:00:25.400
Bodging is a wonderful British word that means
to patch together, to make temporary repairs.

8
00:00:25.400 --> 00:00:29.580
A bodge is clumsy, it's inelegant,
it'll fall apart, but it'll work.

9
00:00:29.580 --> 00:00:33.640
And it'll keep working as long as there's someone around to bodge it again if it breaks.

10
00:00:33.640 --> 00:00:38.060
You know that bit in Apollo 13 where they have to fit the square peg in the round hole?

11
00:00:38.060 --> 00:00:42.980
That is a bodge. Actually, that's possibly the greatest bodge in human history.

12
00:00:42.980 --> 00:00:45.980
In fact, if you can think of a better one,
let me know in the comments,

13
00:00:45.980 --> 00:00:49.920
'cos there's probably a book
on Great Bodges of History

14
00:00:49.929 --> 00:00:52.489
to be written there, and I'd quite like to
be the one to write it.

15
00:00:52.489 --> 00:00:56.489
Anyway. Bodging has always sort of been how I make things.

16
00:00:56.489 --> 00:01:00.300
I didn't study computer science,
I'm not writing elegant solutions here,

17
00:01:00.300 --> 00:01:02.400
I patch things together.

18
00:01:02.400 --> 00:01:07.060
The important stuff-- backups, password security--
I make sure I get that right...

19
00:01:07.060 --> 00:01:10.500
but stuff I'm making for fun, I bodge.

20
00:01:10.500 --> 00:01:14.460
Now I learned to properly Bodge when I was
filming a TV show a few years ago.

21
00:01:14.460 --> 00:01:17.300
Some of that show's made it online,
I'll put links in the description,

22
00:01:17.300 --> 00:01:21.759
but stick with me for now, 'cos you
need to know some context about it.

23
00:01:21.759 --> 00:01:27.549
I was filming with two people. Colin Furze,
who you might know off YouTube, he makes ludicrous,

24
00:01:27.549 --> 00:01:31.869
big, exploding physical things, and he has
the land speed record for a mobility scooter.

25
00:01:31.869 --> 00:01:34.369
And then there was
Charles Yarnold, who makes

26
00:01:34.369 --> 00:01:37.629
intricate microelectronics with
Arduinos and circuit boards.

27
00:01:37.629 --> 00:01:42.420
Like, last year Charles made
Barack Obama's Christmas tree.

28
00:01:42.420 --> 00:01:46.040
And people could go online to
customise the colours and patterns

29
00:01:46.040 --> 00:01:49.440
of the twinkly lights that went
up and down it. It was wonderful.

30
00:01:49.440 --> 00:01:54.880
And my job on the TV show was to be the bridge
between those two, between Colin and Charles,

31
00:01:54.880 --> 00:01:58.660
to get the creations that they physically fabricated

32
00:01:58.660 --> 00:02:01.600
working with the world and with each other.

33
00:02:01.600 --> 00:02:04.240
So when we made a remote control
for a horse --

34
00:02:04.240 --> 00:02:06.360
I'm not kidding, we made
a remote control for a horse --

35
00:02:06.360 --> 00:02:09.140
Colin built the framework for a robot jockey,

36
00:02:09.140 --> 00:02:13.300
Charles made all the circuits and relays to have it
pull the reins when it got signals,

37
00:02:13.300 --> 00:02:18.280
and I built a smartphone app that let you
send those signals to let you steer a horse.

38
00:02:18.280 --> 00:02:19.900
And it worked!

39
00:02:19.900 --> 00:02:23.180
And I probably had the easiest job of the
three of us, 'cos when I made things,

40
00:02:23.180 --> 00:02:25.920
I had an undo button.

41
00:02:25.930 --> 00:02:30.910
But the key part was this:
we were building prototypes.

42
00:02:30.910 --> 00:02:34.640
They had to work for one day of filming,
and we'd be there for it.

43
00:02:34.640 --> 00:02:38.540
But they HAD to work on that day,
or the TV show would be terrible

44
00:02:38.540 --> 00:02:42.980
and we'd have wasted a lot of money.
And we had basically no time to build there.

45
00:02:42.980 --> 00:02:47.460
We were working 16-hour days, 7-days
a week, and by the end of production,

46
00:02:47.460 --> 00:02:50.600
we had no time. We were bodging.

47
00:02:50.600 --> 00:02:55.020
And the bit of software that helped me, on
that show and since, more than anything else,

48
00:02:55.020 --> 00:02:56.900
was called AutoHotKey.

49
00:02:58.549 --> 00:03:04.909
AutoHotKey is such a good bodging tool that
it sometimes gets detected as a virus.

50
00:03:04.909 --> 00:03:08.949
AutoHotKey was originally meant to
be really, really simple:

51
00:03:08.949 --> 00:03:11.940
it waits until the user presses a certain key,

52
00:03:11.940 --> 00:03:14.660
and then it starts a program,
or it types some longer text,

53
00:03:14.660 --> 00:03:18.800
or it presses a more complicated series of
key commands that'd be really difficult otherwise.

54
00:03:18.800 --> 00:03:23.300
Like, if you wanted your F10 key to make your
video game character suddenly spin 180 and fire?

55
00:03:23.300 --> 00:03:26.440
Got it. No problem. AutoHotKey was it.

56
00:03:26.440 --> 00:03:29.820
The thing is, AutoHotKey grew and
grew and grew and grew.

57
00:03:29.820 --> 00:03:33.500
And its scripting language,
the stuff you have to write in to make it work,

58
00:03:33.500 --> 00:03:36.080
is terrible. I mean really awful.

59
00:03:36.080 --> 00:03:38.100
It was meant to do just really simple things,

60
00:03:38.100 --> 00:03:40.600
and over time it's gained the ability to do so much.

61
00:03:40.600 --> 00:03:44.160
It can read files, it can look at
the colour of individual pixels on screen,

62
00:03:44.160 --> 00:03:46.240
it can call arbitrary Windows DLLs,

63
00:03:46.240 --> 00:03:49.340
it can parse regular expressions,
for anyone who knows what those are.

64
00:03:49.340 --> 00:03:54.640
But it's all in this weird non-standard
way that is inspired by Visual Basic.

65
00:03:54.640 --> 00:03:58.240
AutoHotKey is a bodge that
helps you make other bodges.

66
00:03:58.240 --> 00:03:59.640
But it works!

67
00:03:59.640 --> 00:04:02.020
And it means that instead of
having to spend hours of time

68
00:04:02.020 --> 00:04:05.320
diving into complicated
operating-system-level stuff,

69
00:04:05.320 --> 00:04:08.920
you just write a few lines of script
and it does the job.

70
00:04:08.920 --> 00:04:15.340
I used AutoHotKey, on the TV show,
to control the release of a skydiver's parachute.

71
00:04:15.349 --> 00:04:21.040
And it worked. I mean, really well.
I mean, we had a reserve, but it worked.

72
00:04:21.040 --> 00:04:25.720
The greatest bodge I ever pulled for that
TV show involved, and I swear this is true,

73
00:04:25.720 --> 00:04:29.180
a voice synthesiser and a
copy of Sibelius on a Mac

74
00:04:29.180 --> 00:04:32.400
being remote-controlled by
AutoHotKey on a Windows PC,

75
00:04:32.400 --> 00:04:34.760
which was blindly dragging the mouse around

76
00:04:34.760 --> 00:04:38.160
doing pre-recorded movements
through a remote desktop connection,

77
00:04:38.160 --> 00:04:43.000
while another PC fired commands to a
Google Chrome window open on the Mac over Wi-fi,

78
00:04:43.000 --> 00:04:47.180
because AppleScript and all the similar tools for Mac that we needed to run on Sibelius

79
00:04:47.180 --> 00:04:51.420
just weren't up to doing something that ridiculous.

80
00:04:51.420 --> 00:04:57.760
By the way, if anyone out there
suggests using Linux... no.

100
00:04:58.680 --> 00:05:01.460
The world loves emoji.

82
00:05:01.460 --> 00:05:04.100
I mean, seriously.
Individual people might not, sure.

83
00:05:04.100 --> 00:05:06.940
I don't really use them myself,
despite the keyboard,

84
00:05:06.940 --> 00:05:11.040
but the world loves them. People click on
headlines about emoji.

85
00:05:11.040 --> 00:05:15.940
Just putting the word in a headline
means you get way, way more hits on it.

86
00:05:15.940 --> 00:05:20.720
Emoji is basically the Donald Trump of computers.
There's a joke that won't date well.

87
00:05:20.720 --> 00:05:25.280
The very name is clickbait, you don't really need anything else on top of it.

88
00:05:25.280 --> 00:05:27.960
My friend Matt -- who's behind the camera
right now -- say hi, Matt.

89
00:05:27.960 --> 00:05:28.700
[MATT: Hi!]

90
00:05:28.700 --> 00:05:33.540
Matt and I made an emoji-only messenger last
year. And hardly anyone used it.

91
00:05:33.540 --> 00:05:35.780
Huh. That's not true.

92
00:05:35.780 --> 00:05:38.420
Loads of people used it...
for about five minutes

93
00:05:38.420 --> 00:05:42.040
before they realised it was utterly impractical
and never opened it again.

94
00:05:42.040 --> 00:05:45.500
But you should have seen the
press coverage, the emails we got!

95
00:05:45.500 --> 00:05:49.020
We even got confused investors
thinking it was a startup

96
00:05:49.020 --> 00:05:51.560
and emailing us to talk about equity.

97
00:05:53.140 --> 00:05:57.240
So this year, movie studios were bidding on
an emoji-based pitch.

98
00:05:57.240 --> 00:05:59.240
Not mine, sadly. I wish I'd thought of it,

99
00:05:59.240 --> 00:04:58.680
because they got nearly
a million dollars for it.

100
00:04:58.680 --> 00:05:01.460
The world loves emoji.

101
00:06:04.420 --> 00:06:07.200
And here's the thing: the concept
of emoji, as we know it today,

102
00:06:07.200 --> 00:06:10.140
as is on this keyboard, is a bodge.

103
00:06:10.140 --> 00:06:11.780
You know, you might know the story.

104
00:06:11.780 --> 00:06:15.100
Around the world, every language
had a different way of translating

105
00:06:15.100 --> 00:06:19.120
between letters and binary code,
1s and 0s, for computers.

106
00:06:19.120 --> 00:06:22.020
Now Japan had a bit of space
in its text encoding scheme,

107
00:06:22.020 --> 00:06:24.800
they've got a lot more characters
than the Latin alphabet anyway,

108
00:06:24.800 --> 00:06:27.640
so adding a few more wouldn't
really have been a problem.

109
00:06:27.640 --> 00:06:29.560
And some clever engineer thinks,
"Hang on,

110
00:06:29.560 --> 00:06:33.800
"we can put little pictures in our text encoding,
we can let people send those,

111
00:06:33.800 --> 00:06:37.000
"and we can send pictures without
actually having to send pictures

112
00:06:37.000 --> 00:06:38.960
with all the bandwidth that entails."

113
00:06:39.500 --> 00:06:41.700
So there are a few competing versions of that,

114
00:06:41.700 --> 00:06:46.200
but they never left Japan until the
Unicode Consortium came along.

115
00:06:46.200 --> 00:06:48.760
Now, the Unicode Consortium's job
is to go to every country

116
00:06:48.760 --> 00:06:51.380
to work out how they encode text into binary,

117
00:06:51.380 --> 00:06:56.600
and turn all of these hundreds of competing approaches into one big worldwide standard.

118
00:06:56.600 --> 00:07:00.160
The most amazing thing about it
is that for the most part,

119
00:07:00.160 --> 00:07:02.880
they actually managed to make that work.

120
00:07:02.880 --> 00:07:05.220
But Unicode was meant to be two-way.

121
00:07:05.220 --> 00:07:08.420
You convert text into Unicode,
then convert it back out

122
00:07:08.420 --> 00:07:11.960
into your country's old legacy system,
and nothing should be lost.

123
00:07:11.960 --> 00:07:15.420
So the Unicode team get to Japan
and they go, "Oh, you've...

124
00:07:15.420 --> 00:07:18.200
"You've put pictures in your text. Okay, um...

125
00:07:18.200 --> 00:07:21.800
"We can deal with that. We'll add them
to the standard as little glyphs.

126
00:07:21.800 --> 00:07:25.100
That's fine. We had a smiley face
in there anyway. No-one'll notice."

127
00:07:25.110 --> 00:07:30.130
And no-one does notice, really, for a while,
until Apple, who want to sell iPhones in Japan,

128
00:07:30.130 --> 00:07:33.350
quietly add emoji as a...
a fairly hidden option.

129
00:07:33.350 --> 00:07:34.770
But as soon as one person notices,

130
00:07:34.770 --> 00:07:37.810
"Hey, I can send little
piles of poo to my friends."

131
00:07:37.810 --> 00:07:39.990
All their friends go, "Oh wow!
How do you turn that on?"

132
00:07:39.990 --> 00:07:43.910
And suddenly you have this kind of
ready-made viral explosion of piles of poo.

133
00:07:45.780 --> 00:07:48.240
Which I guess is norovirus.

134
00:07:50.140 --> 00:07:55.480
So suddenly the world has emoji, and
America is all, "What the hell are these?"

135
00:07:55.480 --> 00:07:59.060
'Cos they're used to having consumer electronics,
text encodings, everything...

136
00:07:59.060 --> 00:08:02.200
designed by America, for America.

137
00:08:02.200 --> 00:08:05.400
They have no idea what the
cherry-blossom stamp is,

138
00:08:05.400 --> 00:08:08.420
or why there's a rice ball
emoji, but no burrito.

139
00:08:08.420 --> 00:08:11.520
And they have no clue what
a love hotel is. Don't ask.

140
00:08:11.520 --> 00:08:15.460
'Cos bear in mind, these original ones
were designed decades ago,

141
00:08:15.460 --> 00:08:21.620
in Japan, for Japan, and there were
originally only about 100, maybe 150 of them.

142
00:08:21.620 --> 00:08:24.260
And America's like,
"Why can't we have a burrito emoji?"

143
00:08:24.260 --> 00:08:27.520
They mostly think it's an Apple thing,
not a international standard thing,

144
00:08:27.520 --> 00:08:32.560
so the Unicode Consortium suddenly finds itself
having to bodge in new emoji.

145
00:08:32.560 --> 00:08:35.440
And they have to bodge in
the flags of all nations,

146
00:08:35.440 --> 00:08:38.080
which is a really clever approach
where you're actually sending

147
00:08:38.080 --> 00:08:41.120
letters for country abbreviations,
but that's a separate thing.

148
00:08:41.120 --> 00:08:46.340
Then they realise every phone supplier has made the default emoji either yellow or just plain white,

149
00:08:46.340 --> 00:08:50.020
and realise they have to bodge in
what are now called skin tone modifiers.

150
00:08:50.020 --> 00:08:56.080
And let's face it: a one man, one woman, one boy,
one girl family is really stereotypical,

151
00:08:56.080 --> 00:08:59.579
so they make it so you can use something
called a zero-width joiner to

152
00:08:59.579 --> 00:09:04.750
any person characters you like and they will
come together into a single family emoji.

153
00:09:04.750 --> 00:09:09.220
You can do that with shift on this keyboard,
by the way, which I'm really proud of.

154
00:09:09.220 --> 00:09:11.980
And I know, I know someone out there
is about to comment,

155
00:09:11.980 --> 00:09:14.240
"Ooh, it's political correctness gone mad."

156
00:09:14.240 --> 00:09:16.360
No. No. To hell with that.
To hell with that.

157
00:09:16.360 --> 00:09:18.360
These are meant to be international.

158
00:09:18.360 --> 00:09:22.320
These are meant to be cross-cultural,
for everyone on earth.

159
00:09:22.320 --> 00:09:25.660
There had damn well better be those options,

160
00:09:25.660 --> 00:09:29.020
and thankfully, we are more or less there.

161
00:09:29.029 --> 00:09:33.169
But the emoji we have today
weren't designed as one worldwide thing.

162
00:09:33.169 --> 00:09:35.660
They're a bodge on top of a
bodge on top of a bodge.

163
00:09:35.660 --> 00:09:37.300
Cleverly done and standardised, sure,

164
00:09:37.300 --> 00:09:39.560
but they're a patchwork of rules.

165
00:09:39.560 --> 00:09:41.440
They've even got Wingdings in there now.

166
00:09:41.440 --> 00:09:43.460
That's why there's
Levitating Man in Business Suit,

167
00:09:43.460 --> 00:09:46.440
because that came from an American decision.

168
00:09:46.440 --> 00:09:49.640
And the latest version of iOS does
have a custom version of that in.

169
00:09:49.640 --> 00:09:53.900
You might even be able to add a
skin tone modifier to it, I'm not sure yet.

170
00:09:53.900 --> 00:09:57.040
So I get the idea for a physical emoji keyboard.

171
00:09:57.040 --> 00:09:59.360
I thought about trying a full-Unicode one,

172
00:09:59.370 --> 00:10:02.230
but I realised I would need hundreds and
hundreds and hundreds of keyboards,

173
00:10:02.230 --> 00:10:06.140
but you can just about fit all
1,200 or 1,300 or so emoji

174
00:10:06.140 --> 00:10:09.960
that are currently out there
onto 14 keyboards. So they're all here.

175
00:10:09.960 --> 00:10:13.440
Actually getting the stickers to print
correctly on my home inkjet was a bit tricky,

176
00:10:13.440 --> 00:10:16.740
but I got there, it was just a matter of
lining everything up properly

177
00:10:16.749 --> 00:10:19.860
and then spending several hours
sticking the damn things on.

178
00:10:19.860 --> 00:10:25.020
And thankfully, you can just plug 14 USB keyboards
into a Windows machine, through USB hubs,

179
00:10:25.020 --> 00:10:30.040
and it'll go, "Yeah, alright. I've got
14 keyboards now. That's cool."

180
00:10:30.040 --> 00:10:35.500
But the trouble is: all 14 keyboards,
as far as most programs here are concerned,

181
00:10:35.500 --> 00:10:38.440
are counted as the same keyboard.

182
00:10:38.440 --> 00:10:40.820
You don't get to see which Z key's been pressed,

183
00:10:40.820 --> 00:10:43.560
you just know a Z key has been pressed somewhere.

184
00:10:43.560 --> 00:10:48.500
And even AutoHotKey, my old reliable
standby, couldn't help me with that.

185
00:10:48.500 --> 00:10:51.040
So I started looking around for solutions.

186
00:10:51.040 --> 00:10:53.780
And there are low-level APIs,
programming interfaces,

187
00:10:53.790 --> 00:10:57.769
in Windows that let you see the
raw input as it comes in over the wires.

188
00:10:57.769 --> 00:11:01.019
Mac and Linux folks in the comments,
are going to be going, "Oh yeah...

189
00:11:01.019 --> 00:11:05.699
All you have to do is connect the flumberboozle
to the GKX virtual port, then write a--"

190
00:11:05.699 --> 00:11:08.439
No. No. Not going to do that.

191
00:11:08.440 --> 00:11:11.040
Because I got to the point of
installing Visual Studio on this

192
00:11:11.040 --> 00:11:12.740
and thinking of actually
learning the low-level stuff

193
00:11:12.740 --> 00:11:17.580
and I thought, "No. I run Windows.
Someone will have done this before."

194
00:11:17.580 --> 00:11:20.520
And sure enough, they had.

195
00:11:20.529 --> 00:11:23.589
Of all things: there is a program
called LuaMacros,

196
00:11:23.589 --> 00:11:26.720
and it's meant for the
flight simulator community.

197
00:11:26.720 --> 00:11:30.640
Flight simmers are amazing,
they will build entire fake cockpits

198
00:11:30.640 --> 00:11:33.260
with a hundred switches in them
so it's all accurate.

199
00:11:33.260 --> 00:11:37.260
And if they can't afford that, they'll want
to plug in multiple keyboards

200
00:11:37.260 --> 00:11:41.420
so it at least feels a bit like they've got
a fake cockpit with a hundred switches.

201
00:11:41.420 --> 00:11:44.360
And so LuaMacros exists, and it's wonderful.

202
00:11:44.360 --> 00:11:48.520
Because it is basically a
modified version of Lua,

203
00:11:48.520 --> 00:11:51.240
which is a weird but not
too weird programming language,

204
00:11:51.240 --> 00:11:56.760
with a load of extra functions grafted in to handle detecting different keyboards and keypresses.

205
00:11:56.760 --> 00:12:01.560
And because it's a full programming language,
you can do full-on programming in it!

206
00:12:01.569 --> 00:12:04.289
Which is fantastic!
I mean, I was overjoyed.

207
00:12:04.289 --> 00:12:08.860
Like, literally, dancing around my flat
when I first downloaded and ran LuaMacros.

208
00:12:08.860 --> 00:12:10.880
Which was partly because I was really happy,

209
00:12:10.880 --> 00:12:14.820
and partly because I had Aqua's first album on,
but that's beside the point.

210
00:12:14.820 --> 00:12:20.640
I could detect individual keys
from individual keyboards. Great!

211
00:12:20.640 --> 00:12:24.660
So here was the plan:
get each key's code.

212
00:12:24.669 --> 00:12:28.560
That's the number that gets sent to
the operating system when it's pressed.

213
00:12:28.560 --> 00:12:32.540
Put those in a list, from top left to bottom right,
all the way down one keyboard,

214
00:12:32.540 --> 00:12:35.480
ignoring the complicated ones
like Enter, Control and Alt.

215
00:12:35.480 --> 00:12:37.900
Then, when a key gets pressed, take the code,

216
00:12:37.900 --> 00:12:40.980
look it up in that list.
Remember what position it is.

217
00:12:40.980 --> 00:12:45.160
Then add to that the
total number of keys in that list

218
00:12:45.160 --> 00:12:48.720
multiplied by the number of the
keyboard it was pressed on.

219
00:12:48.720 --> 00:12:53.769
So if I hit the fifth key on the second keyboard,
that would come through as item 4 in the list

220
00:12:53.769 --> 00:12:58.490
and keyboard number 1 -- because computers
and programmers count from 0.

221
00:12:58.490 --> 00:13:02.590
So: fifth key. 0, 1, 2, 3, 4.

222
00:13:02.590 --> 00:13:05.050
Second keyboard: 0, 1.

223
00:13:05.050 --> 00:13:09.069
Plug all that into the formula,
and you'll find where you are on the list.

224
00:13:09.069 --> 00:13:13.149
And the reason we count from zero is because
it makes maths like that so much easier.

225
00:13:13.149 --> 00:13:16.609
Keyboard 1, times the 94 keys in the list, plus 4,

226
00:13:16.609 --> 00:13:19.720
means you want the 98th item
on a list starting from zero.

227
00:13:19.720 --> 00:13:22.080
The equation is just so much simpler...

228
00:13:22.089 --> 00:13:25.009
and it didn't work. It didn't work.

229
00:13:25.009 --> 00:13:26.959
It took me half an hour to find out why it didn't work,

230
00:13:26.959 --> 00:13:28.899
and the reason it didn't work is that Lua,

231
00:13:28.899 --> 00:13:32.659
unlike every other programming
language in modern times,

232
00:13:32.660 --> 00:13:35.940
counts from 1, not from 0!

233
00:13:35.940 --> 00:13:39.040
Half an hour. Half an hour that took me.

234
00:13:39.050 --> 00:13:43.130
I fixed the equation, and it worked.
So I loaded in the full list of emoji,

235
00:13:43.130 --> 00:13:45.800
in the order that I'd put them down on the keys,

236
00:13:45.800 --> 00:13:47.980
and I told LuaMacros, "When you get a key,

237
00:13:47.980 --> 00:13:49.840
"calculate that number like we just did,

238
00:13:49.840 --> 00:13:52.879
"look it up in the big list of emoji,
go down that many lines,

239
00:13:52.879 --> 00:13:55.219
and type that emoji."

240
00:13:55.220 --> 00:13:58.220
And it didn't work either.

241
00:13:59.420 --> 00:14:02.660
'Cos there are no emoji keys on a regular
keyboard. Of course there aren't.

242
00:14:02.660 --> 00:14:06.620
No-one has been ridiculous enough
to make an emoji keyboard yet.

243
00:14:06.620 --> 00:14:11.860
So there isn't a key combination
that will get you an emoji.

244
00:14:11.860 --> 00:14:15.999
Alright. There might have been swearing
at this point. Just a little.

245
00:14:15.999 --> 00:14:22.279
So. Okay. What next? Well, it turns out that
Windows has a way of writing special characters,

246
00:14:22.279 --> 00:14:26.139
and quite a few of you will remember it:
you hold down the Alt key,

247
00:14:26.139 --> 00:14:28.659
and you type numbers on the numeric keypad.

248
00:14:28.660 --> 00:14:33.160
That's not even from Windows,
that goes all the way back to original

249
00:14:33.160 --> 00:14:39.360
IBM PCs and BIOS and DOS,
okay, it's decades old. But it still works.

250
00:14:39.360 --> 00:14:42.320
Because Microsoft is obsessive
about backwards compatibility.

251
00:14:42.320 --> 00:14:45.780
You can still type those
like it was the late eighties.

252
00:14:45.780 --> 00:14:48.640
But then they realised, "Oh, now
we've got all those Unicode characters,"

253
00:14:48.640 --> 00:14:51.440
so they used a bodge.
They extended it to Unicode.

254
00:14:51.440 --> 00:14:55.520
You do a quick registry tweak,
you can type Alt, plus sign,

255
00:14:55.520 --> 00:15:00.540
and then a Unicode code point, and it will type it,
all the way up to emoji! Hallelujah!

256
00:15:00.540 --> 00:15:05.160
And I got that working, and it threw emoji
into Microsoft Word. And I was laughing.

257
00:15:05.160 --> 00:15:09.800
And then I tried it in a web browser,
like for Twitter, and it didn't work either...

258
00:15:09.800 --> 00:15:15.079
because that backwards compatibility means that Unicode code points only work in rich text boxes,

259
00:15:15.079 --> 00:15:18.100
things that allow formatting, not plain ones.

260
00:15:19.420 --> 00:15:22.720
Couple of hours went by at this point. Nearly there.

261
00:15:22.720 --> 00:15:25.240
I got quite frustrated. And I took a break,

262
00:15:25.240 --> 00:15:28.720
and I swear, at some point
while I was cooking dinner,

263
00:15:28.720 --> 00:15:31.400
it was like a light came on in my head,

264
00:15:31.400 --> 00:15:37.880
and the gods of bodging shone down upon me
and I shouted out loud, "AutoHotKey!"

265
00:15:37.880 --> 00:15:43.200
Yeah, that wasn't just a pointless ramble
about bodging earlier with AutoHotkey. AutoHotKey.

266
00:15:43.200 --> 00:15:47.120
Because it can't tell which keyboard
is being pressed, that doesn't matter.

267
00:15:47.120 --> 00:15:50.640
What it can do is type emoji.
It can look down the list of emoji,

268
00:15:50.640 --> 00:15:53.820
it can read a particular character from a line,
and it can enter it anywhere,

269
00:15:53.820 --> 00:15:56.600
'cos it doesn't use key presses,
it uses low-level Windows stuff.

270
00:15:56.600 --> 00:15:59.280
So. I have one program, LuaMacros.

271
00:15:59.280 --> 00:16:03.100
It can read the keyboards and
work out which emoji the user wants.

272
00:16:03.100 --> 00:16:07.020
And I have one program that, if we
already know which emoji the user wants...

273
00:16:07.020 --> 00:16:08.440
can type it.

274
00:16:09.920 --> 00:16:14.780
So it was bodging time.
Here's how this keyboard works:

275
00:16:14.780 --> 00:16:18.339
You press a key.
LuaMacros intercepts it on the way in,

276
00:16:18.339 --> 00:16:22.219
stops Windows actually typing the letter
or whatever's underneath it.

277
00:16:22.220 --> 00:16:26.920
It works out which number emoji you want,
and it saves that number to a file on disk.

278
00:16:26.920 --> 00:16:31.100
Then, it presses the F24 key.
That's right, there's an F24 key.

279
00:16:31.100 --> 00:16:33.920
It's not on my keyboard,
it's almost certainly not on your keyboard,

280
00:16:33.920 --> 00:16:38.560
but it's still a key that Windows can deal with
because backwards compatibility.

281
00:16:38.560 --> 00:16:42.520
And AutoHotKey is listening
for that F24 key and when it hears it,

282
00:16:42.529 --> 00:16:46.850
it reads that same file, the file that LuaMacros
just put the number in, it reads that number,

283
00:16:46.850 --> 00:16:51.670
it looks down the list of emoji,
and it types that emoji!

284
00:16:51.670 --> 00:16:55.630
That is how the emoji keyboard works,
that's why I use Windows,

285
00:16:55.630 --> 00:16:59.990
and that is the art of the bodge!

286
00:17:01.360 --> 00:17:03.360
One take!

287
00:17:04.450 --> 00:17:06.839
Thank you, Matt!

288
00:17:07.440 --> 00:17:09.440
[Translating these subtitles?
Add your name here!]

