Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ~/Desktop/sources/keymap/haiku> git diff
- diff --git a/src/bin/keymap/Keymap.cpp b/src/bin/keymap/Keymap.cpp
- index 5a1ad0c5a0..08c3ac3b97 100644
- --- a/src/bin/keymap/Keymap.cpp
- +++ b/src/bin/keymap/Keymap.cpp
- @@ -958,7 +958,7 @@ Keymap::_SaveSourceText(FILE* file)
- }
- #endif
- - for (int i = 0; i < 128; i++) {
- + for (int i = 0; i < 256; i++) {
- char normalKey[32];
- char shiftKey[32];
- char controlKey[32];
- diff --git a/src/kits/shared/Keymap.cpp b/src/kits/shared/Keymap.cpp
- index 9a77e6f602..1c7315074b 100644
- --- a/src/kits/shared/Keymap.cpp
- +++ b/src/kits/shared/Keymap.cpp
- @@ -349,7 +349,7 @@ BKeymap::GetChars(uint32 keyCode, uint32 modifiers, uint8 activeDeadKey,
- *numBytes = 0;
- *chars = NULL;
- - if (keyCode > 128 || fChars == NULL)
- + if (keyCode > 256 || fChars == NULL)
- return;
- :...skipping...
- diff --git a/src/bin/keymap/Keymap.cpp b/src/bin/keymap/Keymap.cpp
- index 5a1ad0c5a0..08c3ac3b97 100644
- --- a/src/bin/keymap/Keymap.cpp
- +++ b/src/bin/keymap/Keymap.cpp
- @@ -958,7 +958,7 @@ Keymap::_SaveSourceText(FILE* file)
- }
- #endif
- - for (int i = 0; i < 128; i++) {
- + for (int i = 0; i < 256; i++) {
- char normalKey[32];
- char shiftKey[32];
- char controlKey[32];
- diff --git a/src/kits/shared/Keymap.cpp b/src/kits/shared/Keymap.cpp
- index 9a77e6f602..1c7315074b 100644
- --- a/src/kits/shared/Keymap.cpp
- +++ b/src/kits/shared/Keymap.cpp
- @@ -349,7 +349,7 @@ BKeymap::GetChars(uint32 keyCode, uint32 modifiers, uint8 activeDeadKey,
- *numBytes = 0;
- *chars = NULL;
- - if (keyCode > 128 || fChars == NULL)
- + if (keyCode > 256 || fChars == NULL)
- return;
- // here we take NUMLOCK into account
- @@ -460,7 +460,7 @@ BKeymap::GetModifiedCharacters(const char* in, int32 inModifiers,
- if (in == NULL || *in == '\0' || _outList == NULL)
- return B_BAD_VALUE;
- - for(uint32 i = 0; i < 128; i++) {
- + for(uint32 i = 0; i < 256; i++) {
- int32 inOffset = Offset(i, inModifiers);
- size_t sizeIn = fChars[inOffset++];
- if (sizeIn == 0 || memcmp(in, fChars + inOffset, sizeIn) != 0) {
- @@ -520,7 +520,7 @@ BKeymap::Offset(uint32 keyCode, uint32 modifiers, uint32* _table) const
- int32 offset;
- uint32 table;
- - if (keyCode >= 128)
- + if (keyCode >= 256)
- return -1;
- switch (modifiers & kModifierKeys) {
- diff --git a/src/preferences/keymap/Keymap.cpp b/src/preferences/keymap/Keymap.cpp
- index 2da93a902e..a0ecfc34a4 100644
- --- a/src/preferences/keymap/Keymap.cpp
- +++ b/src/preferences/keymap/Keymap.cpp
- @@ -103,7 +103,7 @@ Keymap::DumpKeymap()
- // Caps, Caps+shift, Caps+option, and Caps+option+shift keys.
- puts("Key #\tn\ts\tc\to\tos\tC\tCs\tCo\tCos\n");
- - for (uint8 i = 0; i < 128; i++) {
- + for (uint8 i = 0; i < 256; i++) {
- printf(" 0x%02x\t", i);
- print_key(fChars, fKeys.normal_map[i]);
- print_key(fChars, fKeys.shift_map[i]);
- diff --git a/src/tests/kits/shared/KeymapTest.cpp b/src/tests/kits/shared/KeymapTest.cpp
- index fe1a21ea8c..80f6b335f1 100644
- --- a/src/tests/kits/shared/KeymapTest.cpp
- +++ b/src/tests/kits/shared/KeymapTest.cpp
- @@ -70,7 +70,7 @@ KeymapTest::TestGetChars()
- CPPUNIT_ASSERT(keymap != NULL);
- // Test each of the keymap's character tables
- - typedef std::map<uint32, int32(*)[128]> table_map_t;
- + typedef std::map<uint32, int32(*)[256]> table_map_t;
- table_map_t tables;
- tables[0] = &keymap->normal_map;
- tables[B_SHIFT_KEY] = &keymap->shift_map;
- @@ -86,11 +86,11 @@ KeymapTest::TestGetChars()
- for (table_map_t::const_iterator p = tables.begin();
- p != tables.end(); p++) {
- const uint32 modifiers = (*p).first;
- - const int32(*table)[128] = (*p).second;
- + const int32(*table)[256] = (*p).second;
- // Test, for every keycode, that the result from BKeymap::GetChars()
- // matches what we find in our our own copy of the keymap
- - for (uint32 keycode = 0; keycode < 128; keycode++) {
- + for (uint32 keycode = 0; keycode < 256; keycode++) {
- char* mapChars = &charArray[(*table)[keycode]];
- // If the keycode isn't mapped, try again without the Option key
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement