Skip to content

Commit

Permalink
add French keyboard layout
Browse files Browse the repository at this point in the history
  • Loading branch information
rsn8887 committed Jan 13, 2019
1 parent bd43c43 commit 1e86233
Show file tree
Hide file tree
Showing 12 changed files with 131 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0)
set(CMAKE_VERBOSE_MAKEFILE OFF)

set(VERSION_MAJOR 1)
set(VERSION_MINOR 87)
set(VERSION_MINOR 88)

if(BUILD_PSP2)
if (NOT DEFINED CMAKE_TOOLCHAIN_FILE)
Expand Down
11 changes: 8 additions & 3 deletions README.MD
Expand Up @@ -4,10 +4,9 @@ On the Switch, since v1.84, please use nsp injection to start uae4all2, otherwis

Changes in this version
======
1.87
1.88

- improve savestate thumbnail quality
- rename joystick port option to clarify what it means
- add French on-screen keyboard (thanks @CrashMidnick)

Description
=====
Expand All @@ -23,6 +22,8 @@ Thanks to ScHlAuChi for extensive testing, ideas, and for contributing the new l

Thanks to wronghands for the new, better-looking menu font, and many ideas.

Thanks to CrashMidnick for the French virtual keyboard

Thanks to the original authors Chui, john4p, TomB, notaz, Bernd Schneider, Toni Wilen, Pickle, smoku, AnotherGuest, Anonymous engineer, finkel, Lubomyr, pelya and many more.

Thanks to my supporters on Patreon: Andyways, CountDuckula, Greg Gibson, Jesse Harlin, Özgür Karter, Matthew Machnee, and RadicalR.
Expand Down Expand Up @@ -295,6 +296,10 @@ Compiling

CHANGELOG
=====
1.88

- add French on-screen keyboard (thanks @CrashMidnick)

1.87

- improve savestate thumbnail quality
Expand Down
Binary file added psp2data/data/vkbdFRLarge.bmp
Binary file not shown.
Binary file added psp2data/data/vkbdFRLargeHires.bmp
Binary file not shown.
Binary file added psp2data/data/vkbdFRLargeShift.bmp
Binary file not shown.
Binary file added psp2data/data/vkbdFRLargeShiftHires.bmp
Binary file not shown.
13 changes: 9 additions & 4 deletions src/gp2x/menu/menu_display.cpp
Expand Up @@ -344,9 +344,14 @@ static void draw_displayMenu(int c)
write_text(tabstop3,menuLine,"UK");

if ((mainMenu_vkbdLanguage==2)&&((menuDisplay!=MENUDISPLAY_VKBDLANGUAGE)||(bb)))
write_text_inv(tabstop5,menuLine,"GERMAN");
write_text_inv(tabstop5,menuLine,"German");
else
write_text(tabstop5,menuLine,"GERMAN");
write_text(tabstop5,menuLine,"German");

if ((mainMenu_vkbdLanguage==3)&&((menuDisplay!=MENUDISPLAY_VKBDLANGUAGE)||(bb)))
write_text_inv(tabstop5+8,menuLine,"French");
else
write_text(tabstop5+8,menuLine,"French");
#endif

// MENUDISPLAY_BACKGROUND
Expand Down Expand Up @@ -775,8 +780,8 @@ static int key_displayMenu(int *c)
}
else if (right)
{
if (mainMenu_vkbdLanguage >= 2)
mainMenu_vkbdLanguage = 2;
if (mainMenu_vkbdLanguage >= 3)
mainMenu_vkbdLanguage = 3;
else
mainMenu_vkbdLanguage +=1;
}
Expand Down
113 changes: 113 additions & 0 deletions src/vkbd/vkbd.cpp
Expand Up @@ -394,6 +394,112 @@ static t_vkbd_rect vkbd_rect_GER[]=
{{196, 37, 14, 11 }, 48,81,65,49, AK_NUMBERSIGN}, // 94 *
};

