Tab, space and enter keys not working in vs code

965 views Asked by At

when i run run flutter in vs code the enter, tab and space keys not working properly.

import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(); //my cursor is in center of the brackets
  }
}

When i press enter my cursor cannot come to the next line. Similarlly the tab key and space key also not working.

3

There are 3 answers

1
Abduboriy Jonmirzayev On

I had the same problem with me just a before tab was not working and I solved it just pressing ctrl+m shortcut on Windows.

0
ShishiMaru On

I had the same issue. Just go to vscode settings and search format .

Select Also modified in Dart > User, beside the Format On Save & Format On Type , and turn them OFF

Solved the issue for me

0
Daniel M.Z.d.S On

My issue with the Keyboard (enter, tab, space, backspace, etc) vs. VS Code started after I installed some extensions. After some further investigation, VIM extension was the reason, at least the version 1.25., from 'vscodevim' supplier. Try to uninstall such extension and restart your VS COde. enter image description here