1

Is there a way to set the native keyboard to open with caps lock on?

I tried TextCapitalization.characters But it's not the expected behaviour.

What we expect is to start the keyboard with Caps lock enabled but the user should be able to turn it off.

Caps lock(double tap on caps key):

enter image description here

ktnishide
  • 19
  • 4

1 Answers1

1

I think you try to relaunch your app hope your problem is solved:

I try below code hope it help you I used textCapitalization: TextCapitalization.characters, below code and its working .

//Declare your controller here
final myController = TextEditingController();
//your widget
Padding(
        padding: const EdgeInsets.all(16.0),
        child: TextFormField(
         //textCapitalization: TextCapitalization.words,//First letter capital of every charecter
           textCapitalization: TextCapitalization.characters,// All letters capital of every charecter
          // textCapitalization: TextCapitalization.sentences,// first letter captil of your sentence
          //textCapitalization: TextCapitalization.none,//no capital letter
          controller: myController,
        ),
      ),

your textfield like ->enter image description here

your keyboard like -> enter image description here

Ravindra S. Patil
  • 11,757
  • 3
  • 13
  • 40
  • I did it. Caps Lock is different though... Also, if you deactivate the caps and press a letter, it returns to caps on. What we want is just start the keyboard with Caps lock by default but the user should be able to disable it. – ktnishide Aug 05 '21 at 04:05