How to copy phone layout to tablet layout

Hi there. I just put in a lot of work into the phone keyboards layout, and would like the tablet layout to be exactly the same (with the possible exception of adding a number row).

Is there an easy way to accomplish this without redoing everything manually? I wonder if I could just go to the Code tab, copy everything in the “phone” brackets, and overwrite everything in the “tablet” brackets, but I thought it would be better to ask first. Here is the code from the Code tab as it is now.

What would be the best way to go about this?

Thanks so much!

If you want the tablet to be exactly the same, there is no need to add a separate layout. If there’s only a phone layout it will work on both tablet and phone. We don’t encourage duplicating it, because that just makes maintenance harder.

However, if you want to duplicate it, you could add a tablet layout, then go into the code view and copy the code. This is very error prone since you may not copy enough text, or not get all the commas, etc. So make sure you have made a copy of the working version before you start editing in code view.

With Keyman Developer 17.0.295-beta and a keyboard with just a “phone” layout, I clicked on the “+” button under Platform and was able to add a “tablet” layout that seems to be a copy of the existing “phone” layout.

Editing the source code as you propose should work, provided you carefully follow Lorna’s advice. If, however, you’re willing to upgrade to Developer 17 (currently still in beta testing), that might be an easier and safer option than editing the underlying source.

Keyman Developer 16 should copy the current (phone) layout when you add a tablet layout.

Ok. Since my project came with a tablet layout, I would just delete it, and re-add it? Thanks!

Yes, precisely (and post must be at least 20 characters so I added this parenthetical)

1 Like

Thanks. It worked perfectly! And adding the number row by clicking on the green triangles turned out to be a fairly straightforward process too. Neat app!