Microsoft is beating Apple in a key battle for the future of computing

But by 2017, IDC says, the rise of keyboard-detachable tablets— like the Microsoft Surface Book, the Apple iPad Pro, and the Google Pixel C — will return the tablet market to stable, if single-digit, growth.

And it's Microsoft that is poised to take full advantage of the rise of the detachable.

IDC projects that Windows 10 devices like the Surface Book laptop and the Surface Pro 4 tablet will ride that wave to a 74.6% share of the detachable tablet market by 2020, up from 53.3% in 2016.

Microsoft's growth will come at Apple's expense, with that same report projecting that the iPad will go from 28.5% market share in detachable tablets today to 7.3% share in 2020. Apple's only detachable tablet is the gigantic iPad Pro, though there are rumors that the secretive company will soon unveil a smaller model.

Android detachable tablets like the Google Pixel C will stay pretty steady, IDC predicts, with 18.2% market share in 2016 and an estimated 18.1% in 2020.

Tablets with detachable keyboards represented only 8% of the broader tablet market in 2015, but they will account for about 30% of the market in 202o, IDC says.

In fact, detachable tablets increasingly look like the future of the broader PC market, no matter which operating system you favor. IDC has previously calculated that detachable tablets were actually already saving the shrinking PC industry.

If you factor in detachables, according to the past report, IDC estimates that the PC market's expected 3.1% decline next year becomes a positive 1% to 2% of growth. It's not exactly barn-burning growth, but any increase is better than the alternative.

The trend plays right into Microsoft's hands: The company was among the first to push detachable devices with its Surface tablet. Companies like Dell, HP, and Samsung soon followed with their own versions.