Google is asking the US Supreme Court to reverse an appeals court ruling that said Oracle's Java API's were protected by copyright.

Google told the justices in a petition [PDF] this week that assigning copyright to the code—the Application Programming Interfaces that enable programs to talk to one another—sets a dangerous precedent.

The appellate court's May ruling, Google said, allows "copyright monopolies over the basic building blocks of computer design and programming."

Google said the US Court of Appeals for the Federal Circuit's decision would have allowed the Remington typewriter maker to stop others from using the QWERTY keyboard layout.

"That design was original and creative, but Remington was not entitled to appropriate the investments made by others in learning how to use it," Google wrote in its petition. "Otherwise, Remington could have monopolized not only the sale of its patented typewriters for the length of a patent term, but also the sale of all keyboards for nearly a century."

The legal fracas started when Google copied certain elements—names, declaration, and header lines—of the Java APIs in Android, and Oracle sued. A San Francisco federal judge largely sided with Google in 2012, saying that the code in question could not be copyrighted. But the federal appeals court reversed, and ruled that the "declaring code and the structure, sequence, and organization of the API packages are entitled to copyright protection."

Oracle said the decision was "a win for the entire software industry that relies on copyright protection to fuel innovation."

US District Judge William Alsup, in his 2012 ruling for Google, wrote that even though Google could have rearranged "the various methods under different groupings among the various classes and packages," the overall name tree is "a utilitarian and functional set of symbols, each to carry out a pre-assigned function... Duplication of the command structure is necessary for interoperability."

The dispute is far from over, even if the Supreme Court declines to accept Google's petition.

That's because the appellate court's ruling [PDF] left open the door that Google may not be monetarily liable for infringement. The appeals court sent the case back to Alsup to determine whether Google had a "fair use" right to infringe.

There's no clear answer as to what constitutes fair use, and it's decided on a case-by-case basis.

"The distinction between what is fair use and what is infringement in a particular case will not always be clear or easily defined. There is no specific number of words, lines, or notes that may safely be taken without permission. Acknowledging the source of the copyrighted material does not substitute for obtaining permission," the US Copyright Office says.