react-native-external-keyboard 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ iOS | Android
|
|
|
22
22
|
|
|
23
23
|
| iOS | Android |
|
|
24
24
|
| :-- | :-- |
|
|
25
|
-
| <img src="/.github/images/rnek-focus-lock-ios.gif" height="500" /> | <img src="/.github/images/rnek-focus-lock-
|
|
25
|
+
| <img src="/.github/images/rnek-focus-lock-ios.gif" height="500" /> | <img src="/.github/images/rnek-focus-lock-android.gif" height="500" /> |
|
|
26
26
|
|
|
27
27
|
> A new type of focus lock functionality has been introduced, featuring two new components: `Focus.Frame` and `Focus.Trap`. These components help manage and lock focus within specific areas of the screen.
|
|
28
28
|
|
|
@@ -21,7 +21,8 @@ using namespace facebook::react;
|
|
|
21
21
|
+ (void)onKeyDownPressEventEmmiter:(NSDictionary*) dictionary withEmitter:(facebook::react::SharedViewEventEmitter) _eventEmitter {
|
|
22
22
|
if (_eventEmitter) {
|
|
23
23
|
auto viewEventEmitter = std::static_pointer_cast<ExternalKeyboardViewEventEmitter const>(_eventEmitter);
|
|
24
|
-
|
|
24
|
+
|
|
25
|
+
NSString* unicodeChar = [dictionary valueForKey:@"unicodeChar"];
|
|
25
26
|
facebook::react::ExternalKeyboardViewEventEmitter::OnKeyDownPress data = {
|
|
26
27
|
.keyCode = [[dictionary valueForKey:@"keyCode"] intValue],
|
|
27
28
|
.isLongPress = [[dictionary valueForKey:@"isLongPress"] boolValue],
|
|
@@ -31,7 +32,7 @@ using namespace facebook::react;
|
|
|
31
32
|
.isCapsLockOn = [[dictionary valueForKey:@"isCapsLockOn"] boolValue],
|
|
32
33
|
.hasNoModifiers = [[dictionary valueForKey:@"hasNoModifiers"] boolValue],
|
|
33
34
|
.unicode = [[dictionary valueForKey:@"unicode"] intValue],
|
|
34
|
-
.unicodeChar = [
|
|
35
|
+
.unicodeChar = [unicodeChar UTF8String],
|
|
35
36
|
};
|
|
36
37
|
viewEventEmitter->onKeyDownPress(data);
|
|
37
38
|
};
|
|
@@ -40,7 +41,8 @@ using namespace facebook::react;
|
|
|
40
41
|
+ (void)onKeyUpPressEventEmmiter:(NSDictionary*) dictionary withEmitter:(facebook::react::SharedViewEventEmitter) _eventEmitter {
|
|
41
42
|
if (_eventEmitter) {
|
|
42
43
|
auto viewEventEmitter = std::static_pointer_cast<ExternalKeyboardViewEventEmitter const>(_eventEmitter);
|
|
43
|
-
|
|
44
|
+
|
|
45
|
+
NSString* unicodeChar = [dictionary valueForKey:@"unicodeChar"];
|
|
44
46
|
facebook::react::ExternalKeyboardViewEventEmitter::OnKeyUpPress data = {
|
|
45
47
|
.keyCode = [[dictionary valueForKey:@"keyCode"] intValue],
|
|
46
48
|
.isLongPress = [[dictionary valueForKey:@"isLongPress"] boolValue],
|
|
@@ -50,7 +52,7 @@ using namespace facebook::react;
|
|
|
50
52
|
.isCapsLockOn = [[dictionary valueForKey:@"isCapsLockOn"] boolValue],
|
|
51
53
|
.hasNoModifiers = [[dictionary valueForKey:@"hasNoModifiers"] boolValue],
|
|
52
54
|
.unicode = [[dictionary valueForKey:@"unicode"] intValue],
|
|
53
|
-
.unicodeChar = [
|
|
55
|
+
.unicodeChar = [unicodeChar UTF8String],
|
|
54
56
|
};
|
|
55
57
|
viewEventEmitter->onKeyUpPress(data);
|
|
56
58
|
};
|