It feels like just yesterday that we released the Raspberry Pi keyboard and hub to the world. Well, it turns out it’s been more than a year, and time really has flown for the next stage of this project, which brings four new language/country options: Portugal, Norway, Sweden, and Denmark. They’re available to buy now from Raspberry Pi Approved Resellers.
Raspberry Pi keyboards
The keyboard and hub has been a great success, with many users adopting our Raspberry Pi red and white colour scheme for their setup. As well as this satisfying uptake of the keyboard on its own, we’ve also sold tens of thousands of Raspberry Pi Desktop Kits which include a keyboard, alongside the official mouse, Beginners Guide and, of course, a Raspberry Pi.
If I say so myself, it’s quite a cool-looking desktop setup, with the boxes and cables all colour-coordinated.
We made the black and grey set up for users who own a black and grey Raspberry Pi case, but, with four out of five people choosing the red and white variant, it just goes to show what a bit of company branding can do for business!
We’ve found that the US keyboard is the most popular model, with over half our users choosing that option. As a Brit, I prefer the chunkier Enter key of the UK keyboard.
Easy to find
New variants
There is always a demand to support more users with keyboards to match their country and language so, as a second phase, we are announcing keyboards for the following countries:
Portugal
Norway
Sweden
Denmark
The new European Portuguese variant of our keyboard and hub
These new keyboards are available now in red and white, with black and grey options coming soon. They are just print changes from previously released variants, but the devil proved to be in the detail.
For example, we hoped early on that the Portuguese keyboard would suit users in Brazil too, but we learned that Brazilian and European Portuguese keyboard layouts are quite different. Given the differences between UK and US keyboard layouts, this really shouldn’t have surprised us!
There is a very subtle difference between the Norway and Denmark keyboards. I wonder if anyone can spot it?
Norway
Denmark
Spot the difference
We also discovered that a Finnish keyboard layout exists, but I couldn’t identify any differences between it and the Sweden keyboard. While I don’t speak Finnish, I do speak Swedish – an awesome language that everyone should learn – so I came to these investigations with a bit of relevant knowledge. I found that there are very small changes between different manufacturers, but no consistent differences between Finnish and Swedish keyboards, and ultimately I was guided by what Raspberry Pi OS expects as the correct function for these keyboards. I do hope I am right about these two keyboards being the same… I expect I’ll soon find out in the comments!
Our new Swedish keyboard. If you know of a way in which a Finnish keyboard should differ from this, please tell us in the comments
We know that many users are waiting for a Japan keyboard variant. We hardly ever talk about new products before they are released, but we’re breaking our rule, in this case, to let you know that we hope to have some news about this very soon – so watch this space!
I’d like to give special thanks to Sherman Liu of Gembird for the new key matrix design, and Craig Wightman of Kinneir Dufort for his patience in designing all the key print revisions.
Pick up parts of a spaceship, fuel it up, and take off in Mark Vanstone’s Python and Pygame Zero rendition of a ZX Spectrum classic
The original Jetpac, in all its 8-bit ZX Spectrum glory
For ZX Spectrum owners, there was something special about waiting for a game to load, with the sound of zeros and ones screeching from the cassette tape player next to the computer. When the loading screen – an image of an astronaut and Ultimate Play the Game’s logo – appeared, you knew the wait was going to be worthwhile. Created by brothers Chris and Tim Stamper in 1983, Jetpac was one of the first hits for their studio, Ultimate Play the Game. The game features the hapless astronaut Jetman, who must build and fuel a rocket from the parts dotted around the screen, all the while avoiding or shooting swarms of deadly aliens.
This month’s code snippet will provide the mechanics of collecting the ship parts and fuel to get Jetman’s spaceship to take off. We can use the in-built Pygame Zero Actor objects for all the screen elements and the Actor collision routines to deal with gravity and picking up items. To start, we need to initialise our Actors. We’ll need our Jetman, the ground, some platforms, the three parts of the rocket, some fire for the rocket engines, and a fuel container. The way each Actor behaves will be determined by a set of lists. We have a list for objects with gravity, objects that are drawn each frame, a list of platforms, a list of collision objects, and the list of items that can be picked up.
Jetman jumps inside the rocket and is away. Hurrah!
Our draw() function is straightforward as it loops through the list of items in the draw list and then has a couple of conditional elements being drawn after. The update() function is where all the action happens: we check for keyboard input to move Jetman around, apply gravity to all the items on the gravity list, check for collisions with the platform list, pick up the next item if Jetman is touching it, apply any thrust to Jetman, and move any items that Jetman is holding to move with him. When that’s all done, we can check if refuelling levels have reached the point where Jetman can enter the rocket and blast off.
If you look at the helper functions checkCollisions() and checkTouching(), you’ll see that they use different methods of collision detection, the first being checking for a collision with a specified point so we can detect collisions with the top or bottom of an actor, and the touching collision is a rectangle or bounding box collision, so that if the bounding box of two Actors intersect, a collision is registered. The other helper function applyGravity() makes everything on the gravity list fall downward until the base of the Actor hits something on the collide list.
So that’s about it: assemble a rocket, fill it with fuel, and lift off. The only thing that needs adding is a load of pesky aliens and a way to zap them with a laser gun.
You can read more features like this one in Wireframe issue 40, available directly from Raspberry Pi Press — we deliver worldwide.
And if you’d like a handy digital version of the magazine, you can also download issue 40 for free in PDF format.
Make sure to follow Wireframe on Twitter and Facebook for updates and exclusive offers and giveaways. Subscribe on the Wireframe website to save up to 49% compared to newsstand pricing!