//FRENCH KEYBOARD
static t_vkbd_rect vkbd_rect_FR[]=
{
{{ 1, 1, 29, 11 },85,17,16, 1, AK_ESC}, // 0, row 1 start
{{ 31, 1, 14, 11 },86,18, 0, 2, AK_F1}, // 1
{{ 46, 1, 14, 11 },87,19, 1, 3, AK_F2}, // 2
{{ 61, 1, 14, 11 },87,20, 2, 4, AK_F3}, // 3
{{ 76, 1, 14, 11 },87,21, 3, 5, AK_F4}, // 4
{{ 91, 1, 14, 11 },87,22, 4, 6, AK_F5}, // 5
{{106, 1, 14, 11 },87,23, 5, 7, AK_F6}, // 6
{{121, 1, 14, 11 },87,24, 6, 8, AK_F7}, // 7
{{136, 1, 14, 11 },87,25, 7, 9, AK_F8}, // 8
{{151, 1, 14, 11 },87,26, 8,10, AK_F9}, // 9
{{166, 1, 14, 11 },87,27, 9,11, AK_F10}, // 10
{{181, 1, 29, 11 },88,28,10,12, AK_DEL}, // 11
{{211, 1, 29, 11 },90,30,11,13, AK_HELP}, // 12
{{241, 1, 14, 11 },92,32,12,14, AK_NPLPAREN}, // 13
{{256, 1, 14, 11 },69,33,13,15, AK_NPRPAREN}, // 14
{{271, 1, 14, 11 },69,34,14,16, AK_NPDIV}, // 15
{{286, 1, 14, 11 },69,35,15,0, AK_NPMUL}, // 16

{{ 1, 13, 29, 11 }, 0,36,35,18, AK_BACKQUOTE}, // 17, row 2 start
{{ 31, 13, 14, 11 }, 1,37,17,19, AK_1}, // 18
{{ 46, 13, 14, 11 }, 2,38,18,20, AK_2}, // 19
{{ 61, 13, 14, 11 }, 3,39,19,21, AK_3}, // 20
{{ 76, 13, 14, 11 }, 4,40,20,22, AK_4}, // 21
{{ 91, 13, 14, 11 }, 5,41,21,23, AK_5}, // 22
{{106, 13, 14, 11 }, 6,42,22,24, AK_6}, // 23
{{121, 13, 14, 11 }, 7,43,23,25, AK_7}, // 24
{{136, 13, 14, 11 }, 8,44,24,26, AK_8}, // 25
{{151, 13, 14, 11 }, 9,45,25,27, AK_9}, // 26
{{166, 13, 14, 11 },10,46,26,28, AK_0}, // 27
{{181, 13, 14, 11 },11,47,27,29, AK_MINUS}, // 28
{{196, 13, 14, 11 },11,48,28,30, AK_EQUAL}, // 29
{{211, 13, 14, 11 },12,49,29,31, AK_BACKSLASH}, // 30
{{226, 13, 14, 11 },12,49,30,32, AK_BS}, // 31
{{241, 13, 14, 11 },13,50,31,33, AK_NP7}, // 32
{{256, 13, 14, 11 },14,51,32,34, AK_NP8}, // 33
{{271, 13, 14, 11 },15,52,33,35, AK_NP9}, // 34
{{286, 13, 14, 11 },16,53,34,17, AK_NPSUB}, // 35

{{ 1, 25, 29, 11 }, 17,54,53,37, AK_TAB}, // 36, row 3 start
{{ 31, 25, 14, 11 }, 18,55,36,38, AK_Q}, // 37
{{ 46, 25, 14, 11 }, 19,56,37,39, AK_W}, // 38
{{ 61, 25, 14, 11 }, 20,57,38,40, AK_E}, // 39
{{ 76, 25, 14, 11 }, 21,58,39,41, AK_R}, // 40
{{ 91, 25, 14, 11 }, 22,59,40,42, AK_T}, // 41
{{106, 25, 14, 11 }, 23,60,41,43, AK_Y}, // 42
{{121, 25, 14, 11 }, 24,61,42,44, AK_U}, // 43
{{136, 25, 14, 11 }, 25,62,43,45, AK_I}, // 44
{{151, 25, 14, 11 }, 26,63,44,46, AK_O}, // 45
{{166, 25, 14, 11 }, 27,64,45,47, AK_P}, // 46
{{181, 25, 14, 11 }, 28,65,46,48, AK_LBRACKET}, // 47
{{196, 25, 14, 11 }, 29,94,47,49, AK_RBRACKET}, // 48 *
{{211, 25, 29, 23 }, 30,81,48,50, AK_RET}, // 49
{{241, 25, 14, 11 }, 32,66,49,51, AK_NP4}, // 50
{{256, 25, 14, 11 }, 33,67,50,52, AK_NP5}, // 51
{{271, 25, 14, 11 }, 34,68,51,53, AK_NP6}, // 52
{{286, 25, 14, 11 }, 35,69,52,36, AK_NPADD}, // 53

{{ 1, 37, 29, 11 }, 36,70,69,55, AK_CTRL}, // 54, row 4 start
{{ 31, 37, 14, 11 }, 37,93,54,56, AK_A}, // 55 *
{{ 46, 37, 14, 11 }, 38,71,55,57, AK_S}, // 56
{{ 61, 37, 14, 11 }, 39,72,56,58, AK_D}, // 57
{{ 76, 37, 14, 11 }, 40,73,57,59, AK_F}, // 58
{{ 91, 37, 14, 11 }, 41,74,58,60, AK_G}, // 59
{{106, 37, 14, 11 }, 42,75,59,61, AK_H}, // 60
{{121, 37, 14, 11 }, 43,76,60,62, AK_J}, // 61
{{136, 37, 14, 11 }, 44,77,61,63, AK_K}, // 62
{{151, 37, 14, 11 }, 45,78,62,64, AK_L}, // 63
{{166, 37, 14, 11 }, 46,79,63,65, AK_SEMICOLON}, // 64
{{181, 37, 14, 11 }, 47,80,64,94, AK_QUOTE}, // 65 *
{{241, 37, 14, 11 }, 50,83,49,67, AK_NP1}, // 66
{{256, 37, 14, 11 }, 51,83,66,68, AK_NP2}, // 67
{{271, 37, 14, 11 }, 52,84,67,69, AK_NP3}, // 68
{{286, 37, 14, 34 }, 53,16,68,54, AK_ENT}, // 69

{{ 1, 49, 29, 11 }, 54,85,84,93, AK_LSH}, // 70, row 5 start *
{{ 46, 49, 14, 11 }, 56,87,93,72, AK_Z}, // 71 *
{{ 61, 49, 14, 11 }, 57,87,71,73, AK_X}, // 72
{{ 76, 49, 14, 11 }, 58,87,72,74, AK_C}, // 73
{{ 91, 49, 14, 11 }, 59,87,73,75, AK_V}, // 74
{{106, 49, 14, 11 }, 60,87,74,76, AK_B}, // 75
{{121, 49, 14, 11 }, 61,87,75,77, AK_N}, // 76
{{136, 49, 14, 11 }, 62,87,76,78, AK_M}, // 77
{{151, 49, 14, 11 }, 63,87,77,79, AK_COMMA}, // 78
{{166, 49, 14, 11 }, 64,87,78,80, AK_PERIOD}, // 79
{{181, 49, 14, 11 }, 65,88,79,81, AK_SLASH}, // 80
{{196, 49, 27, 11 }, 49,89,80,82, AK_RSH}, // 81
{{226, 49, 14, 11 }, 49,91,81,83, AK_UP}, // 82
{{241, 49, 29, 11 }, 66,92,82,84, AK_NP0}, // 83
{{271, 49, 14, 11 }, 67,69,83,69, AK_NPDEL}, // 84

{{ 1, 61, 29, 11 }, 70,0,69,86, AK_LALT}, // 85, row 6 start
{{ 31, 61, 14, 11 }, 93,1,85,87, AK_LAMI}, // 86 *
{{ 46, 61,134, 11 }, 71,2,86,88, AK_SPC}, // 87
{{181, 61, 14, 11 }, 80,11,87,89, AK_RAMI}, // 88
{{196, 61, 14, 11 }, 81,11,88,90, AK_RALT}, // 89
{{211, 61, 14, 11 }, 81,12,89,91, AK_LF}, // 90
{{226, 61, 14, 11 }, 82,12,90,92, AK_DN}, // 91
{{241, 61, 14, 11 }, 83,13,91,69, AK_RT}, // 92
//French extra keys
{{31, 49, 14, 11 }, 55,86,70,71, AK_LTGT}, // 93 *
{{196, 37, 14, 11 }, 48,81,65,49, AK_NUMBERSIGN}, // 94 *
};

void vkbd_init_button2(void)
{
vkbd_button2=(SDLKey)0;
Expand Down Expand Up @@ -433,6 +539,13 @@ int vkbd_init(void)
snprintf(vkbdShiftHiresFileName, 256, "vkbdGERLargeShiftHires.bmp");
vkbd_rect=vkbd_rect_GER;
break;
case 3:
snprintf(vkbdFileName, 256, "vkbdFRLarge.bmp");
snprintf(vkbdHiresFileName, 256, "vkbdFRLargeHires.bmp");
snprintf(vkbdShiftFileName, 256, "vkbdFRLargeShift.bmp");
snprintf(vkbdShiftHiresFileName, 256, "vkbdFRLargeShiftHires.bmp");
vkbd_rect=vkbd_rect_FR;
break;
default:
snprintf(vkbdFileName, 256, "vkbdUSLarge.bmp");
snprintf(vkbdHiresFileName, 256, "vkbdUSLargeHires.bmp");
Expand Down
Binary file added switchdata/data/vkbdFRLarge.bmp
Binary file not shown.
Binary file added switchdata/data/vkbdFRLargeHires.bmp
Binary file not shown.
Binary file added switchdata/data/vkbdFRLargeShift.bmp
Binary file not shown.
Binary file added switchdata/data/vkbdFRLargeShiftHires.bmp
Binary file not shown.

0 comments on commit 1e86233

Please sign in to comment.